Users: Don't show roles dropdown on user-edit.php if current user cannot promote user.
Fixes #43580. Built from https://develop.svn.wordpress.org/trunk@42856 git-svn-id: http://core.svn.wordpress.org/trunk@42686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
61ba57abb7
commit
80c9ed8bfa
|
@ -391,7 +391,7 @@ if ( IS_PROFILE_PAGE ) {
|
||||||
<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profileuser->user_login ); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e( 'Usernames cannot be changed.' ); ?></span></td>
|
<td><input type="text" name="user_login" id="user_login" value="<?php echo esc_attr( $profileuser->user_login ); ?>" disabled="disabled" class="regular-text" /> <span class="description"><?php _e( 'Usernames cannot be changed.' ); ?></span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() ) : ?>
|
<?php if ( ! IS_PROFILE_PAGE && ! is_network_admin() && current_user_can( 'promote_user', $profileuser->ID ) ) : ?>
|
||||||
<tr class="user-role-wrap"><th><label for="role"><?php _e( 'Role' ); ?></label></th>
|
<tr class="user-role-wrap"><th><label for="role"><?php _e( 'Role' ); ?></label></th>
|
||||||
<td><select name="role" id="role">
|
<td><select name="role" id="role">
|
||||||
<?php
|
<?php
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-42855';
|
$wp_version = '5.0-alpha-42856';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue