From c9ac809611cadc2a768ad970982ddabe0e6d18b1 Mon Sep 17 00:00:00 2001 From: Jake Spurlock Date: Tue, 23 Jun 2020 05:54:15 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/class-wp-list-table.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php index fb65d66c94..3c7e6b3a3f 100644 --- a/src/wp-admin/includes/class-wp-list-table.php +++ b/src/wp-admin/includes/class-wp-list-table.php @@ -473,7 +473,7 @@ class WP_List_Table { echo "\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;