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.


git-svn-id: https://develop.svn.wordpress.org/trunk@33270 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-07-14 17:46:13 +00:00
parent 32bcd95e37
commit aee18d2d38
8 changed files with 241 additions and 352 deletions

View File

@@ -462,14 +462,14 @@ class WP_Comments_List_Table extends WP_List_Table {
protected function handle_row_actions( $comment, $column_name, $primary ) {
global $comment_status;
if ( ! $this->user_can ) {
return;
}
if ( $primary !== $column_name ) {
return '';
}
if ( ! $this->user_can ) {
return;
}
$post = get_post();
$the_comment_status = wp_get_comment_status( $comment->comment_ID );