Make WordPress Core

Ticket #33305: 33305.patch

File 33305.patch, 24.0 KB (added by afercia, 9 years ago)
  • src/wp-admin/css/common.css

     
    26842684        display: none;
    26852685}
    26862686
    2687 body.plugin-install-php .tb-close-icon,
    2688 body.import-php .tb-close-icon,
    2689 body.plugins-php .tb-close-icon,
    2690 body.update-core-php .tb-close-icon,
    2691 body.index-php .tb-close-icon {
    2692         left: auto;
     2687.plugin-install-php #TB_closeWindowButton,
     2688.import-php #TB_closeWindowButton,
     2689.plugins-php #TB_closeWindowButton,
     2690.update-core-php #TB_closeWindowButton,
     2691.index-php #TB_closeWindowButton {
    26932692        right: -30px;
    26942693        color: #eee;
    2695         -webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
    2696         transition: color .1s ease-in-out, background .1s ease-in-out;
    26972694}
    26982695
     2696body.plugin-install-php #TB_closeWindowButton:hover,
    26992697body.plugin-install-php #TB_closeWindowButton:focus,
    2700 body.plugin-install-php #TB_closeWindowButton:focus .tb-close-icon,
    2701 body.plugin-install-php .tb-close-icon:focus,
    2702 body.plugin-install-php .tb-close-icon:hover,
     2698body.import-php #TB_closeWindowButton:hover,
    27032699body.import-php #TB_closeWindowButton:focus,
    2704 body.import-php #TB_closeWindowButton:focus .tb-close-icon,
    2705 body.import-php .tb-close-icon:focus,
    2706 body.import-php .tb-close-icon:hover,
     2700body.plugins-php #TB_closeWindowButton:hover,
    27072701body.plugins-php #TB_closeWindowButton:focus,
    2708 body.plugins-php #TB_closeWindowButton:focus .tb-close-icon,
    2709 body.plugins-php .tb-close-icon:focus,
    2710 body.plugins-php .tb-close-icon:hover,
     2702body.update-core-php #TB_closeWindowButton:hover,
    27112703body.update-core-php #TB_closeWindowButton:focus,
    2712 body.update-core-php #TB_closeWindowButton:focus .tb-close-icon,
    2713 body.update-core-php .tb-close-icon:focus,
    2714 body.update-core-php .tb-close-icon:hover,
    2715 body.index-php #TB_closeWindowButton:focus,
    2716 body.index-php #TB_closeWindowButton:focus .tb-close-icon,
    2717 body.index-php .tb-close-icon:focus,
    2718 body.index-php .tb-close-icon:hover {
     2704body.index-php #TB_closeWindowButton:hover,
     2705body.index-php #TB_closeWindowButton:focus {
    27192706        color: #00a0d2;
    27202707        outline: none;
    27212708        -webkit-box-shadow: none;
     
    27222709        box-shadow: none;
    27232710}
    27242711
    2725 body.plugin-install-php .tb-close-icon:before,
    2726 body.import-php .tb-close-icon:before,
    2727 body.plugins-php .tb-close-icon:before,
    2728 body.update-core-php .tb-close-icon:before,
    2729 body.index-php .tb-close-icon:before {
     2712body.plugin-install-php .tb-close-icon,
     2713body.import-php .tb-close-icon,
     2714body.plugins-php .tb-close-icon,
     2715body.update-core-php .tb-close-icon,
     2716body.index-php .tb-close-icon {
     2717        display: none;
     2718}
     2719
     2720body.plugin-install-php #TB_closeWindowButton:after,
     2721body.import-php #TB_closeWindowButton:after,
     2722body.plugins-php #TB_closeWindowButton:after,
     2723body.update-core-php #TB_closeWindowButton:after,
     2724body.index-php #TB_closeWindowButton:after {
    27302725        content: "\f335";
    2731         font-size: 32px;
     2726        font: normal 32px/29px 'dashicons';
     2727        speak: none;
     2728        -webkit-font-smoothing: antialiased;
     2729        -moz-osx-font-smoothing: grayscale;
    27322730}
    27332731
    27342732/* move plugin install close icon to top on narrow screens */
    27352733@media screen and ( max-width: 830px ) {
    2736         body.plugin-install-php .tb-close-icon,
    2737         body.import-php .tb-close-icon,
    2738         body.plugins-php .tb-close-icon,
    2739         body.update-core-php .tb-close-icon,
    2740         body.index-php .tb-close-icon {
     2734        body.plugin-install-php #TB_closeWindowButton,
     2735        body.import-php #TB_closeWindowButton,
     2736        body.plugins-php #TB_closeWindowButton,
     2737        body.update-core-php #TB_closeWindowButton,
     2738        body.index-php #TB_closeWindowButton {
    27412739                right: 0;
    27422740                top: -30px;
    27432741        }
  • src/wp-admin/import.php

     
    9696                        if ( empty($action) ) {
    9797                                if ( is_main_site() ) {
    9898                                        $action = '<a href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug .
    99                                                                                 '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox" title="' .
    100                                                                                 esc_attr__('Install importer') . '">' . $data[0] . '</a>';
     99                                                                        '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal" title="' .
     100                                                                        esc_attr__( 'Install importer' ) . '" data-title="' . esc_attr( $data[0] ) . '">' . $data[0] . '</a>';
    101101                                } else {
    102102                                        $action = $data[0];
    103103                                        $data[1] = sprintf( __( 'This importer is not installed. Please install importers from <a href="%s">the main site</a>.' ), get_admin_url( $current_site->blog_id, 'import.php' ) );
  • src/wp-admin/includes/class-wp-plugin-install-list-table.php

     
    465465                                                                '&amp;TB_iframe=true&amp;width=600&amp;height=550' );
    466466
    467467                        /* translators: 1: Plugin name and version. */
    468                         $action_links[] = '<a href="' . esc_url( $details_link ) . '" class="thickbox" aria-label="' . esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
     468                        $action_links[] = '<a href="' . esc_url( $details_link ) . '" class="thickbox open-plugin-details-modal" aria-label="' . esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>';
    469469
    470470                        if ( !empty( $plugin['icons']['svg'] ) ) {
    471471                                $plugin_icon_url = $plugin['icons']['svg'];
     
    492492                ?>
    493493                <div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">
    494494                        <div class="plugin-card-top">
    495                                 <a href="<?php echo esc_url( $details_link ); ?>" class="thickbox plugin-icon"><img src="<?php echo esc_attr( $plugin_icon_url ) ?>" /></a>
     495                                <a href="<?php echo esc_url( $details_link ); ?>" class="thickbox plugin-icon open-plugin-details-modal" data-title="<?php echo esc_attr( $name ); ?>"><img src="<?php echo esc_attr( $plugin_icon_url ) ?>" /></a>
    496496                                <div class="name column-name">
    497                                         <h4><a href="<?php echo esc_url( $details_link ); ?>" class="thickbox"><?php echo $title; ?></a></h4>
     497                                        <h4><a href="<?php echo esc_url( $details_link ); ?>" class="thickbox open-plugin-details-modal" data-title="<?php echo esc_attr( $name ); ?>"><?php echo $title; ?></a></h4>
    498498                                </div>
    499499                                <div class="action-links">
    500500                                        <?php
  • src/wp-admin/includes/class-wp-plugins-list-table.php

     
    631631
    632632                                        // Details link using API info, if available
    633633                                        if ( isset( $plugin_data['slug'] ) && current_user_can( 'install_plugins' ) ) {
    634                                                 $plugin_meta[] = sprintf( '<a href="%s" class="thickbox" aria-label="%s" data-title="%s">%s</a>',
     634                                                $plugin_meta[] = sprintf( '<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>',
    635635                                                        esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] .
    636636                                                                '&TB_iframe=true&width=600&height=550' ) ),
    637637                                                        esc_attr( sprintf( __( 'More information about %s' ), $plugin_name ) ),
  • src/wp-admin/includes/dashboard.php

     
    11741174                $title = esc_html( $item->get_title() );
    11751175
    11761176                $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&amp;TB_iframe=true&amp;width=600&amp;height=800';
    1177                 echo "<li class='dashboard-news-plugin'><span>" . __( 'Popular Plugin' ) . ":</span> <a href='$link' class='dashboard-news-plugin-link'>$title</a>&nbsp;<span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span></li>";
     1177                echo "<li class='dashboard-news-plugin'><span>" . __( 'Popular Plugin' ) . ":</span> <a href='$link' class='dashboard-news-plugin-link'>$title</a>&nbsp;<span>(<a href='$ilink' class='thickbox open-plugin-details-modal' title='$title' data-title='" . esc_attr( $title ) . "'>" . __( 'Install' ) . "</a>)</span></li>";
    11781178
    11791179                $feed->__destruct();
    11801180                unset( $feed );
  • src/wp-admin/includes/update.php

     
    338338                echo '<tr class="plugin-update-tr' . $active_class . '" id="' . esc_attr( $r->slug . '-update' ) . '" data-slug="' . esc_attr( $r->slug ) . '" data-plugin="' . esc_attr( $file ) . '"><td colspan="' . esc_attr( $wp_list_table->get_column_count() ) . '" class="plugin-update colspanchange"><div class="update-message">';
    339339
    340340                if ( ! current_user_can( 'update_plugins' ) ) {
    341                         printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
     341                        printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" title="%3$s" data-title="%3$s">View version %4$s details</a>.' ), $plugin_name, esc_url( $details_url ), esc_attr( $plugin_name ), $r->new_version );
    342342                } elseif ( empty($r->package) ) {
    343                         printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
     343                        printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" title="%3$s" data-title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ), $plugin_name, esc_url( $details_url ), esc_attr( $plugin_name ), $r->new_version );
    344344                } else {
    345                         printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link">update now</a>.' ), $plugin_name, esc_url( $details_url ), esc_attr( $plugin_name ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ) );
     345                        printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" title="%3$s" data-title="%3$s">View version %4$s details</a> or <a href="%5$s" class="update-link">update now</a>.' ), $plugin_name, esc_url( $details_url ), esc_attr( $plugin_name ), $r->new_version, wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $file, 'upgrade-plugin_' . $file ) );
    346346                }
    347347                /**
    348348                 * Fires at the end of the update message container in each
     
    439439
    440440        echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">';
    441441        if ( ! current_user_can('update_themes') ) {
    442                 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r->new_version );
     442                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>.' ), $theme['Name'], esc_url( $details_url ), esc_attr( $theme['Name'] ), $r->new_version );
    443443        } elseif ( empty( $r['package'] ) ) {
    444                 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'] );
     444                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ), $theme['Name'], esc_url( $details_url ), esc_attr( $theme['Name'] ), $r['new_version'] );
    445445        } else {
    446                 printf( __('There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.'), $theme['Name'], esc_url($details_url), esc_attr($theme['Name']), $r['new_version'], wp_nonce_url( self_admin_url('update.php?action=upgrade-theme&theme=') . $theme_key, 'upgrade-theme_' . $theme_key) );
     446                printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox" title="%3$s">View version %4$s details</a> or <a href="%5$s">update now</a>.' ), $theme['Name'], esc_url( $details_url ), esc_attr( $theme['Name'] ), $r['new_version'], wp_nonce_url( self_admin_url( 'update.php?action=upgrade-theme&theme=' ) . $theme_key, 'upgrade-theme_' . $theme_key ) );
    447447        }
    448448        /**
    449449         * Fires at the end of the update message container in each
  • src/wp-admin/js/plugin-install.js

     
    33/* Plugin Browser Thickbox related JS*/
    44var tb_position;
    55jQuery( document ).ready( function( $ ) {
     6
     7        var tbWindow,
     8                focusedBefore;
     9
    610        tb_position = function() {
    7                 var tbWindow = $( '#TB_window' ),
    8                         width = $( window ).width(),
     11                var width = $( window ).width(),
    912                        H = $( window ).height() - ( ( 792 < width ) ? 60 : 20 ),
    1013                        W = ( 792 < width ) ? 772 : width - 20;
    1114
     15                tbWindow = $( '#TB_window' );
     16
    1217                if ( tbWindow.size() ) {
    1318                        tbWindow.width( W ).height( H );
    1419                        $( '#TB_iframeContent' ).width( W ).height( H );
     
    3843                tb_position();
    3944        });
    4045
    41         $( '.plugin-card, .plugins .plugin-version-author-uri' ).on( 'click', 'a.thickbox', function() {
     46        $( 'body' ).on( 'thickbox:iframe:loaded', tbWindow, function() {
     47                iframeLoaded();
     48        });
     49
     50        function iframeLoaded() {
     51
     52                var $firstFocusable = tbWindow.find( '#TB_closeWindowButton' ),
     53                        $iframe = tbWindow.find( '#TB_iframeContent' ),
     54                        $iframeBody = $iframe.contents().find( 'body' ),
     55                        $tabbables;
     56
     57                $firstFocusable.focus();
     58
     59                // Iframe has loaded now, remove the ARIA busy state.
     60                $iframe.attr( 'aria-busy', 'false' );
     61
     62                // Get the tabbables elements. @todo Consider to implement a WordPress general utility for this and don't use jQuery UI.
     63                $tabbables = $( ':tabbable', $iframeBody );
     64
     65                $lastFocusable = $tabbables.last();
     66
     67                $firstFocusable.add( $lastFocusable ).on( 'keydown', function( event ) {
     68                        if ( 9 !== event.which ) {
     69                                return;
     70                        }
     71
     72                        // Keep tabbing within media modal.
     73                        if ( $lastFocusable[0] === event.target && ! event.shiftKey ) {
     74                                event.preventDefault();
     75                                $firstFocusable.focus();
     76                        } else if ( $firstFocusable[0] === event.target && event.shiftKey ) {
     77                                event.preventDefault();
     78                                $lastFocusable.focus();
     79                        }
     80                });
     81
     82                $iframeBody.on( 'keydown', function( event ) {
     83                        if ( 27 !== event.which ) {
     84                                return;
     85                        }
     86
     87                        tb_remove();
     88                        // Set focus back to the control that had focus before opening the modal.
     89                        focusedBefore.focus();
     90                });
     91
     92                // Set focus back also when activating the Close button.
     93                $firstFocusable.on( 'click', function() {
     94                        focusedBefore.focus();
     95                });
     96        }
     97
     98
     99        // Open the Plugin details modal.
     100        $( 'a.thickbox.open-plugin-details-modal' ).on( 'click', function() {
     101
     102                // Store the control that has focus before opening the modal, i.e. the control which opened the dialog.
     103                focusedBefore = document.activeElement;
     104
    42105                tb_click.call(this);
    43106
    44                 $('#TB_title').css({'background-color':'#23282d','color':'#cfcfcf'});
    45                 $('#TB_ajaxWindowTitle').html( '<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).data( 'title' ) );
    46                 $('#TB_iframeContent').attr( 'title', plugininstallL10n.plugin_information + ' ' + $(this).data( 'title' ) );
    47                 $('#TB_closeWindowButton').focus();
     107                // ARIA role, ARIA properties, and CSS class on the dialog container.
     108                tbWindow.attr({
     109                        'role': 'dialog',
     110                        'aria-label': plugininstallL10n.plugin_modal_label,
     111                        'class': 'plugin-details-modal'
     112                });
    48113
     114                tbWindow.find( '#TB_title' ).css({ 'background-color': '#23282d', 'color': '#cfcfcf' });
     115                tbWindow.find( '#TB_ajaxWindowTitle' ).html( '<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $( this ).data( 'title' ) );
     116                // Set title and ARIA busy state on the iframe.
     117                tbWindow.find( '#TB_iframeContent' ).attr({
     118                        'title': plugininstallL10n.plugin_information + ' ' + $( this ).data( 'title' ),
     119                        'aria-busy': 'true'
     120                });
     121
    49122                return false;
    50123        });
    51124
  • src/wp-admin/update-core.php

     
    287287
    288288                $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_data->update->slug . '&section=changelog&TB_iframe=true&width=640&height=662');
    289289                $details_text = sprintf(__('View version %1$s details.'), $plugin_data->update->new_version);
    290                 $details = sprintf('<a href="%1$s" class="thickbox" title="%2$s">%3$s</a>', esc_url($details_url), esc_attr($plugin_data->Name), $details_text);
     290                $details = sprintf( '<a href="%1$s" class="thickbox open-plugin-details-modal" title="%2$s" data-title="%2$s">%3$s</a>', esc_url( $details_url ), esc_attr( $plugin_data->Name ), $details_text );
    291291
    292292                echo "
    293293        <tr>
  • src/wp-includes/js/thickbox/thickbox.css

     
    4343        float: right;
    4444}
    4545
    46 #TB_closeAjaxWindow {
    47         float: right;
     46#TB_closeWindowButton {
     47        position: absolute;
     48        left: auto;
     49        right: 0;
     50        width: 29px;
     51        height: 29px;
     52        border: 0;
     53        padding: 0;
     54        background: none;
     55        cursor: pointer;
     56        outline: none;
     57        -webkit-transition: color .1s ease-in-out, background .1s ease-in-out;
     58        transition: color .1s ease-in-out, background .1s ease-in-out;
    4859}
    4960
    50 #TB_closeAjaxWindow a {
    51         text-decoration: none;
    52 }
    53 
    5461#TB_ajaxWindowTitle {
    5562        float: left;
    5663        font-weight: 600;
    5764        line-height: 29px;
    58         overflow: hidden;
     65        overflow: hidden;
    5966        padding: 0 29px 0 10px;
    6067        text-overflow: ellipsis;
    6168        white-space: nowrap;
     
    115122}
    116123
    117124.tb-close-icon {
     125        display: block;
    118126        color: #666;
    119127        text-align: center;
    120128        line-height: 29px;
     
    133141        -moz-osx-font-smoothing: grayscale;
    134142}
    135143
    136 .tb-close-icon:hover {
     144#TB_closeWindowButton:hover .tb-close-icon,
     145#TB_closeWindowButton:focus .tb-close-icon {
    137146        color: #00a0d2;
    138147}
  • src/wp-includes/js/thickbox/thickbox.js

     
    3434
    3535function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
    3636
     37        var $closeBtn;
     38
    3739        try {
    3840                if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
    3941                        jQuery("body","html").css({height: "100%", width: "100%"});
     
    130132
    131133                        TB_WIDTH = imageWidth + 30;
    132134                        TB_HEIGHT = imageHeight + 60;
    133                         jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><div class='tb-close-icon'></div></a></div>");
     135                        jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div>");
    134136
    135137                        jQuery("#TB_closeWindowButton").click(tb_remove);
    136138
     
    195197                                        urlNoQuery = url.split('TB_');
    196198                                        jQuery("#TB_iframeContent").remove();
    197199                                        if(params['modal'] != "true"){//iframe no modal
    198                                                 jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><div class='tb-close-icon'></div></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
     200                                                jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
    199201                                        }else{//iframe modal
    200202                                        jQuery("#TB_overlay").unbind();
    201                                                 jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
     203                                                jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
    202204                                        }
    203205                        }else{// not an iframe, ajax
    204206                                        if(jQuery("#TB_window").css("visibility") != "visible"){
     
    252254                        });
    253255                }
    254256
     257                $closeBtn = jQuery( '#TB_closeWindowButton' );
     258                /*
     259                 * If the native Close button icon is visible, move focus on the button (e.g. in the Network Admin Themes screen).
     260                 * In other admin screens is hidden and replaced by a different icon.
     261                 */
     262                if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) {
     263                        $closeBtn.focus();
     264                }
     265
    255266        } catch(e) {
    256267                //nothing here
    257268        }
     
    260271//helper functions below
    261272function tb_showIframe(){
    262273        jQuery("#TB_load").remove();
    263         jQuery("#TB_window").css({'visibility':'visible'});
     274        jQuery("#TB_window").css({'visibility':'visible'}).trigger( 'thickbox:iframe:loaded' );
    264275}
    265276
    266277function tb_remove() {
  • src/wp-includes/script-loader.php

     
    564564                        'error' => __('Error while saving the changes.')
    565565                ) );
    566566
    567                 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), false, 1 );
     567                $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox' ), false, 1 );
    568568                did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array(
    569                         'plugin_information' => __('Plugin Information:'),
     569                        'plugin_information' => __( 'Plugin:' ),
     570                        'plugin_modal_label' => __( 'Plugin details'),
    570571                        'ays' => __('Are you sure you want to install this plugin?')
    571572                ) );
    572573