Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I've added a couple of custom fields to the Edit Media screen, but when these are displayed in the WP Media Thickbox (when adding images from the Edit Post screen, for example), the styling is gone.

Is there a hook to add my custom CSS to the Thickbox Iframe when it loads?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

In WordPress 3.5, this hook works for me:

add_action( 'print_media_templates', 'wpse_75746_print_style_35' );

function wpse_75746_print_style_35()
{
    ?>
    <style>
        .media-modal-content, .media-sidebar {
            background: #FFF2D4 !important;
        }   
    </style>
    <?php
}

In 3.4.2, this is the one:

add_action( 'admin_print_styles-media-upload-popup', 'wpse_75746_print_style_342' );

function wpse_75746_print_style_342()
{
    ?>
    <style>
        #media-upload {
            background: #FFF2D4 !important;
        }
    </style>
    <?php
}
share|improve this answer
    
Thanks for that, and good effort on the 3.5 update - I've literally only just seen that it is out! –  David Gard Dec 12 '12 at 10:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.