Ticket #33305: 33305.patch
File 33305.patch, 24.0 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/common.css
2684 2684 display: none; 2685 2685 } 2686 2686 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 { 2693 2692 right: -30px; 2694 2693 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;2697 2694 } 2698 2695 2696 body.plugin-install-php #TB_closeWindowButton:hover, 2699 2697 body.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, 2698 body.import-php #TB_closeWindowButton:hover, 2703 2699 body.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, 2700 body.plugins-php #TB_closeWindowButton:hover, 2707 2701 body.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, 2702 body.update-core-php #TB_closeWindowButton:hover, 2711 2703 body.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 { 2704 body.index-php #TB_closeWindowButton:hover, 2705 body.index-php #TB_closeWindowButton:focus { 2719 2706 color: #00a0d2; 2720 2707 outline: none; 2721 2708 -webkit-box-shadow: none; … … 2722 2709 box-shadow: none; 2723 2710 } 2724 2711 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 { 2712 body.plugin-install-php .tb-close-icon, 2713 body.import-php .tb-close-icon, 2714 body.plugins-php .tb-close-icon, 2715 body.update-core-php .tb-close-icon, 2716 body.index-php .tb-close-icon { 2717 display: none; 2718 } 2719 2720 body.plugin-install-php #TB_closeWindowButton:after, 2721 body.import-php #TB_closeWindowButton:after, 2722 body.plugins-php #TB_closeWindowButton:after, 2723 body.update-core-php #TB_closeWindowButton:after, 2724 body.index-php #TB_closeWindowButton:after { 2730 2725 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; 2732 2730 } 2733 2731 2734 2732 /* move plugin install close icon to top on narrow screens */ 2735 2733 @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 { 2741 2739 right: 0; 2742 2740 top: -30px; 2743 2741 } -
src/wp-admin/import.php
96 96 if ( empty($action) ) { 97 97 if ( is_main_site() ) { 98 98 $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>'; 101 101 } else { 102 102 $action = $data[0]; 103 103 $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
465 465 '&TB_iframe=true&width=600&height=550' ); 466 466 467 467 /* 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>'; 469 469 470 470 if ( !empty( $plugin['icons']['svg'] ) ) { 471 471 $plugin_icon_url = $plugin['icons']['svg']; … … 492 492 ?> 493 493 <div class="plugin-card plugin-card-<?php echo sanitize_html_class( $plugin['slug'] ); ?>"> 494 494 <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> 496 496 <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> 498 498 </div> 499 499 <div class="action-links"> 500 500 <?php -
src/wp-admin/includes/class-wp-plugins-list-table.php
631 631 632 632 // Details link using API info, if available 633 633 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>', 635 635 esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] . 636 636 '&TB_iframe=true&width=600&height=550' ) ), 637 637 esc_attr( sprintf( __( 'More information about %s' ), $plugin_name ) ), -
src/wp-admin/includes/dashboard.php
1174 1174 $title = esc_html( $item->get_title() ); 1175 1175 1176 1176 $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800'; 1177 echo "<li class='dashboard-news-plugin'><span>" . __( 'Popular Plugin' ) . ":</span> <a href='$link' class='dashboard-news-plugin-link'>$title</a> <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> <span>(<a href='$ilink' class='thickbox open-plugin-details-modal' title='$title' data-title='" . esc_attr( $title ) . "'>" . __( 'Install' ) . "</a>)</span></li>"; 1178 1178 1179 1179 $feed->__destruct(); 1180 1180 unset( $feed ); -
src/wp-admin/includes/update.php
338 338 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">'; 339 339 340 340 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 ); 342 342 } 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 ); 344 344 } 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 ) ); 346 346 } 347 347 /** 348 348 * Fires at the end of the update message container in each … … 439 439 440 440 echo '<tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">'; 441 441 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 ); 443 443 } 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'] ); 445 445 } 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 ) ); 447 447 } 448 448 /** 449 449 * Fires at the end of the update message container in each -
src/wp-admin/js/plugin-install.js
3 3 /* Plugin Browser Thickbox related JS*/ 4 4 var tb_position; 5 5 jQuery( document ).ready( function( $ ) { 6 7 var tbWindow, 8 focusedBefore; 9 6 10 tb_position = function() { 7 var tbWindow = $( '#TB_window' ), 8 width = $( window ).width(), 11 var width = $( window ).width(), 9 12 H = $( window ).height() - ( ( 792 < width ) ? 60 : 20 ), 10 13 W = ( 792 < width ) ? 772 : width - 20; 11 14 15 tbWindow = $( '#TB_window' ); 16 12 17 if ( tbWindow.size() ) { 13 18 tbWindow.width( W ).height( H ); 14 19 $( '#TB_iframeContent' ).width( W ).height( H ); … … 38 43 tb_position(); 39 44 }); 40 45 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 42 105 tb_click.call(this); 43 106 44 $('#TB_title').css({'background-color':'#23282d','color':'#cfcfcf'}); 45 $('#TB_ajaxWindowTitle').html( '<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(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 }); 48 113 114 tbWindow.find( '#TB_title' ).css({ 'background-color': '#23282d', 'color': '#cfcfcf' }); 115 tbWindow.find( '#TB_ajaxWindowTitle' ).html( '<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $( 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 49 122 return false; 50 123 }); 51 124 -
src/wp-admin/update-core.php
287 287 288 288 $details_url = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_data->update->slug . '§ion=changelog&TB_iframe=true&width=640&height=662'); 289 289 $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 ); 291 291 292 292 echo " 293 293 <tr> -
src/wp-includes/js/thickbox/thickbox.css
43 43 float: right; 44 44 } 45 45 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; 48 59 } 49 60 50 #TB_closeAjaxWindow a {51 text-decoration: none;52 }53 54 61 #TB_ajaxWindowTitle { 55 62 float: left; 56 63 font-weight: 600; 57 64 line-height: 29px; 58 overflow: hidden; 65 overflow: hidden; 59 66 padding: 0 29px 0 10px; 60 67 text-overflow: ellipsis; 61 68 white-space: nowrap; … … 115 122 } 116 123 117 124 .tb-close-icon { 125 display: block; 118 126 color: #666; 119 127 text-align: center; 120 128 line-height: 29px; … … 133 141 -moz-osx-font-smoothing: grayscale; 134 142 } 135 143 136 .tb-close-icon:hover { 144 #TB_closeWindowButton:hover .tb-close-icon, 145 #TB_closeWindowButton:focus .tb-close-icon { 137 146 color: #00a0d2; 138 147 } -
src/wp-includes/js/thickbox/thickbox.js
34 34 35 35 function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link 36 36 37 var $closeBtn; 38 37 39 try { 38 40 if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 39 41 jQuery("body","html").css({height: "100%", width: "100%"}); … … 130 132 131 133 TB_WIDTH = imageWidth + 30; 132 134 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>"); 134 136 135 137 jQuery("#TB_closeWindowButton").click(tb_remove); 136 138 … … 195 197 urlNoQuery = url.split('TB_'); 196 198 jQuery("#TB_iframeContent").remove(); 197 199 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>"); 199 201 }else{//iframe modal 200 202 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>"); 202 204 } 203 205 }else{// not an iframe, ajax 204 206 if(jQuery("#TB_window").css("visibility") != "visible"){ … … 252 254 }); 253 255 } 254 256 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 255 266 } catch(e) { 256 267 //nothing here 257 268 } … … 260 271 //helper functions below 261 272 function tb_showIframe(){ 262 273 jQuery("#TB_load").remove(); 263 jQuery("#TB_window").css({'visibility':'visible'}) ;274 jQuery("#TB_window").css({'visibility':'visible'}).trigger( 'thickbox:iframe:loaded' ); 264 275 } 265 276 266 277 function tb_remove() { -
src/wp-includes/script-loader.php
564 564 'error' => __('Error while saving the changes.') 565 565 ) ); 566 566 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 ); 568 568 did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array( 569 'plugin_information' => __('Plugin Information:'), 569 'plugin_information' => __( 'Plugin:' ), 570 'plugin_modal_label' => __( 'Plugin details'), 570 571 'ays' => __('Are you sure you want to install this plugin?') 571 572 ) ); 572 573