Make WordPress Core


Ignore:
Timestamp:
07/14/2015 05:46:13 PM (9 years ago)
Author:
wonderboymusic
Message:

List Tables:

  • In ->handle_row_actions(), bail immediately if $primary and $column_name do not match. Saves us a nesting level and avoids declaring code that is unusable.
  • In WP_List_Table::single_row_columns(), allow _column_{$name} to be called dynamically by core to avoid having to override the entirety of ->single_row_columns() in WP_MS_Users_List_Table and WP_Posts_List_Table
  • In WP_MS_Sites_List_Table, id is not a column.

Props wonderboymusic, paulwilde.
Fixes #29881.

File:
1 edited

Legend:

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

    r33155 r33270  
    463463        global $comment_status;
    464464
     465        if ( $primary !== $column_name ) {
     466            return '';
     467        }
     468
    465469        if ( ! $this->user_can ) {
    466470            return;
    467         }
    468 
    469         if ( $primary !== $column_name ) {
    470             return '';
    471471        }
    472472
Note: See TracChangeset for help on using the changeset viewer.