From 4581452e2ba147e7c66a90d7f0c618ac783ab963 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 28 May 2023 11:46:24 +0000 Subject: [PATCH] Users: Make sure bulk actions are only executed with the Apply button, not Change. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Change button is supposed to perform the “Change role to...” action only, but could unintentionally be used for other bulk actions if the role was not selected. This commit removes an extra check and ensures the correct error message is displayed in that case: Sorry, you are not allowed to give users that role. Follow-up to [6990], [8691], [9028], [15576], [15642], [34636], [49944]. Props haritpanchal, costdev, ankit-k-gupta, SergeyBiryukov. Fixes #57952. Built from https://develop.svn.wordpress.org/trunk@55864 git-svn-id: http://core.svn.wordpress.org/trunk@55376 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-users-list-table.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-users-list-table.php b/wp-admin/includes/class-wp-users-list-table.php index c2cd68102d..0426603342 100644 --- a/wp-admin/includes/class-wp-users-list-table.php +++ b/wp-admin/includes/class-wp-users-list-table.php @@ -353,7 +353,7 @@ class WP_Users_List_Table extends WP_List_Table { * @return string The bulk action required. */ public function current_action() { - if ( isset( $_REQUEST['changeit'] ) && ! empty( $_REQUEST['new_role'] ) ) { + if ( isset( $_REQUEST['changeit'] ) ) { return 'promote'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 5f061e4ac9..50dc350fb9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55863'; +$wp_version = '6.3-alpha-55864'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.