Prevent new bulk actions from being added through the bulk_actions-screen filter. fixes #16031 at least for 3.1.

git-svn-id: http://svn.automattic.com/wordpress/trunk@17297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-01-14 07:20:13 +00:00
parent 1968829603
commit dcbe9ba65d

View File

@ -264,11 +264,12 @@ class WP_List_Table {
$screen = get_current_screen();
if ( is_null( $this->_actions ) ) {
$this->_actions = $this->get_bulk_actions();
$no_new_actions = $this->_actions = $this->get_bulk_actions();
// This filter can currently only be used to remove actions.
$this->_actions = apply_filters( 'bulk_actions-' . $screen->id, $this->_actions );
$this->_actions = array_intersect_key( $this->_actions, $no_new_actions );
$two = '';
}
else {
} else {
$two = '2';
}