mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Users: Correct a permission check when showing the User item in the + New admin toolbar menu.
Props dlh Fixes #39252 git-svn-id: https://develop.svn.wordpress.org/trunk@40581 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -718,8 +718,9 @@ function wp_admin_bar_new_content_menu( $wp_admin_bar ) {
|
||||
if ( isset( $actions['post-new.php?post_type=content'] ) )
|
||||
$actions['post-new.php?post_type=content'][1] = 'add-new-content';
|
||||
|
||||
if ( current_user_can( 'create_users' ) || current_user_can( 'promote_users' ) )
|
||||
if ( current_user_can( 'create_users' ) || ( is_multisite() && current_user_can( 'promote_users' ) ) ) {
|
||||
$actions[ 'user-new.php' ] = array( _x( 'User', 'add new from admin bar' ), 'new-user' );
|
||||
}
|
||||
|
||||
if ( ! $actions )
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user