Make WordPress Core

Changeset 17297


Ignore:
Timestamp:
01/14/2011 07:20:13 AM (14 years ago)
Author:
nacin
Message:

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

File:
1 edited

Legend:

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

    r17271 r17297  
    265265
    266266        if ( is_null( $this->_actions ) ) {
    267             $this->_actions = $this->get_bulk_actions();
     267            $no_new_actions = $this->_actions = $this->get_bulk_actions();
     268            // This filter can currently only be used to remove actions.
    268269            $this->_actions = apply_filters( 'bulk_actions-' . $screen->id, $this->_actions );
     270            $this->_actions = array_intersect_key( $this->_actions, $no_new_actions );
    269271            $two = '';
    270         }
    271         else {
     272        } else {
    272273            $two = '2';
    273274        }
Note: See TracChangeset for help on using the changeset viewer.