Ticket #18289: 18289.6.diff
File 18289.6.diff, 11.8 KB (added by , 13 years ago) |
---|
-
wp-admin/css/colors-classic.dev.css
156 156 background-color: #ccc; 157 157 } 158 158 /* #upload-menu li a.upload-tab-link, */ 159 #plugin-information .action-button a,160 #plugin-information .action-button a:hover,161 #plugin-information .action-button a:visited {159 body.plugin-install-plugin-information .action-button a, 160 body.plugin-install-plugin-information .action-button a:hover, 161 body.plugin-install-plugin-information .action-button a:visited { 162 162 color: #fff; 163 163 } 164 164 … … 575 575 -webkit-box-shadow: rgba(255,255,255,0.5) 0 1px 0; 576 576 box-shadow: rgba(255,255,255,0.5) 0 1px 0; 577 577 } 578 #plugin-information .action-button {578 body.plugin-install-plugin-information .action-button { 579 579 background-color: #d54e21; 580 580 color: #fff; 581 581 } … … 1638 1638 border-right: 1px solid #fff; 1639 1639 } 1640 1640 1641 #plugin-information .fyi ul {1641 body.plugin-install-plugin-information .fyi ul { 1642 1642 background-color: #eaf3fa; 1643 1643 } 1644 1644 1645 #plugin-information .fyi h2.mainheader {1645 body.plugin-install-plugin-information .fyi h2.mainheader { 1646 1646 background-color: #cee1ef; 1647 1647 } 1648 1648 1649 #plugin-information pre,1650 #plugin-information code {1649 body.plugin-install-plugin-information pre, 1650 body.plugin-install-plugin-information code { 1651 1651 background-color: #ededff; 1652 1652 } 1653 1653 1654 #plugin-information pre {1654 body.plugin-install-plugin-information pre { 1655 1655 border: 1px solid #ccc; 1656 1656 } 1657 1657 -
wp-admin/css/colors-fresh.dev.css
164 164 background-color: #ccc; 165 165 } 166 166 /* #upload-menu li a.upload-tab-link, */ 167 #plugin-information .action-button a,168 #plugin-information .action-button a:hover,169 #plugin-information .action-button a:visited {167 body.plugin-install-plugin-information .action-button a, 168 body.plugin-install-plugin-information .action-button a:hover, 169 body.plugin-install-plugin-information .action-button a:visited { 170 170 color: #fff; 171 171 } 172 172 … … 581 581 -webkit-box-shadow: rgba(255,255,255,0.5) 0 1px 0; 582 582 box-shadow: rgba(255,255,255,0.5) 0 1px 0; 583 583 } 584 #plugin-information .action-button {584 body.plugin-install-plugin-information .action-button { 585 585 background-color: #d54e21; 586 586 color: #fff; 587 587 } … … 1308 1308 border-right: 1px solid #f9f9f9; 1309 1309 } 1310 1310 1311 #plugin-information .fyi ul {1311 body.plugin-install-plugin-information .fyi ul { 1312 1312 background-color: #eaf3fa; 1313 1313 } 1314 1314 1315 #plugin-information .fyi h2.mainheader {1315 body.plugin-install-plugin-information .fyi h2.mainheader { 1316 1316 background-color: #cee1ef; 1317 1317 } 1318 1318 1319 #plugin-information pre,1320 #plugin-information code {1319 body.plugin-install-plugin-information pre, 1320 body.plugin-install-plugin-information code { 1321 1321 background-color: #ededff; 1322 1322 } 1323 1323 1324 #plugin-information pre {1324 body.plugin-install-plugin-information pre { 1325 1325 border: 1px solid #ccc; 1326 1326 } 1327 1327 -
wp-admin/css/wp-admin.dev.css
6342 6342 } 6343 6343 6344 6344 /* Header on thickbox */ 6345 #plugin-information-header {6345 body.plugin-install-plugin-information #plugin-information-header { 6346 6346 margin: 0; 6347 6347 padding: 0 5px; 6348 6348 font-weight: bold; … … 6351 6351 border-bottom-style: solid; 6352 6352 height: 2.5em; 6353 6353 } 6354 #plugin-information ul#sidemenu {6354 body.plugin-install-plugin-information ul#sidemenu { 6355 6355 font-weight: normal; 6356 6356 margin: 0 5px; 6357 6357 position: absolute; … … 6360 6360 } 6361 6361 6362 6362 /* Install sidemenu */ 6363 #plugin-information p.action-button {6363 body.plugin-install-plugin-information p.action-button { 6364 6364 width: 100%; 6365 6365 padding-bottom: 0; 6366 margin-bottom: 0;6367 6366 margin-top: 10px; 6368 6367 -webkit-border-top-left-radius: 3px; 6369 6368 -webkit-border-bottom-left-radius: 3px; … … 6371 6370 border-bottom-left-radius: 3px; 6372 6371 } 6373 6372 6374 #plugin-information .action-button a {6373 body.plugin-install-plugin-information .action-button a { 6375 6374 text-align: center; 6376 6375 font-weight: bold; 6377 6376 text-decoration: none; … … 6379 6378 line-height: 2em; 6380 6379 } 6381 6380 6382 #plugin-information h2 {6381 body.plugin-install-plugin-information h2 { 6383 6382 clear: none !important; 6384 6383 margin-right: 200px; 6385 6384 } 6386 6385 6387 #plugin-information .fyi {6386 body.plugin-install-plugin-information .fyi { 6388 6387 margin: 0 10px 50px; 6389 6388 width: 210px; 6390 6389 } 6391 6390 6392 #plugin-information .fyi h2 {6391 body.plugin-install-plugin-information .fyi h2 { 6393 6392 font-size: 0.9em; 6394 6393 margin-bottom: 0; 6395 6394 margin-right: 0; 6396 6395 } 6397 6396 6398 #plugin-information .fyi h2.mainheader {6397 body.plugin-install-plugin-information .fyi h2.mainheader { 6399 6398 padding: 5px; 6400 6399 -webkit-border-top-left-radius: 3px; 6401 6400 border-top-left-radius: 3px; 6402 6401 } 6403 6402 6404 #plugin-information .fyi ul {6403 body.plugin-install-plugin-information .fyi ul { 6405 6404 padding: 10px 5px 10px 7px; 6406 6405 margin: 0; 6407 6406 list-style: none; … … 6409 6408 border-bottom-left-radius: 3px; 6410 6409 } 6411 6410 6412 #plugin-information .fyi li {6411 body.plugin-install-plugin-information .fyi li { 6413 6412 margin-right: 0; 6414 6413 } 6415 6414 6416 #plugin-information #section-holder {6415 body.plugin-install-plugin-information #section-holder { 6417 6416 padding: 10px; 6418 6417 } 6419 6418 6420 #plugin-information .section ul,6421 #plugin-information .section ol {6419 body.plugin-install-plugin-information .section ul, 6420 body.plugin-install-plugin-information .section ol { 6422 6421 margin-left: 16px; 6423 6422 list-style-type: square; 6424 6423 list-style-image: none; 6425 6424 } 6426 6425 6427 #plugin-information #section-screenshots li img {6426 body.plugin-install-plugin-information #section-screenshots li img { 6428 6427 vertical-align: text-top; 6429 6428 } 6430 6429 6431 #plugin-information #section-screenshots li p {6430 body.plugin-install-plugin-information #section-screenshots li p { 6432 6431 font-style: italic; 6433 6432 padding-left: 20px; 6434 6433 padding-bottom: 2em; 6435 6434 } 6436 6435 6437 #plugin-information .updated,6438 #plugin-information pre {6436 body.plugin-install-plugin-information .updated, 6437 body.plugin-install-plugin-information pre { 6439 6438 margin-right: 215px; 6440 6439 } 6441 6440 6442 #plugin-information pre {6441 body.plugin-install-plugin-information pre { 6443 6442 padding: 7px; 6444 6443 overflow: auto; 6445 6444 } -
wp-admin/includes/class-wp-plugin-install-list-table.php
26 26 27 27 // These are the tabs which are shown on the page 28 28 $tabs = array(); 29 30 if ( 'plugin-information' == $tab && ( ! defined('IFRAME_REQUEST') || ! IFRAME_REQUEST ) ) 31 $tabs['plugin-information'] = __('Plugin Information'); 32 29 33 $tabs['dashboard'] = __( 'Search' ); 30 34 if ( 'search' == $tab ) 31 35 $tabs['search'] = __( 'Search Results' ); … … 104 108 foreach ( (array) $tabs as $action => $text ) { 105 109 $class = ( $action == $tab ) ? ' class="current"' : ''; 106 110 $href = self_admin_url('plugin-install.php?tab=' . $action); 111 if ( 'plugin-information' == $action ) 112 $href = add_query_arg('plugin', $_REQUEST['plugin'], $href); 107 113 $display_tabs['plugin-install-'.$action] = "<a href='$href'$class>$text</a>"; 108 114 } 109 115 -
wp-admin/includes/plugin-install.php
237 237 * 238 238 * @since 2.7.0 239 239 */ 240 function install_plugin_information( ) {240 function install_plugin_information($api) { 241 241 global $tab; 242 242 243 $api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) ));244 245 243 if ( is_wp_error($api) ) 246 244 wp_die($api); 247 245 … … 263 261 if ( empty($section) || ! isset($api->sections[ $section ]) ) 264 262 $section = array_shift( $section_titles = array_keys((array)$api->sections) ); 265 263 266 iframe_header( __('Plugin Install') );267 264 echo "<div id='$tab-header'>\n"; 268 265 echo "<ul id='sidemenu'>\n"; 269 266 foreach ( (array)$api->sections as $section_name => $content ) { … … 365 362 } 366 363 echo "</div>\n"; 367 364 365 } 366 367 function install_plugin_information_iframe() { 368 $api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) )); 369 370 iframe_header( __('Plugin Install') ); 371 install_plugin_information($api); 368 372 iframe_footer(); 369 373 exit; 370 374 } 371 add_action('install_plugins_pre_plugin-information', 'install_plugin_information'); 375 376 function install_plugin_information_direct() { 377 static $api = null; // First call on install_plugins_pre_plugin-information sets up the $api and sets the page title. 378 if ( $api ) // Second call on install_plugins_plugin-information is the content to display 379 return install_plugin_information($api); 380 381 $api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) )); 382 383 if ( $api && ! is_wp_error($api) ) { 384 /* translators: 1: Plugin Name 2: Plugin Version */ 385 $GLOBALS['title'] = sprintf( __('Plugin Information: %1$s %2$s'), strip_tags($api->name), strip_tags($api->version) ); 386 } 387 } 388 389 if ( isset($_GET['iframe']) ) { 390 add_action('install_plugins_pre_plugin-information', 'install_plugin_information_iframe'); 391 } else { 392 add_action('install_plugins_pre_plugin-information', 'install_plugin_information_direct'); 393 add_action('install_plugins_plugin-information', 'install_plugin_information_direct'); 394 } -
wp-admin/includes/template.php
1348 1348 * 1349 1349 */ 1350 1350 function iframe_header( $title = '', $limit_styles = false ) { 1351 show_admin_bar( false ); 1351 1352 1352 global $hook_suffix, $current_screen, $current_user, $admin_body_class, $wp_locale; 1353 1353 $admin_body_class = preg_replace('/[^a-z0-9_-]+/i', '-', $hook_suffix); 1354 1354 -
wp-admin/js/plugin-install.dev.js
27 27 28 28 $(window).resize(function(){ tb_position(); }); 29 29 30 $('#dashboard_plugins a.thickbox, .plugins a.thickbox').click( function() { 30 $('#dashboard_plugins a.thickbox, body.plugin-install-php a.thickbox').click( function() { 31 this.href = this.href.replace('?', '?iframe=1&'); 31 32 tb_click.call(this); 33 this.href = this.href.replace('?iframe=1&', '?'); 32 34 33 35 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); 34 36 $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).attr('title') ); … … 36 38 }); 37 39 38 40 /* Plugin install related JS*/ 39 $('#plugin-information #sidemenu a').click( function() {41 $('#plugin-information-header #sidemenu a').click( function() { 40 42 var tab = $(this).attr('name'); 41 43 //Flip the tab 42 44 $('#plugin-information-header a.current').removeClass('current'); -
wp-admin/plugin-install.php
6 6 * @subpackage Administration 7 7 */ 8 8 // TODO route this pages via a specific iframe handler instead of the do_action below 9 if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) )9 if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && isset( $_GET['iframe'] ) && ( 'plugin-information' == $_GET['tab'] ) ) 10 10 define( 'IFRAME_REQUEST', true ); 11 11 12 12 /** WordPress Administration Bootstrap */ … … 31 31 if ( 'plugin-information' != $tab ) 32 32 add_thickbox(); 33 33 34 $body_id = $tab; 34 function plugin_install_body_class($classes) { 35 global $tab; 36 return "$classes plugin-install-$tab"; 37 } 38 add_filter('admin_body_class', 'plugin_install_body_class'); 35 39 36 40 do_action('install_plugins_pre_' . $tab); //Used to override the general interface, Eg, install or plugin information. 37 41