Make WordPress Core


Ignore:
Timestamp:
05/20/2008 05:19:33 PM (16 years ago)
Author:
ryan
Message:

Theme preview and thickbox CSS cleanup. Props azaozz. see #5486

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r7922 r7961  
    168168    $out = <<<EOF
    169169
    170     <a href="{$image_upload_iframe_src}&amp;TB_iframe=true&amp;height=500&amp;width=640" class="thickbox" title='$image_title'><img src='images/media-button-image.gif' alt='$image_title' /></a>
    171     <a href="{$video_upload_iframe_src}&amp;TB_iframe=true&amp;height=500&amp;width=640" class="thickbox" title='$video_title'><img src='images/media-button-video.gif' alt='$video_title' /></a>
    172     <a href="{$audio_upload_iframe_src}&amp;TB_iframe=true&amp;height=500&amp;width=640" class="thickbox" title='$audio_title'><img src='images/media-button-music.gif' alt='$audio_title' /></a>
    173     <a href="{$media_upload_iframe_src}&amp;TB_iframe=true&amp;height=500&amp;width=640" class="thickbox" title='$media_title'><img src='images/media-button-other.gif' alt='$media_title' /></a>
     170    <a href="{$image_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$image_title'><img src='images/media-button-image.gif' alt='$image_title' /></a>
     171    <a href="{$video_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$video_title'><img src='images/media-button-video.gif' alt='$video_title' /></a>
     172    <a href="{$audio_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$audio_title'><img src='images/media-button-music.gif' alt='$audio_title' /></a>
     173    <a href="{$media_upload_iframe_src}&amp;TB_iframe=true" class="thickbox" title='$media_title'><img src='images/media-button-other.gif' alt='$media_title' /></a>
    174174
    175175EOF;
     
    178178add_action( 'media_buttons', 'media_buttons' );
    179179
    180 function media_buttons_head() {
    181 $siteurl = get_option('siteurl');
    182 echo "<style type='text/css' media='all'>
    183     @import '{$siteurl}/wp-includes/js/thickbox/thickbox.css?ver=20080430';
    184     div#TB_title {
    185         background-color: #222222;
    186         color: #cfcfcf;
    187     }
    188     div#TB_title a, div#TB_title a:visited {
    189         color: #cfcfcf;
    190     }
    191     #TB_window {
    192         top: 20px;
    193     }
    194 </style>\n";
    195 }
    196 
    197 add_action( 'admin_print_scripts', 'media_buttons_head' );
     180add_action( 'admin_print_scripts-post-new.php', 'add_thickbox' );
     181add_action( 'admin_print_scripts-post.php', 'add_thickbox' );
     182add_action( 'admin_print_scripts-page-new.php', 'add_thickbox' );
     183add_action( 'admin_print_scripts-page.php', 'add_thickbox' );
    198184
    199185function media_admin_css() {
Note: See TracChangeset for help on using the changeset viewer.