Make WordPress Core

Changeset 12916


Ignore:
Timestamp:
02/01/2010 08:12:56 AM (15 years ago)
Author:
dd32
Message:

Revert [12908]. Update Users cap to use a capability. See #12098. Props nacin

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r12908 r12916  
    129129    $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php.
    130130    $submenu['users.php'][5] = array(__('Authors & Users'), 'edit_users', 'users.php');
    131 
    132     if ( ! is_multisite() || get_site_option( 'add_new_users' ) )
    133         $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
     131    $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
    134132
    135133    $submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
  • trunk/wp-admin/users.php

    r12753 r12916  
    255255<div class="wrap">
    256256<?php screen_icon(); ?>
    257 <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 }
     257<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 }
    258258if ( isset($_GET['usersearch']) && $_GET['usersearch'] )
    259259    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', esc_html( $_GET['usersearch'] ) ); ?>
Note: See TracChangeset for help on using the changeset viewer.