Users: Make sure bulk actions are only executed with the Apply button, not Change.
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
This commit is contained in:
parent
ac66d2f01e
commit
4581452e2b
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue