Prevent bulk actions from being performed when Filter button is clicked.
props layotte. fixes #28555. Built from https://develop.svn.wordpress.org/trunk@28766 git-svn-id: http://core.svn.wordpress.org/trunk@28579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f1a15dd4fe
commit
cd7618399e
|
@ -371,7 +371,7 @@ class WP_List_Table {
|
||||||
|
|
||||||
echo "</select>\n";
|
echo "</select>\n";
|
||||||
|
|
||||||
submit_button( __( 'Apply' ), 'action', false, false, array( 'id' => "doaction$two" ) );
|
submit_button( __( 'Apply' ), 'action', 'bulk_action', false, array( 'id' => "doaction$two" ) );
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -384,11 +384,18 @@ class WP_List_Table {
|
||||||
* @return string|bool The action name or False if no action was selected
|
* @return string|bool The action name or False if no action was selected
|
||||||
*/
|
*/
|
||||||
public function current_action() {
|
public function current_action() {
|
||||||
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )
|
if ( ! empty( $_REQUEST['bulk_action'] ) ) {
|
||||||
return $_REQUEST['action'];
|
|
||||||
|
|
||||||
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )
|
// Bulk Actions drop-down above the list table.
|
||||||
|
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
|
||||||
|
return $_REQUEST['action'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bulk Actions drop-down below the list table.
|
||||||
|
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
|
||||||
return $_REQUEST['action2'];
|
return $_REQUEST['action2'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue