Make WordPress Core

Ticket #57952: 57952.diff

File 57952.diff, 497 bytes (added by costdev, 3 years ago)

Force action to promote when $_REQUEST['changeit'] is set.

  • src/wp-admin/users.php

    diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php
    index 82abb1dc40..6db545df83 100644
    a b if ( empty( $_REQUEST ) ) { 
    104104
    105105$update = '';
    106106
    107 switch ( $wp_list_table->current_action() ) {
    108 
     107$current_action = isset( $_REQUEST['changeit'] ) ? 'promote' : $wp_list_table->current_action();
     108switch ( $current_action ) {
    109109        /* Bulk Dropdown menu Role changes */
    110110        case 'promote':
    111111                check_admin_referer( 'bulk-users' );