Ticket #18289: 18289.4.diff
File 18289.4.diff, 28.3 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/plugin-install.php
233 233 } 234 234 235 235 /** 236 * Display plugin information in dialog box form.236 * Display plugin information in the admin chrome. 237 237 * 238 238 * @since 2.7.0 239 239 */ … … 262 262 $section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English. 263 263 if ( empty($section) || ! isset($api->sections[ $section ]) ) 264 264 $section = array_shift( $section_titles = array_keys((array)$api->sections) ); 265 ?> 266 <div id="plugin-information"> 267 <h2><?php echo $api->name; ?></h2> 268 <?php 269 if ( !empty($api->tested) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>') ) 270 echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>'; 265 271 266 iframe_header( __('Plugin Install') ); 267 echo "<div id='$tab-header'>\n"; 268 echo "<ul id='sidemenu'>\n"; 269 foreach ( (array)$api->sections as $section_name => $content ) { 272 else if ( !empty($api->requires) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<') ) 273 echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>'; 274 ?> 275 <div id="col-container"> 276 <div id="col-right"> 277 <div class="col-wrap"> 278 <h3 class="nav-tab-wrapper"> 279 <?php 280 foreach ( (array)$api->sections as $section_name => $content ) { 281 $title = $section_name; 282 $title = ucwords(str_replace('_', ' ', $title)); 270 283 271 $title = $section_name; 272 $title = ucwords(str_replace('_', ' ', $title)); 284 $class = ( $section_name == $section ) ? 'nav-tab nav-tab-active' : 'nav-tab'; 285 $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) ); 286 $href = esc_url($href); 287 $san_title = esc_attr(sanitize_title_with_dashes($title)); 288 echo "\t<a name='$san_title' target='' href='$href' class='$class'>$title</a>\n"; 289 } 290 ?> 291 </h3> 292 <?php 293 foreach ( (array)$api->sections as $section_name => $content ) { 294 $title = ucfirst( $section_name ); 295 $title = ucwords(str_replace('_', ' ', $title)); 296 297 $content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/'); 298 $content = links_add_target($content, '_blank'); 273 299 274 $class = ( $section_name == $section ) ? ' class="current"' : ''; 275 $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) ); 276 $href = esc_url($href); 277 $san_title = esc_attr(sanitize_title_with_dashes($title)); 278 echo "\t<li><a name='$san_title' target='' href='$href'$class>$title</a></li>\n"; 279 } 280 echo "</ul>\n"; 281 echo "</div>\n"; 300 $san_title = esc_attr(sanitize_title_with_dashes($title)); 301 302 $display = ( $section_name == $section ) ? 'block' : 'none'; 303 304 echo "\t<div id='section-{$san_title}' class='section' style='display: {$display};'>\n"; 305 echo $content; 306 echo "\t</div>\n"; 307 } 308 ?> 309 </div> 310 </div> 311 <div id="col-left"> 312 <div class="col-wrap"> 313 <h3 class="mainheader"><?php /* translators: For Your Information */ _e('FYI') ?></h3> 314 <ul> 315 <?php if ( ! empty($api->version) ) : ?> 316 <li><strong><?php _e('Version:') ?></strong> <?php echo $api->version ?></li> 317 <?php endif; if ( ! empty($api->author) ) : ?> 318 <li><strong><?php _e('Author:') ?></strong> <?php echo links_add_target($api->author, '_blank') ?></li> 319 <?php endif; if ( ! empty($api->last_updated) ) : ?> 320 <li><strong><?php _e('Last Updated:') ?></strong> <span title="<?php echo $api->last_updated ?>"><?php 321 printf( __('%s ago'), human_time_diff(strtotime($api->last_updated)) ) ?></span></li> 322 <?php endif; if ( ! empty($api->requires) ) : ?> 323 <li><strong><?php _e('Requires WordPress Version:') ?></strong> <?php printf(__('%s or higher'), $api->requires) ?></li> 324 <?php endif; if ( ! empty($api->tested) ) : ?> 325 <li><strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?></li> 326 <?php endif; if ( ! empty($api->downloaded) ) : ?> 327 <li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li> 328 <?php endif; if ( ! empty($api->slug) && empty($api->external) ) : ?> 329 <li><a target="_blank" href="http://wordpress.org/extend/plugins/<?php echo $api->slug ?>/"><?php _e('WordPress.org Plugin Page »') ?></a></li> 330 <?php endif; if ( ! empty($api->homepage) ) : ?> 331 <li><a target="_blank" href="<?php echo $api->homepage ?>"><?php _e('Plugin Homepage »') ?></a></li> 332 <?php endif; ?> 333 </ul> 334 <?php if ( ! empty($api->rating) ) : ?> 335 <h3><?php _e('Average Rating') ?></h3> 336 <div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>"> 337 <div class="star star-rating" style="width: <?php echo esc_attr($api->rating) ?>px"></div> 338 <div class="star star5"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('5 stars') ?>" /></div> 339 <div class="star star4"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('4 stars') ?>" /></div> 340 <div class="star star3"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('3 stars') ?>" /></div> 341 <div class="star star2"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('2 stars') ?>" /></div> 342 <div class="star star1"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('1 star') ?>" /></div> 343 </div> 344 <small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small> 345 <?php endif; ?> 346 <?php if ( ! empty($api->download_link) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) : ?> 347 <p class="action-button"> 348 <?php 349 $status = install_plugin_install_status($api); 350 switch ( $status['status'] ) { 351 case 'install': 352 if ( $status['url'] ) 353 echo '<a class="button-primary" href="' . $status['url'] . '" target="_parent">' . __('Install Now') . '</a>'; 354 break; 355 case 'update_available': 356 if ( $status['url'] ) 357 echo '<a class="button-primary" href="' . $status['url'] . '" target="_parent">' . __('Install Update Now') .'</a>'; 358 break; 359 case 'newer_installed': 360 echo '<a>' . sprintf(__('Newer Version (%s) Installed'), $status['version']) . '</a>'; 361 break; 362 case 'latest_installed': 363 echo '<a>' . __('Latest Version Installed') . '</a>'; 364 break; 365 } 366 ?> 367 </p> 368 <?php endif; ?> 369 </div> 370 </div> 371 </div> 372 </div> 373 <?php 374 } 375 add_action( 'install_plugins_plugin-information', 'install_plugin_information' ); 376 377 /** 378 * Display plugin information in plugin list table. 379 * 380 * @since 3.3.0 381 */ 382 function inline_install_plugin_information() { 383 global $tab; 384 385 $api = plugins_api('plugin_information', array('slug' => stripslashes( $_REQUEST['plugin'] ) )); 386 387 if ( is_wp_error($api) ) 388 wp_die($api); 389 390 $plugins_allowedtags = array('a' => array('href' => array(), 'title' => array(), 'target' => array()), 391 'abbr' => array('title' => array()), 'acronym' => array('title' => array()), 392 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(), 393 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), 394 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), 395 'img' => array('src' => array(), 'class' => array(), 'alt' => array())); 396 397 //Sanitize HTML 398 foreach ( (array)$api->sections as $section_name => $content ) 399 $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags); 400 foreach ( array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key ) 401 $api->$key = wp_kses($api->$key, $plugins_allowedtags); 402 403 $section = isset($_REQUEST['section']) ? stripslashes( $_REQUEST['section'] ) : 'description'; //Default to the Description tab, Do not translate, API returns English. 404 if ( empty($section) || ! isset($api->sections[ $section ]) ) 405 $section = array_shift( $section_titles = array_keys((array)$api->sections) ); 282 406 ?> 283 <div class="alignright fyi"> 284 <?php if ( ! empty($api->download_link) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) : ?> 285 <p class="action-button"> 286 <?php 287 $status = install_plugin_install_status($api); 288 switch ( $status['status'] ) { 289 case 'install': 290 if ( $status['url'] ) 291 echo '<a href="' . $status['url'] . '" target="_parent">' . __('Install Now') . '</a>'; 292 break; 293 case 'update_available': 294 if ( $status['url'] ) 295 echo '<a href="' . $status['url'] . '" target="_parent">' . __('Install Update Now') .'</a>'; 296 break; 297 case 'newer_installed': 298 echo '<a>' . sprintf(__('Newer Version (%s) Installed'), $status['version']) . '</a>'; 299 break; 300 case 'latest_installed': 301 echo '<a>' . __('Latest Version Installed') . '</a>'; 302 break; 303 } 304 ?> 407 <td class="name column-name" id="plugin-<?php echo $api->slug; ?>-info"> 408 <h3><?php echo $api->name; ?></h3> 409 <p> 410 <?php if ( ! empty($api->author) ) : ?> 411 <strong><?php _e('Author:') ?></strong> <?php echo links_add_target($api->author, '_blank') ?><br /> 412 <?php endif; if ( ! empty($api->last_updated) ) : ?> 413 <strong><?php _e('Last Updated:') ?></strong> <span title="<?php echo $api->last_updated ?>"><?php printf( __('%s ago'), human_time_diff(strtotime($api->last_updated)) ) ?></span><br /> 414 <?php endif; if ( ! empty($api->requires) ) : ?> 415 <strong><?php _e('Requires WordPress Version:') ?></strong> <?php printf(__('%s or higher'), $api->requires) ?><br /> 416 <?php endif; if ( ! empty($api->tested) ) : ?> 417 <strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?><br /> 418 <?php endif; if ( ! empty($api->downloaded) ) : ?> 419 <strong><?php _e('Downloaded:') ?></strong> <?php printf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?><br /> 420 <?php endif; ?> 305 421 </p> 422 <p class="action-links"> 423 <?php 424 if ( ! empty($api->download_link) && ( current_user_can('install_plugins') || current_user_can('update_plugins') ) ) : 425 $status = install_plugin_install_status($api); 426 switch ( $status['status'] ) { 427 case 'install': 428 if ( $status['url'] ) 429 echo '<a class="button-primary" href="' . $status['url'] . '" target="_parent">' . __('Install Now') . '</a>'; 430 break; 431 case 'update_available': 432 if ( $status['url'] ) 433 echo '<a class="button-primary" href="' . $status['url'] . '" target="_parent">' . __('Install Update Now') .'</a>'; 434 break; 435 case 'newer_installed': 436 echo sprintf(__('Newer Version (%s) Installed'), $status['version']); 437 break; 438 case 'latest_installed': 439 echo __('Latest Version Installed'); 440 break; 441 } 442 endif; 443 ?> 444 <a href="<?php echo self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $api->slug ); ?>" class="close-infoinline button" title="<?php echo esc_attr( sprintf( __( 'More information about %s' ), $api->name ) ); ?>"><?php _e( 'Close Details' ); ?></a> 445 </p> 446 <p> 447 <?php if ( ! empty($api->slug) && empty($api->external) ) : ?> 448 <a target="_blank" href="http://wordpress.org/extend/plugins/<?php echo $api->slug ?>/"><?php _e('WordPress.org Plugin Page »') ?></a><br /> 449 <?php endif; if ( ! empty($api->homepage) ) : ?> 450 <a target="_blank" href="<?php echo $api->homepage ?>"><?php _e('Plugin Homepage »') ?></a><br /> 306 451 <?php endif; ?> 307 <h2 class="mainheader"><?php /* translators: For Your Information */ _e('FYI') ?></h2> 308 <ul> 309 <?php if ( ! empty($api->version) ) : ?> 310 <li><strong><?php _e('Version:') ?></strong> <?php echo $api->version ?></li> 311 <?php endif; if ( ! empty($api->author) ) : ?> 312 <li><strong><?php _e('Author:') ?></strong> <?php echo links_add_target($api->author, '_blank') ?></li> 313 <?php endif; if ( ! empty($api->last_updated) ) : ?> 314 <li><strong><?php _e('Last Updated:') ?></strong> <span title="<?php echo $api->last_updated ?>"><?php 315 printf( __('%s ago'), human_time_diff(strtotime($api->last_updated)) ) ?></span></li> 316 <?php endif; if ( ! empty($api->requires) ) : ?> 317 <li><strong><?php _e('Requires WordPress Version:') ?></strong> <?php printf(__('%s or higher'), $api->requires) ?></li> 318 <?php endif; if ( ! empty($api->tested) ) : ?> 319 <li><strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?></li> 320 <?php endif; if ( ! empty($api->downloaded) ) : ?> 321 <li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li> 322 <?php endif; if ( ! empty($api->slug) && empty($api->external) ) : ?> 323 <li><a target="_blank" href="http://wordpress.org/extend/plugins/<?php echo $api->slug ?>/"><?php _e('WordPress.org Plugin Page »') ?></a></li> 324 <?php endif; if ( ! empty($api->homepage) ) : ?> 325 <li><a target="_blank" href="<?php echo $api->homepage ?>"><?php _e('Plugin Homepage »') ?></a></li> 326 <?php endif; ?> 327 </ul> 452 </p> 453 </td> 454 <td class="vers column-version"> 455 <?php if ( ! empty($api->version) ) : 456 echo $api->version; 457 endif; ?> 458 </td> 459 <td class="rating column-rating"> 328 460 <?php if ( ! empty($api->rating) ) : ?> 329 <h2><?php _e('Average Rating') ?></h2>330 461 <div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>"> 331 462 <div class="star star-rating" style="width: <?php echo esc_attr($api->rating) ?>px"></div> 332 463 <div class="star star5"><img src="<?php echo admin_url('images/star.png?v=20110615'); ?>" alt="<?php _e('5 stars') ?>" /></div> … … 337 468 </div> 338 469 <small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small> 339 470 <?php endif; ?> 340 </div> 341 <div id="section-holder" class="wrap"> 342 <?php 343 if ( !empty($api->tested) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>') ) 344 echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>'; 471 </td> 472 <td class="desc column-description"> 473 <div id="section-holder"> 474 <h3 class="nav-tab-wrapper"> 475 <?php 476 foreach ( (array)$api->sections as $section_name => $content ) { 477 $title = $section_name; 478 $title = ucwords(str_replace('_', ' ', $title)); 345 479 346 else if ( !empty($api->requires) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<') ) 347 echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>'; 480 $class = ( $section_name == $section ) ? 'nav-tab nav-tab-active' : 'nav-tab'; 481 $href = add_query_arg( array('tab' => $tab, 'section' => $section_name) ); 482 $href = esc_url($href); 483 $san_title = esc_attr(sanitize_title_with_dashes($title)); 484 echo "\t<a name='$san_title' target='' href='$href' class='$class'>$title</a>\n"; 485 } 486 ?> 487 </h3> 488 <?php 489 if ( !empty($api->tested) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->tested)), $api->tested, '>') ) 490 echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been tested</strong> with your current version of WordPress.') . '</p></div>'; 491 else if ( !empty($api->requires) && version_compare( substr($GLOBALS['wp_version'], 0, strlen($api->requires)), $api->requires, '<') ) 492 echo '<div class="updated"><p>' . __('<strong>Warning:</strong> This plugin has <strong>not been marked as compatible</strong> with your version of WordPress.') . '</p></div>'; 493 ?> 494 <?php 495 foreach ( (array)$api->sections as $section_name => $content ) { 496 $title = ucfirst( $section_name ); 497 $title = ucwords(str_replace('_', ' ', $title)); 498 499 $content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/'); 500 $content = links_add_target($content, '_blank'); 348 501 349 foreach ( (array)$api->sections as $section_name => $content ) { 350 $title = $section_name; 351 $title[0] = strtoupper($title[0]); 352 $title = str_replace('_', ' ', $title); 502 $san_title = esc_attr(sanitize_title_with_dashes($title)); 353 503 354 $content = links_add_base_url($content, 'http://wordpress.org/extend/plugins/' . $api->slug . '/'); 355 $content = links_add_target($content, '_blank'); 504 $display = ( $section_name == $section ) ? 'block' : 'none'; 356 505 357 $san_title = esc_attr(sanitize_title_with_dashes($title)); 358 359 $display = ( $section_name == $section ) ? 'block' : 'none'; 360 361 echo "\t<div id='section-{$san_title}' class='section' style='display: {$display};'>\n"; 362 echo "\t\t<h2 class='long-header'>$title</h2>"; 363 echo $content; 364 echo "\t</div>\n"; 365 } 366 echo "</div>\n"; 367 368 iframe_footer(); 369 exit; 506 echo "\t<div id='section-{$san_title}' class='section' style='display: {$display};'>\n"; 507 echo $content; 508 echo "\t</div>\n"; 509 } 510 ?> 511 </div> 512 </td> 513 <?php 514 if ( isset( $_REQUEST['no-chrome'] ) ) 515 exit; 370 516 } 371 add_action('install_plugins_pre_plugin-information', 'install_plugin_information'); 517 if ( isset( $_REQUEST['no-chrome'] ) ) 518 add_action( 'install_plugins_pre_plugin-information', 'inline_install_plugin_information' ); 519 No newline at end of file -
wp-admin/includes/class-wp-plugin-install-list-table.php
187 187 $author = wp_kses( $author, $plugins_allowedtags ); 188 188 189 189 $action_links = array(); 190 $action_links[] = '<a href="' . self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] . 191 '&TB_iframe=true&width=600&height=550' ) . '" class="thickbox" title="' . 192 esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '">' . __( 'Details' ) . '</a>'; 190 $action_links[] = '<a href="' . self_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] ) . '" 191 class="infoinline" title="' . esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '">' . __( 'Details' ) . '</a>'; 193 192 194 193 if ( current_user_can( 'install_plugins' ) || current_user_can( 'update_plugins' ) ) { 195 194 $status = install_plugin_install_status( $plugin ); … … 212 211 213 212 $action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin ); 214 213 ?> 215 <tr >214 <tr id="plugin-<?php echo $plugin['slug']; ?>"> 216 215 <td class="name column-name"<?php echo $style['name']; ?>><strong><?php echo $title; ?></strong> 217 216 <div class="action-links"><?php if ( !empty( $action_links ) ) echo implode( ' | ', $action_links ); ?></div> 218 217 </td> … … 239 238 <?php 240 239 } 241 240 } 242 } 243 244 ?> 241 } 242 No newline at end of file -
wp-admin/js/plugin-install.dev.js
1 /* Plugin Browser Thickbox related JS*/2 var tb_position;3 1 jQuery(document).ready(function($) { 4 tb_position = function() { 5 var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width, adminbar_height = 0; 6 7 if ( $('body.admin-bar').length ) 8 adminbar_height = 28; 9 10 if ( tbWindow.size() ) { 11 tbWindow.width( W - 50 ).height( H - 45 - adminbar_height ); 12 $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height ); 13 tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'}); 14 if ( typeof document.body.style.maxWidth != 'undefined' ) 15 tbWindow.css({'top': 20 + adminbar_height + 'px','margin-top':'0'}); 16 }; 17 18 return $('a.thickbox').each( function() { 19 var href = $(this).attr('href'); 20 if ( ! href ) 21 return; 22 href = href.replace(/&width=[0-9]+/g, ''); 23 href = href.replace(/&height=[0-9]+/g, ''); 24 $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 - adminbar_height ) ); 25 }); 26 }; 27 28 $(window).resize(function(){ tb_position(); }); 29 30 $('#dashboard_plugins a.thickbox, .plugins a.thickbox').click( function() { 31 tb_click.call(this); 32 33 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); 34 $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).attr('title') ); 35 return false; 2 $('a.infoinline').click(function(e) { 3 var _link = $(this); 4 if ($('#plugin-information').length < 1 ) { 5 _link.parents('tr').hide(); 6 $('<tr id="plugin-information"><td id="plugin-loading" colspan="4" style="text-align: center; vertical-align: middle;"><img src="' + ajaxurl.replace( '/admin-ajax.php', '' ) + '/images/loading.gif" alt="Loading..."></td></tr>') 7 .insertAfter($(this).parents('tr')) 8 .height(_link.parents('tr').height()); 9 $('#plugin-information').load($(this).attr('href') + '&no-chrome=1', function() { 10 $('#plugin-loading').remove(); 11 $('#plugin-information').height('auto'); 12 }); 13 } else { 14 $('#plugin-information td > div').show(function() { 15 $('#plugin-information').remove(); 16 _link.parents('tr').show(); 17 }); 18 } 19 20 e.preventDefault(); 36 21 }); 37 22 23 $('a.close-infoinline').live('click', function(e) { 24 var id = $(this).parents('td').attr('id'); 25 var plugin = id.replace('-info', ''); 26 $('#plugin-information').hide().remove(); 27 $('#' + plugin).show(); 28 29 e.preventDefault(); 30 }); 31 38 32 /* Plugin install related JS*/ 39 $('#plugin-information #sidemenu a').click( function() {33 $('#plugin-information .nav-tab-wrapper a').live('click', function(e) { 40 34 var tab = $(this).attr('name'); 41 35 //Flip the tab 42 $('#plugin-information -header a.current').removeClass('current');43 $(this).addClass(' current');36 $('#plugin-information .nav-tab-active').removeClass('nav-tab-active'); 37 $(this).addClass('nav-tab-active'); 44 38 //Flip the content. 45 39 $('#section-holder div.section').hide(); //Hide 'em all 46 40 $('#section-' + tab).show(); 47 return false; 41 42 e.preventDefault(); 48 43 }); 49 44 50 45 $('a.install-now').click( function() { -
wp-admin/plugin-install.php
28 28 $parent_file = 'plugins.php'; 29 29 30 30 wp_enqueue_script( 'plugin-install' ); 31 if ( 'plugin-information' != $tab )32 add_thickbox();33 31 34 32 $body_id = $tab; 35 33 … … 48 46 include(ABSPATH . 'wp-admin/admin-header.php'); 49 47 ?> 50 48 <div class="wrap"> 51 <?php screen_icon();?>52 <h2><?php echo esc_html( $title ); ?></h2>53 54 <?php $wp_list_table->views(); ?>55 56 < br class="clear" />49 <?php if ( 'plugin-information' !== $tab ) { ?> 50 <?php screen_icon(); ?> 51 <h2><?php echo esc_html( $title ); ?></h2> 52 <?php $wp_list_table->views(); ?> 53 <br class="clear" /> 54 <?php } ?> 57 55 <?php do_action('install_plugins_' . $tab, $paged); ?> 58 56 </div> 59 57 <?php 60 include(ABSPATH . 'wp-admin/admin-footer.php'); 61 58 include(ABSPATH . 'wp-admin/admin-footer.php'); 59 No newline at end of file -
wp-admin/network/plugin-install.php
7 7 * @since 3.1.0 8 8 */ 9 9 10 if ( isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) )11 define( 'IFRAME_REQUEST', true );12 13 10 /** Load WordPress Administration Bootstrap */ 14 11 require_once( './admin.php' ); 15 12 -
wp-admin/css/wp-admin.dev.css
6498 6498 height: 19px; 6499 6499 } 6500 6500 6501 /* Header on thickbox */ 6502 #plugin-information-header { 6503 margin: 0; 6504 padding: 0 5px; 6505 font-weight: bold; 6506 position: relative; 6507 border-bottom-width: 1px; 6508 border-bottom-style: solid; 6509 height: 2.5em; 6501 /* Plugin information page */ 6502 #plugin-information td h3 { 6503 margin-top: 0.5em; 6510 6504 } 6511 #plugin-information ul#sidemenu {6512 font-weight: normal;6513 margin: 0 5px;6514 position: absolute;6515 left: 0;6516 bottom: -1px;6517 }6518 6505 6519 /* Install sidemenu */ 6520 #plugin-information p.action-button { 6521 width: 100%; 6522 padding-bottom: 0; 6523 margin-bottom: 0; 6524 margin-top: 10px; 6525 -moz-border-radius: 3px 0 0 3px; 6526 -webkit-border-top-left-radius: 3px; 6527 -khtml-border-top-left-radius: 3px; 6528 border-top-left-radius: 3px; 6529 -webkit-border-bottom-left-radius: 3px; 6530 -khtml-border-bottom-left-radius: 3px; 6531 border-bottom-left-radius: 3px; 6506 #plugin-information .action-links { 6507 margin-top: 1.5em; 6508 margin-bottom: 1.5em; 6532 6509 } 6533 6510 6534 #plugin-information .action-button a { 6535 text-align: center; 6536 font-weight: bold; 6537 text-decoration: none; 6538 display: block; 6539 line-height: 2em; 6511 #plugin-information td .updated p { 6512 margin: 0.5em 0; 6540 6513 } 6541 6514 6542 #plugin-information h2 { 6543 clear: none !important; 6544 margin-right: 200px; 6515 #plugin-information .section ul li { 6516 list-style-type: disc; 6517 list-style-image: none; 6518 margin-left: 2em; 6545 6519 } 6546 6520 6547 #plugin-information .fyi { 6548 margin: 0 10px 50px; 6549 width: 210px; 6521 #plugin-information .section ol li { 6522 list-style-type: decimal; 6550 6523 } 6551 6524 6552 #plugin-information .fyi h2 {6553 font-size: 0.9em;6554 margin-bottom: 0;6555 margin-right: 0;6556 }6557 6558 #plugin-information .fyi h2.mainheader {6559 padding: 5px;6560 -moz-border-radius-topleft: 3px;6561 -webkit-border-top-left-radius: 3px;6562 -khtml-border-top-left-radius: 3px;6563 border-top-left-radius: 3px;6564 }6565 6566 #plugin-information .fyi ul {6567 padding: 10px 5px 10px 7px;6568 margin: 0;6569 list-style: none;6570 -moz-border-radius-bottomleft: 3px;6571 -webkit-border-bottom-left-radius: 3px;6572 -khtml-border-bottom-left-radius: 3px;6573 border-bottom-left-radius: 3px;6574 }6575 6576 #plugin-information .fyi li {6577 margin-right: 0;6578 }6579 6580 #plugin-information #section-holder {6581 padding: 10px;6582 }6583 6584 #plugin-information .section ul,6585 #plugin-information .section ol {6586 margin-left: 16px;6587 list-style-type: square;6588 list-style-image: none;6589 }6590 6591 6525 #plugin-information #section-screenshots li img { 6592 6526 vertical-align: text-top; 6527 max-width: 100%; 6593 6528 } 6594 6529 6595 6530 #plugin-information #section-screenshots li p { … … 6608 6543 overflow: auto; 6609 6544 } 6610 6545 6611 6612 6613 6546 /* press-this */ 6614 6547 body.press-this { 6615 6548 color: #333; -
wp-admin/css/colors-fresh.dev.css
151 151 textarea.disabled { 152 152 background-color: #ccc; 153 153 } 154 /* #upload-menu li a.upload-tab-link, */155 #plugin-information .action-button a,156 #plugin-information .action-button a:hover,157 #plugin-information .action-button a:visited {158 color: #fff;159 }160 154 161 155 .widget .widget-top, 162 156 .postbox h3, … … 569 563 -webkit-box-shadow: rgba(255,255,255,0.5) 0 1px 0; 570 564 box-shadow: rgba(255,255,255,0.5) 0 1px 0; 571 565 } 572 #plugin-information .action-button {573 background-color: #d54e21;574 color: #fff;575 }576 566 577 567 #adminmenu li.current a .awaiting-mod, 578 568 #adminmenu li a.wp-has-current-submenu .update-plugins{ … … 584 574 box-shadow: rgba(255,255,255,0.5) 0 1px 0; 585 575 } 586 576 587 div#media-upload-header, 588 div#plugin-information-header { 577 div#media-upload-header { 589 578 background-color: #f9f9f9; 590 579 border-bottom-color: #dfdfdf; 591 580 } … … 1332 1321 border-right: 1px solid #f9f9f9; 1333 1322 } 1334 1323 1335 #plugin-information .fyi ul {1336 background-color: #eaf3fa;1337 }1338 1339 #plugin-information .fyi h2.mainheader {1340 background-color: #cee1ef;1341 }1342 1343 1324 #plugin-information pre, 1344 1325 #plugin-information code { 1345 1326 background-color: #ededff;