Make WordPress Core

Changeset 28766


Ignore:
Timestamp:
06/17/2014 10:16:11 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Prevent bulk actions from being performed when Filter button is clicked.

props layotte.
fixes #28555.

File:
1 edited

Legend:

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

    r28682 r28766  
    372372        echo "</select>\n";
    373373
    374         submit_button( __( 'Apply' ), 'action', false, false, array( 'id' => "doaction$two" ) );
     374        submit_button( __( 'Apply' ), 'action', 'bulk_action', false, array( 'id' => "doaction$two" ) );
    375375        echo "\n";
    376376    }
     
    385385     */
    386386    public function current_action() {
    387         if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
    388             return $_REQUEST['action'];
    389 
    390         if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
    391             return $_REQUEST['action2'];
     387        if ( ! empty( $_REQUEST['bulk_action'] ) ) {
     388
     389            // Bulk Actions drop-down above the list table.
     390            if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
     391                return $_REQUEST['action'];
     392            }
     393
     394            // Bulk Actions drop-down below the list table.
     395            if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
     396                return $_REQUEST['action2'];
     397            }
     398        }
    392399
    393400        return false;
Note: See TracChangeset for help on using the changeset viewer.