Revert [12908]. Update Users cap to use a capability. See #12098. Props nacin
git-svn-id: http://svn.automattic.com/wordpress/trunk@12916 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e1ec3c052e
commit
94af70dea8
|
@ -128,8 +128,6 @@ else
|
|||
if ( current_user_can('edit_users') ) {
|
||||
$_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
|
||||
$submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
|
||||
|
||||
if ( ! is_multisite() || get_site_option( 'add_new_users' ) )
|
||||
$submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
|
||||
|
||||
$submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
|
||||
|
|
|
@ -254,7 +254,7 @@ if ( ! empty($messages) ) {
|
|||
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php echo esc_html( $title ); if ( !is_multisite() || get_site_option( 'add_new_users' ) ) { ?> <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'user'); ?></a><?php }
|
||||
<h2><?php echo esc_html( $title ); if ( current_user_can( 'create_users' ) ) { ?> <a href="user-new.php" class="button add-new-h2"><?php echo esc_html_x('Add New', 'user'); ?></a><?php }
|
||||
if ( isset($_GET['usersearch']) && $_GET['usersearch'] )
|
||||
printf( '<span class="subtitle">' . __('Search results for “%s”') . '</span>', esc_html( $_GET['usersearch'] ) ); ?>
|
||||
</h2>
|
||||
|
|
Loading…
Reference in New Issue