Make WordPress Core

Changeset 32723


Ignore:
Timestamp:
06/10/2015 07:30:22 PM (9 years ago)
Author:
helen
Message:

List tables:

Since the primary column is not going to be alterable for plugins and MS themes, we don't need to check in on it.

see #25408.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r32686 r32723  
    439439                $style = ' style="display:none;"';
    440440
    441             $extra_class = '';
    442             if ( $primary === $column_name ) {
    443                 $extra_class = ' column-primary';
    444             }
    445 
    446441            switch ( $column_name ) {
    447442                case 'cb':
     
    449444                    break;
    450445                case 'name':
    451                     echo "<td class='theme-title{$extra_class}'$style><strong>" . $theme->display('Name') . "</strong>";
    452                     if ( $primary === $column_name ) {
    453                         echo $this->row_actions($actions, true);
    454                     }
     446                    echo "<td class='theme-title column-primary'$style><strong>" . $theme->display('Name') . "</strong>";
     447                    echo $this->row_actions($actions, true);
    455448                    echo "</td>";
    456449                    break;
    457450                case 'description':
    458                     echo "<td class='column-description desc{$extra_class}'$style>";
     451                    echo "<td class='column-description desc'$style>";
    459452                    if ( $theme->errors() ) {
    460453                        $pre = $status == 'broken' ? __( 'Broken Theme:' ) . ' ' : '';
     
    491484
    492485                    echo '</div>';
    493                     if ( $primary === $column_name ) {
    494                         echo $this->row_actions($actions, true);
    495                     }
    496486                    echo '</td>';
    497487                    break;
    498488
    499489                default:
    500                     echo "<td class='$column_name column-$column_name{$extra_class}'$style>";
     490                    echo "<td class='$column_name column-$column_name'$style>";
    501491
    502492                    /**
     
    511501                    do_action( 'manage_themes_custom_column', $column_name, $stylesheet, $theme );
    512502
    513                     if ( $primary === $column_name ) {
    514                         echo $this->row_actions($actions, true);
    515                     }
    516503                    echo "</td>";
    517504            }
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r32686 r32723  
    582582        list( $columns, $hidden, $sortable, $primary ) = $this->get_column_info();
    583583
    584         $extra_class = ' column-primary';
    585 
    586584        foreach ( $columns as $column_name => $column_display_name ) {
    587585            $style = '';
     
    595593                    break;
    596594                case 'name':
    597                     if ( $primary === $column_name || ! isset( $columns[ $primary ] ) ) {
    598                         echo "<td class='plugin-title $extra_class'$style><strong>$plugin_name</strong>";
    599                         echo $this->row_actions( $actions, true );
    600                     } else {
    601                         echo "<td class='plugin-title'$style><strong>$plugin_name</strong>";
    602                     }
     595                    echo "<td class='plugin-title column-primary'$style><strong>$plugin_name</strong>";
     596                    echo $this->row_actions( $actions, true );
    603597                    echo "</td>";
    604598                    break;
    605599                case 'description':
    606600                    $classes = 'column-description desc';
    607                     if ( $primary === $column_name ) {
    608                         $classes .= " $extra_class";
    609                     }
    610601
    611602                    echo "<td class='$classes'$style>
     
    656647                    echo implode( ' | ', $plugin_meta );
    657648
    658                     if ( $primary === $column_name ) {
    659                         echo $this->row_actions( $actions, true );
    660                     }
    661649                    echo "</div></td>";
    662650                    break;
    663651                default:
    664652                    $classes = "$column_name column-$column_name$class";
    665                     if ( $primary === $column_name ) {
    666                         $classes .= " $extra_class";
    667                     }
    668653
    669654                    echo "<td class='$classes'$style>";
     
    680665                    do_action( 'manage_plugins_custom_column', $column_name, $plugin_file, $plugin_data );
    681666
    682                     if ( $primary === $column_name ) {
    683                         echo $this->row_actions( $actions, true );
    684                     }
    685667                    echo "</td>";
    686668            }
     
    725707     * @access protected
    726708     *
    727      * @return string Unalterable name for the primary column, in this case, 'plugin'.
     709     * @return string Unalterable name for the primary column, in this case, 'name'.
    728710     */
    729711    protected function get_primary_column_name() {
    730         return 'plugin';
     712        return 'name';
    731713    }
    732714}
Note: See TracChangeset for help on using the changeset viewer.