- Timestamp:
- 05/29/2015 02:40:52 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-plugins-list-table.php
r32642 r32644 569 569 ); 570 570 571 list( $columns, $hidden ) = $this->get_column_info(); 571 list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info(); 572 573 $extra_class = ' has-row-actions column-primary'; 572 574 573 575 foreach ( $columns as $column_name => $column_display_name ) { 574 576 $style = ''; 575 if ( in_array( $column_name, $hidden ) ) 577 if ( in_array( $column_name, $hidden ) ) { 576 578 $style = ' style="display:none;"'; 579 } 577 580 578 581 switch ( $column_name ) { … … 581 584 break; 582 585 case 'name': 583 echo "<td class='plugin-title'$style><strong>$plugin_name</strong>"; 584 echo $this->row_actions( $actions, true ); 586 if ( $primary === $column_name || ! isset( $columns[ $primary ] ) ) { 587 echo "<td class='plugin-title $extra_class'$style><strong>$plugin_name</strong>"; 588 echo $this->row_actions( $actions, true ); 589 } else { 590 echo "<td class='plugin-title'$style><strong>$plugin_name</strong>"; 591 } 585 592 echo "</td>"; 586 593 break; 587 594 case 'description': 588 echo "<td class='column-description desc'$style> 595 $classes = 'column-description desc'; 596 if ( $primary === $column_name ) { 597 $classes .= " $extra_class"; 598 } 599 600 echo "<td class='$classes'$style> 589 601 <div class='plugin-description'>$description</div> 590 602 <div class='$class second plugin-version-author-uri'>"; … … 633 645 echo implode( ' | ', $plugin_meta ); 634 646 647 if ( $primary === $column_name ) { 648 echo $this->row_actions( $actions, true ); 649 } 635 650 echo "</div></td>"; 636 651 break; 637 652 default: 638 echo "<td class='$column_name column-$column_name'$style>"; 653 $classes = "$column_name column-$column_name$class"; 654 if ( $primary === $column_name ) { 655 $classes .= " $extra_class"; 656 } 657 658 echo "<td class='$classes'$style>"; 639 659 640 660 /** … … 648 668 */ 649 669 do_action( 'manage_plugins_custom_column', $column_name, $plugin_file, $plugin_data ); 670 671 if ( $primary === $column_name ) { 672 echo $this->row_actions( $actions, true ); 673 } 650 674 echo "</td>"; 651 675 } … … 683 707 do_action( "after_plugin_row_$plugin_file", $plugin_file, $plugin_data, $status ); 684 708 } 709 710 /** 711 * Get name of default primary column for this specific list table. 712 * 713 * @since 4.3.0 714 * @access protected 715 * 716 * @return string 717 */ 718 protected function get_default_primary_column_name() { 719 return 'plugin'; 720 } 685 721 }
Note: See TracChangeset
for help on using the changeset viewer.