Ticket #27440: 27440-return-and-display-banners.diff
File 27440-return-and-display-banners.diff, 1.5 KB (added by , 10 years ago) |
---|
-
wp-admin/includes/plugin-install.php
311 311 function install_plugin_information() { 312 312 global $tab; 313 313 314 $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $_REQUEST['plugin'] ), 'is_ssl' => is_ssl() ) );314 $api = plugins_api( 'plugin_information', array( 'slug' => wp_unslash( $_REQUEST['plugin'] ), 'is_ssl' => is_ssl(), 'fields' => array( 'banners' => true ) ) ); 315 315 316 316 if ( is_wp_error( $api ) ) 317 317 wp_die( $api ); … … 354 354 355 355 iframe_header( __('Plugin Install') ); 356 356 357 if ( !empty( $api->banners ) && ( !empty( $api->banners['low'] ) || !empty( $api->banners['high'] ) ) ) { 358 $low = ( !empty( $api->banners['low'] ) ) ? $api->banners['low'] : $api->banners['high']; 359 $high = ( !empty( $api->banners['high'] ) ) ? $api->banners['high'] : $api->banners['low']; 360 ?> 361 <style type="text/css"> 362 #plugin-information-title { 363 height:250px; 364 background-image: url(<?php echo $low ?>); 365 background-size: 100% auto; 366 } 367 #plugin-information-tabs { 368 top:250px; 369 } 370 #plugin-information-content { 371 top:284px; 372 } 373 @media only screen and (-webkit-min-device-pixel-ratio: 1.5) { 374 #plugin-information-title { 375 background-image: url(<?php echo $high ?>}); 376 } 377 } 378 </style> 379 <?php 380 } 381 357 382 echo "<div id='{$_tab}-title'>{$api->name}</div>"; 358 383 echo "<div id='{$_tab}-tabs'>\n"; 359 384