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:
dd32 2010-02-01 08:12:56 +00:00
parent e1ec3c052e
commit 94af70dea8
2 changed files with 3 additions and 5 deletions

View File

@ -128,9 +128,7 @@ 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'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
$submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
} else {

View File

@ -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 &#8220;%s&#8221;') . '</span>', esc_html( $_GET['usersearch'] ) ); ?>
</h2>