Ticket #33305: 33305.2.patch
File 33305.2.patch, 25.2 KB (added by , 9 years ago) |
---|
-
src/wp-admin/about.php
139 139 'height' => 550 140 140 ); 141 141 142 $plugin_link = '<a href="' . esc_url( add_query_arg( $url_args, network_admin_url( 'plugin-install.php' ) ) ) . '" class="thickbox ">WordPress REST API</a>';142 $plugin_link = '<a href="' . esc_url( add_query_arg( $url_args, network_admin_url( 'plugin-install.php' ) ) ) . '" class="thickbox open-plugin-details-modal">WordPress REST API</a>'; 143 143 } else { 144 144 $plugin_link = '<a href="https://wordpress.org/plugins/rest-api">WordPress REST API</a>'; 145 145 } -
src/wp-admin/css/common.css
2837 2837 display: none; 2838 2838 } 2839 2839 2840 body.about-php .tb-close-icon, 2841 body.plugin-install-php .tb-close-icon, 2842 body.import-php .tb-close-icon, 2843 body.plugins-php .tb-close-icon, 2844 body.update-core-php .tb-close-icon, 2845 body.index-php .tb-close-icon { 2840 /* only on these screens */ 2841 .about-php #TB_closeWindowButton, 2842 .plugin-install-php #TB_closeWindowButton, 2843 .import-php #TB_closeWindowButton, 2844 .plugins-php #TB_closeWindowButton, 2845 .update-core-php #TB_closeWindowButton, 2846 .index-php #TB_closeWindowButton { 2846 2847 left: auto; 2847 2848 right: -30px; 2848 2849 color: #eee; 2849 -webkit-transition: color .1s ease-in-out, background .1s ease-in-out;2850 transition: color .1s ease-in-out, background .1s ease-in-out;2851 2850 } 2852 2851 2852 2853 body.about-php #TB_closeWindowButton:hover, 2853 2854 body.about-php #TB_closeWindowButton:focus, 2854 body.about-php #TB_closeWindowButton:focus .tb-close-icon, 2855 body.about-php .tb-close-icon:focus, 2856 body.about-php .tb-close-icon:hover, 2855 body.plugin-install-php #TB_closeWindowButton:hover, 2857 2856 body.plugin-install-php #TB_closeWindowButton:focus, 2858 body.plugin-install-php #TB_closeWindowButton:focus .tb-close-icon, 2859 body.plugin-install-php .tb-close-icon:focus, 2860 body.plugin-install-php .tb-close-icon:hover, 2857 body.import-php #TB_closeWindowButton:hover, 2861 2858 body.import-php #TB_closeWindowButton:focus, 2862 body.import-php #TB_closeWindowButton:focus .tb-close-icon, 2863 body.import-php .tb-close-icon:focus, 2864 body.import-php .tb-close-icon:hover, 2859 body.plugins-php #TB_closeWindowButton:hover, 2865 2860 body.plugins-php #TB_closeWindowButton:focus, 2866 body.plugins-php #TB_closeWindowButton:focus .tb-close-icon, 2867 body.plugins-php .tb-close-icon:focus, 2868 body.plugins-php .tb-close-icon:hover, 2861 body.update-core-php #TB_closeWindowButton:hover, 2869 2862 body.update-core-php #TB_closeWindowButton:focus, 2870 body.update-core-php #TB_closeWindowButton:focus .tb-close-icon, 2871 body.update-core-php .tb-close-icon:focus, 2872 body.update-core-php .tb-close-icon:hover, 2873 body.index-php #TB_closeWindowButton:focus, 2874 body.index-php #TB_closeWindowButton:focus .tb-close-icon, 2875 body.index-php .tb-close-icon:focus, 2876 body.index-php .tb-close-icon:hover { 2863 body.index-php #TB_closeWindowButton:hover, 2864 body.index-php #TB_closeWindowButton:focus { 2877 2865 color: #00a0d2; 2878 2866 outline: none; 2879 2867 -webkit-box-shadow: none; … … 2880 2868 box-shadow: none; 2881 2869 } 2882 2870 2883 body.about-php .tb-close-icon:before, 2884 body.plugin-install-php .tb-close-icon:before, 2885 body.import-php .tb-close-icon:before, 2886 body.plugins-php .tb-close-icon:before, 2887 body.update-core-php .tb-close-icon:before, 2888 body.index-php .tb-close-icon:before { 2871 body.about-php .tb-close-icon, 2872 body.plugin-install-php .tb-close-icon, 2873 body.import-php .tb-close-icon, 2874 body.plugins-php .tb-close-icon, 2875 body.update-core-php .tb-close-icon, 2876 body.index-php .tb-close-icon { 2877 display: none; 2878 } 2879 2880 body.about-php #TB_closeWindowButton:after, 2881 body.plugin-install-php #TB_closeWindowButton:after, 2882 body.import-php #TB_closeWindowButton:after, 2883 body.plugins-php #TB_closeWindowButton:after, 2884 body.update-core-php #TB_closeWindowButton:after, 2885 body.index-php #TB_closeWindowButton:after { 2889 2886 content: "\f335"; 2890 font-size: 32px; 2887 font: normal 32px/29px 'dashicons'; 2888 speak: none; 2889 -webkit-font-smoothing: antialiased; 2890 -moz-osx-font-smoothing: grayscale; 2891 2891 } 2892 2892 2893 2893 /* move plugin install close icon to top on narrow screens */ 2894 2894 @media screen and ( max-width: 830px ) { 2895 body.about-php .tb-close-icon,2896 body.plugin-install-php .tb-close-icon,2897 body.import-php .tb-close-icon,2898 body.plugins-php .tb-close-icon,2899 body.update-core-php .tb-close-icon,2900 body.index-php .tb-close-icon {2895 body.about-php #TB_closeWindowButton, 2896 body.plugin-install-php #TB_closeWindowButton, 2897 body.import-php #TB_closeWindowButton, 2898 body.plugins-php #TB_closeWindowButton, 2899 body.update-core-php #TB_closeWindowButton, 2900 body.index-php #TB_closeWindowButton { 2901 2901 right: 0; 2902 2902 top: -30px; 2903 2903 } -
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="' .99 '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox open-plugin-details-modal" title="' . 100 100 esc_attr__('Install importer') . '">' . $data[0] . '</a>'; 101 101 } else { 102 102 $action = $data[0]; -
src/wp-admin/includes/class-wp-plugin-install-list-table.php
476 476 '&TB_iframe=true&width=600&height=550' ); 477 477 478 478 /* translators: 1: Plugin name and version. */ 479 $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>';479 $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>'; 480 480 481 481 if ( !empty( $plugin['icons']['svg'] ) ) { 482 482 $plugin_icon_url = $plugin['icons']['svg']; … … 505 505 <div class="plugin-card-top"> 506 506 <div class="name column-name"> 507 507 <h3> 508 <a href="<?php echo esc_url( $details_link ); ?>" class="thickbox ">508 <a href="<?php echo esc_url( $details_link ); ?>" class="thickbox open-plugin-details-modal"> 509 509 <?php echo $title; ?> 510 510 <img src="<?php echo esc_attr( $plugin_icon_url ) ?>" class="plugin-icon" alt=""> 511 511 </a> -
src/wp-admin/includes/class-wp-plugins-list-table.php
740 740 741 741 // Details link using API info, if available 742 742 if ( isset( $plugin_data['slug'] ) && current_user_can( 'install_plugins' ) ) { 743 $plugin_meta[] = sprintf( '<a href="%s" class="thickbox " aria-label="%s" data-title="%s">%s</a>',743 $plugin_meta[] = sprintf( '<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>', 744 744 esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_data['slug'] . 745 745 '&TB_iframe=true&width=600&height=550' ) ), 746 746 esc_attr( sprintf( __( 'More information about %s' ), $plugin_name ) ), -
src/wp-admin/includes/dashboard.php
1208 1208 1209 1209 $ilink = wp_nonce_url('plugin-install.php?tab=plugin-information&plugin=' . $slug, 'install-plugin_' . $slug) . '&TB_iframe=true&width=600&height=800'; 1210 1210 echo '<li class="dashboard-news-plugin"><span>' . __( 'Popular Plugin' ) . ':</span> ' . esc_html( $raw_title ) . 1211 ' <a href="' . $ilink . '" class="thickbox " aria-label="' .1211 ' <a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' . 1212 1212 /* translators: %s: plugin name */ 1213 1213 esc_attr( sprintf( __( 'Install %s' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>'; 1214 1214 -
src/wp-admin/includes/update.php
339 339 340 340 if ( ! current_user_can( 'update_plugins' ) ) { 341 341 /* translators: 1: plugin name, 2: details URL, 3: escaped plugin name, 4: version number */ 342 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox " aria-label="View %3$s version %4$s details">View version %4$s details</a>.' ),342 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="View %3$s version %4$s details">View version %4$s details</a>.' ), 343 343 $plugin_name, 344 344 esc_url( $details_url ), 345 345 esc_attr( $plugin_name ), … … 347 347 ); 348 348 } elseif ( empty( $r->package ) ) { 349 349 /* translators: 1: plugin name, 2: details URL, 3: escaped plugin name, 4: version number */ 350 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox " aria-label="View %3$s version %4$s details">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ),350 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="View %3$s version %4$s details">View version %4$s details</a>. <em>Automatic update is unavailable for this plugin.</em>' ), 351 351 $plugin_name, 352 352 esc_url( $details_url ), 353 353 esc_attr( $plugin_name ), … … 355 355 ); 356 356 } else { 357 357 /* translators: 1: plugin name, 2: details URL, 3: escaped plugin name, 4: version number, 5: update URL */ 358 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox " aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="update %3$s now">update now</a>.' ),358 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="update %3$s now">update now</a>.' ), 359 359 $plugin_name, 360 360 esc_url( $details_url ), 361 361 esc_attr( $plugin_name ), … … 461 461 echo '<tr class="plugin-update-tr' . $active . '" id="' . esc_attr( $theme->get_stylesheet() . '-update' ) . '" data-slug="' . esc_attr( $theme->get_stylesheet() ) . '"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange"><div class="update-message">'; 462 462 if ( ! current_user_can('update_themes') ) { 463 463 /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number */ 464 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox " aria-label="View %3$s version %4$s details">View version %4$s details</a>.'),464 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="View %3$s version %4$s details">View version %4$s details</a>.'), 465 465 $theme['Name'], 466 466 esc_url( $details_url ), 467 467 esc_attr( $theme['Name'] ), … … 469 469 ); 470 470 } elseif ( empty( $r['package'] ) ) { 471 471 /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number */ 472 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox " aria-label="View %3$s version %4$s details">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ),472 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="View %3$s version %4$s details">View version %4$s details</a>. <em>Automatic update is unavailable for this theme.</em>' ), 473 473 $theme['Name'], 474 474 esc_url( $details_url ), 475 475 esc_attr( $theme['Name'] ), … … 477 477 ); 478 478 } else { 479 479 /* translators: 1: theme name, 2: details URL, 3: escaped theme name, 4: version number, 5: update URL */ 480 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox " aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="update %3$s now">update now</a>.' ),480 printf( __( 'There is a new version of %1$s available. <a href="%2$s" class="thickbox open-plugin-details-modal" aria-label="View %3$s version %4$s details">View version %4$s details</a> or <a href="%5$s" class="update-link" aria-label="update %3$s now">update now</a>.' ), 481 481 $theme['Name'], 482 482 esc_url( $details_url ), 483 483 esc_attr( $theme['Name'] ), -
src/wp-admin/js/plugin-install.js
1 /* global plugininstallL10n, tb_click */1 /* global plugininstallL10n, tb_click, tb_remove */ 2 2 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 $iframeBody, 10 $tabbables, 11 $firstTabbable, 12 $lastTabbable; 13 6 14 tb_position = function() { 7 var tbWindow = $( '#TB_window' ), 8 width = $( window ).width(), 15 var width = $( window ).width(), 9 16 H = $( window ).height() - ( ( 792 < width ) ? 60 : 20 ), 10 17 W = ( 792 < width ) ? 772 : width - 20; 11 18 19 tbWindow = $( '#TB_window' ); 20 12 21 if ( tbWindow.length ) { 13 22 tbWindow.width( W ).height( H ); 14 23 $( '#TB_iframeContent' ).width( W ).height( H ); … … 38 47 tb_position(); 39 48 }); 40 49 41 $( '.plugin-card, .plugins .plugin-version-author-uri' ).on( 'click', 'a.thickbox', function( e ) { 50 $( 'body' ).on( 'thickbox:iframe:loaded', tbWindow, function() { 51 iframeLoaded(); 52 }); 53 54 function iframeLoaded() { 55 var $iframe = tbWindow.find( '#TB_iframeContent' ); 56 57 // Iframe has loaded now, remove the ARIA busy state. 58 $iframe.attr( 'aria-busy', 'false' ); 59 60 // Get the iframe body. 61 $iframeBody = $iframe.contents().find( 'body' ); 62 63 /* 64 * Get the tabbable elements and handle the keydown event on first load. 65 */ 66 handleTabbables(); 67 68 // Set initial focus on the "Close" button. 69 $firstTabbable.focus(); 70 71 /* 72 * When the "Install" button is disabled (e.g. the Plugin is already installed) 73 * then we can't predict where the last focusable element is. We need to get 74 * the tabbable elements and handle the keydown event again and again, 75 * each time the active tab panel changes. 76 */ 77 $( '#plugin-information-tabs a', $iframeBody ).on( 'click', function() { 78 handleTabbables(); 79 }); 80 81 // Close the modal when pressing Escape. 82 $iframeBody.on( 'keydown', function( event ) { 83 if ( 27 !== event.which ) { 84 return; 85 } 86 87 tb_remove(); 88 // Set focus back to the element that opened the modal dialog. 89 focusedBefore.focus(); 90 }); 91 92 // Set focus back also when activating the Close button. 93 $firstTabbable.on( 'click', function() { 94 focusedBefore.focus(); 95 }); 96 } 97 98 /* 99 * Get the tabbable elements and detach/attach the keydown event. 100 * Called after the iframe has fully loaded so we have all the elements we need. 101 * Called again each time a Tab gets clicked. 102 * @todo Consider to implement a WordPress general utility for this and don't use jQuery UI. 103 */ 104 function handleTabbables() { 105 var $firstAndLast; 106 // Get all the tabbable elements. 107 $tabbables = $( ':tabbable', $iframeBody ); 108 // Our first tabbable element is always the "Close" button. 109 $firstTabbable = tbWindow.find( '#TB_closeWindowButton' ); 110 // Get the last tabbable element. 111 $lastTabbable = $tabbables.last(); 112 // Make a jQuery collection. 113 $firstAndLast = $firstTabbable.add( $lastTabbable ); 114 // Detach any previously attached keydown event. 115 $firstAndLast.off( 'keydown.wp-plugin-details' ); 116 // Attach again the keydown event on the first and last focusable elements. 117 $firstAndLast.on( 'keydown.wp-plugin-details', function( event ) { 118 constrainTabbing( event ); 119 }); 120 } 121 122 // Constrain tabbing within the plugin modal dialog. 123 function constrainTabbing( event ) { 124 if ( 9 !== event.which ) { 125 return; 126 } 127 128 if ( $lastTabbable[0] === event.target && ! event.shiftKey ) { 129 event.preventDefault(); 130 $firstTabbable.focus(); 131 } else if ( $firstTabbable[0] === event.target && event.shiftKey ) { 132 event.preventDefault(); 133 $lastTabbable.focus(); 134 } 135 } 136 137 // Open the Plugin details modal. 138 $( '.thickbox.open-plugin-details-modal' ).on( 'click', function( e ) { 42 139 e.preventDefault(); 43 140 e.stopPropagation(); 44 141 142 // Store the element that has focus before opening the modal dialog, i.e. the control which opens it. 143 focusedBefore = document.activeElement; 144 45 145 tb_click.call(this); 46 146 47 $('#TB_title').css({'background-color':'#23282d','color':'#cfcfcf'}); 48 $('#TB_ajaxWindowTitle').html( '<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).data( 'title' ) ); 49 $('#TB_iframeContent').attr( 'title', plugininstallL10n.plugin_information + ' ' + $(this).data( 'title' ) ); 50 $('#TB_closeWindowButton').focus(); 147 // Set ARIA role and ARIA label. 148 tbWindow.attr({ 149 'role': 'dialog', 150 'aria-label': plugininstallL10n.plugin_modal_label 151 }); 152 153 tbWindow.find( '#TB_title' ).css({ 'background-color': '#23282d', 'color': '#cfcfcf' }); 154 tbWindow.find( '#TB_ajaxWindowTitle' ).html( '<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $( this ).data( 'title' ) ); 155 // Set title and ARIA busy state on the iframe. 156 tbWindow.find( '#TB_iframeContent' ).attr({ 157 'title': plugininstallL10n.plugin_information + ' ' + $( this ).data( 'title' ), 158 'aria-busy': 'true' 159 }); 51 160 }); 52 161 53 162 /* Plugin install related JS */ -
src/wp-admin/update-core.php
284 284 $details_name = sprintf( '<span class="screen-reader-text">%1$s</span>', esc_attr( $plugin_data->Name ) ); 285 285 /* translators: 1: Plugin name 2: Plugin version */ 286 286 $details_text = sprintf( __( 'View %1$s version %2$s details.' ), $details_name, $plugin_data->update->new_version ); 287 $details = sprintf( '<a href="%1$s" class="thickbox ">%2$s</a>', esc_url( $details_url ), $details_text );287 $details = sprintf( '<a href="%1$s" class="thickbox open-plugin-details-modal">%2$s</a>', esc_url( $details_url ), $details_text ); 288 288 $checkbox_id = "checkbox_" . md5( $plugin_data->Name ); 289 289 ?> 290 290 <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; … … 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
41 41 42 42 function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link 43 43 44 var $closeBtn; 45 44 46 try { 45 47 if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 46 48 jQuery("body","html").css({height: "100%", width: "100%"}); … … 137 139 138 140 TB_WIDTH = imageWidth + 30; 139 141 TB_HEIGHT = imageHeight + 60; 140 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>");142 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>"); 141 143 142 144 jQuery("#TB_closeWindowButton").click(tb_remove); 143 145 … … 202 204 urlNoQuery = url.split('TB_'); 203 205 jQuery("#TB_iframeContent").remove(); 204 206 if(params['modal'] != "true"){//iframe no modal 205 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' 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>");207 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>"); 206 208 }else{//iframe modal 207 209 jQuery("#TB_overlay").unbind(); 208 jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allow Transparency='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>");210 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>"); 209 211 } 210 212 }else{// not an iframe, ajax 211 213 if(jQuery("#TB_window").css("visibility") != "visible"){ … … 259 261 }); 260 262 } 261 263 264 $closeBtn = jQuery( '#TB_closeWindowButton' ); 265 /* 266 * If the native Close button icon is visible, move focus on the button 267 * (e.g. in the Network Admin Themes screen). 268 * In other admin screens is hidden and replaced by a different icon. 269 */ 270 if ( $closeBtn.find( '.tb-close-icon' ).is( ':visible' ) ) { 271 $closeBtn.focus(); 272 } 273 262 274 } catch(e) { 263 275 //nothing here 264 276 } -
src/wp-includes/script-loader.php
576 576 'saved' => __( 'Changes saved.' ), 577 577 ) ); 578 578 579 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', ' thickbox' ), false, 1 );579 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox' ), false, 1 ); 580 580 did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array( 581 'plugin_information' => __('Plugin Information:'), 581 'plugin_information' => __( 'Plugin:' ), 582 + 'plugin_modal_label' => __( 'Plugin details' ), 582 583 'ays' => __('Are you sure you want to install this plugin?') 583 584 ) ); 584 585