Quick/Bulk Edit: By the power vested in me, I hereby declare the top bulk actions and the bottom bulk actions joined forever in MatrimonyScript.

This joyous marriage means that users will no longer find a selected top bulk action on a list table unexpectedly being applied instead of their selected bottom bulk action. The top and bottom controls for changing user roles are equally wedded forever too.

Props clayray, subrataemfluence, garrett-eclipse, pbiron, hareesh-pillai

Fixes #46872


git-svn-id: https://develop.svn.wordpress.org/trunk@49944 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2021-01-07 16:21:09 +00:00
parent 6409904a19
commit 9010454dfe
13 changed files with 81 additions and 32 deletions
+1 -6
View File
@@ -112,12 +112,7 @@ switch ( $wp_list_table->current_action() ) {
}
$editable_roles = get_editable_roles();
$role = false;
if ( ! empty( $_REQUEST['new_role2'] ) ) {
$role = $_REQUEST['new_role2'];
} elseif ( ! empty( $_REQUEST['new_role'] ) ) {
$role = $_REQUEST['new_role'];
}
$role = $_REQUEST['new_role'];
if ( ! $role || empty( $editable_roles[ $role ] ) ) {
wp_die( __( 'Sorry, you are not allowed to give users that role.' ), 403 );