mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
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:
@@ -1224,14 +1224,20 @@ class WP_List_Table {
|
||||
echo '<th scope="row" class="check-column">';
|
||||
echo $this->column_cb( $item );
|
||||
echo '</th>';
|
||||
}
|
||||
elseif ( method_exists( $this, 'column_' . $column_name ) ) {
|
||||
} elseif ( method_exists( $this, '_column_' . $column_name ) ) {
|
||||
echo call_user_func(
|
||||
array( $this, '_column_' . $column_name ),
|
||||
$item,
|
||||
$classes,
|
||||
$data,
|
||||
$primary
|
||||
);
|
||||
} elseif ( method_exists( $this, 'column_' . $column_name ) ) {
|
||||
echo "<td $attributes>";
|
||||
echo call_user_func( array( $this, 'column_' . $column_name ), $item );
|
||||
echo $this->handle_row_actions( $item, $column_name, $primary );
|
||||
echo "</td>";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
echo "<td $attributes>";
|
||||
echo $this->column_default( $item, $column_name );
|
||||
echo $this->handle_row_actions( $item, $column_name, $primary );
|
||||
|
||||
Reference in New Issue
Block a user