Ticket #28785: 28785-plugin-custom-icons.4.diff
File 28785-plugin-custom-icons.4.diff, 4.0 KB (added by , 10 years ago) |
---|
-
src/wp-admin/css/list-tables.css
1297 1297 } 1298 1298 1299 1299 .plugin-card h4 { 1300 float: left;1301 1300 margin: 0 0 12px; 1302 1301 font-size: 18px; 1303 1302 } 1304 1303 1305 .plugin-card .desc {1306 clear: left;1307 }1308 1309 1304 .plugin-action-buttons { 1305 clear: right; 1310 1306 float: right; 1311 1307 margin-left: 2em; 1312 1308 margin-bottom: 1em; … … 1350 1346 clear: right; 1351 1347 } 1352 1348 1349 .plugin-icon { 1350 width: 128px; 1351 height: 128px; 1352 float: left; 1353 margin: 0 1em 1em 0; 1354 } 1355 1353 1356 /* ms */ 1354 1357 /* Background Color for Site Status */ 1355 1358 .wp-list-table .site-deleted { -
src/wp-admin/includes/class-wp-plugin-install-list-table.php
98 98 $args = array( 99 99 'page' => $paged, 100 100 'per_page' => $per_page, 101 'fields' => array( 'last_updated' => true, 'downloaded' => true ),101 'fields' => array( 'last_updated' => true, 'downloaded' => true, 'icons' => true, 'banners' => true ), 102 102 // Send the locale and installed plugin slugs to the API so it can provide context-sensitive results. 103 103 'locale' => get_locale(), 104 104 'installed_plugins' => $this->get_installed_plugin_slugs(), … … 398 398 /* translators: 1: Plugin name and version. */ 399 399 $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>'; 400 400 401 if ( !empty( $plugin['icons']['high'] ) ) 402 $plugin_icon_url = $plugin['icons']['high']; 403 elseif ( !empty( $plugin['icons']['low'] ) ) 404 $plugin_icon_url = $plugin['icons']['low']; 405 else 406 $plugin_icon_url = $plugin['icons']['default']; 401 407 402 408 /** 403 409 * Filter the install action links for a plugin. … … 411 417 ?> 412 418 <div class="plugin-card"> 413 419 <div class="plugin-card-top"> 420 <a href="<?php echo esc_url( $details_link ); ?>" class="thickbox"><img src="<?php echo esc_attr( $plugin_icon_url ) ?>" class="plugin-icon" /></a> 421 <div class="action-links"> 422 <?php 423 if ( ! empty( $action_links ) ) { 424 echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>'; 425 } 426 ?> 427 </div> 414 428 <div class="name column-name"> 415 429 <h4><a href="<?php echo esc_url( $details_link ); ?>" class="thickbox"><?php echo $title; ?></a></h4> 416 <div class="action-links">417 <?php418 if ( ! empty( $action_links ) ) {419 echo '<ul class="plugin-action-buttons"><li>' . implode( '</li><li>', $action_links ) . '</li></ul>';420 }421 ?>422 </div>423 430 </div> 424 431 <div class="desc column-description"> 425 432 <p><?php echo $description; ?></p> -
src/wp-admin/js/plugin-install.js
38 38 tb_position(); 39 39 }); 40 40 41 $('.plugin-card').on( 'click', 'a.thickbox', function() { 42 tb_click.call(this); 41 $('.plugin-card').on( 'click', function( e ) { 42 // Don't trigger thickbox if a link that doesn't have the proper class to do so (EGs: link to dev site & install button). 43 if ( $( e.target ).is( 'a' ) && ! $( e.target ).is( 'a.thickbox' ) ) 44 return true; 43 45 46 tb_click.call( $('a.thickbox', this)[0] ); // use the URL of the first thickbox link in the card 47 44 48 $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'}); 45 49 $('#TB_ajaxWindowTitle').html( '<strong>' + plugininstallL10n.plugin_information + '</strong> ' + $(this).data( 'title' ) ); 46 50 $('#TB_iframeContent').attr( 'title', plugininstallL10n.plugin_information + ' ' + $(this).data( 'title' ) );