Bulk actions being reseted to none
|Reported by:||luis.ferro||Owned by:|
On class-wp-list-table.php there is in line 276 (or very near) a line with:
if ( is_null( $this->_actions ) )
Then if it is null, a block of code runs, supposedly to setup the bulk actions that may exist for the current page.
$no_new_actions = $this->_actions = $this->get_bulk_actions();
$this->get_bulk_actions() returns an empty array, meaning that both $no_new_actions and $this->_actions will take that value.
Then, the $this->_actions get updated with the content of bulk_actions-$screen_id actions.
Then, $this->_actions is parsed by array_intersect_assoc, between $this->_actions and the $no_new_actions.
The problem here is that in effect, the $no_new_actions is an empty array, and the intersection of an empty array with one array is... an empty array!
This means that no "bulk_actions" are actually setup and the table will not show ANY.
To correct the issue, just comment the array_intersect_assoc line.
Change History (3)
comment:1 SergeyBiryukov — 2 years ago
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from new to closed
comment:2 SergeyBiryukov — 2 years ago
- Resolution wontfix deleted
- Status changed from closed to reopened