Ticket #41164: 41164.patch
File 41164.patch, 2.1 KB (added by , 4 years ago) |
---|
-
class-wp-ms-themes-list-table.php
105 105 'upgrade' => array(), 106 106 'broken' => $this->is_site_themes ? array() : wp_get_themes( array( 'errors' => true ) ), 107 107 ); 108 108 109 109 if ( $this->is_site_themes ) { 110 110 $themes_per_page = $this->get_items_per_page( 'site_themes_network_per_page' ); 111 111 $allowed_where = 'site'; … … 246 246 'cb' => '<input type="checkbox" />', 247 247 'name' => __( 'Theme' ), 248 248 'description' => __( 'Description' ), 249 'screenshot' => __( 'Screenshot' ), 249 250 ); 250 251 } 251 252 … … 536 537 * @param WP_Theme $theme The current WP_Theme object. 537 538 */ 538 539 public function column_description( $theme ) { 540 539 541 global $status, $totals; 540 542 if ( $theme->errors() ) { 541 543 $pre = $status === 'broken' ? __( 'Broken Theme:' ) . ' ' : ''; … … 591 593 592 594 echo '</div>'; 593 595 } 594 596 597 /** 598 * Handles the screenshot column output. 599 * 600 * @since 4.3.0 601 * @access public 602 * 603 * @global string $status 604 * @global array $totals 605 * 606 * @param WP_Theme $theme The current WP_Theme object. 607 */ 608 public function column_screenshot( $theme ) { 609 610 echo '<img src="'.esc_url($theme->get_screenshot()).'" />'; 611 612 } 613 595 614 /** 596 615 * Handles default column output. 597 616 * … … 632 651 if ( in_array( $column_name, $hidden ) ) { 633 652 $extra_classes .= ' hidden'; 634 653 } 635 636 654 switch ( $column_name ) { 637 655 case 'cb': 638 656 echo '<th scope="row" class="check-column">'; … … 657 675 658 676 echo '</td>'; 659 677 break; 678 679 case 'screenshot': 680 echo "<td class='column-screenshot theme-screenshots{$extra_classes}'>"; 660 681 682 $this->column_screenshot( $item ); 683 684 echo '</td>'; 685 break; 661 686 default: 662 687 echo "<td class='$column_name column-$column_name{$extra_classes}'>"; 663 688