Quick/Bulk Edit: Ensure the proper actions is triggered when using the bulk updater.

If a user selects the top option, then chooses a different option, the top selection takes precedence. This update gives a new name to the bottom action, ensuring the proper update is carried out.

Fixes 46872.

Props clayray, garrett-eclipse, subrataemfluence. 



git-svn-id: https://develop.svn.wordpress.org/trunk@48134 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jake Spurlock 2020-06-23 05:54:15 +00:00
parent 7b08983ce4
commit c9ac809611
1 changed files with 5 additions and 5 deletions

View File

@ -473,7 +473,7 @@ class WP_List_Table {
echo "</select>\n";
submit_button( __( 'Apply' ), 'action', '', false, array( 'id' => "doaction$two" ) );
submit_button( __( 'Apply' ), 'action', "doaction$two", false, array( 'id' => "doaction$two" ) );
echo "\n";
}
@ -489,12 +489,12 @@ class WP_List_Table {
return false;
}
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
return $_REQUEST['action'];
if ( isset( $_REQUEST['doaction2'] ) && isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
return $_REQUEST['action2'];
}
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
return $_REQUEST['action2'];
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
return $_REQUEST['action'];
}
return false;