Ticket #16501: 16501.diff
File 16501.diff, 2.3 KB (added by , 13 years ago) |
---|
-
wp-admin/users.php
48 48 case 'promote': 49 49 check_admin_referer('bulk-users'); 50 50 51 if ( ! current_user_can( 'promote_users' ) ) 52 wp_die( __( 'You can’t edit that user.' ) ); 53 51 54 if ( empty($_REQUEST['users']) ) { 52 55 wp_redirect($redirect); 53 56 exit(); -
wp-admin/includes/class-wp-users-list-table.php
132 132 function extra_tablenav( $which ) { 133 133 if ( 'top' != $which ) 134 134 return; 135 if ( ! current_user_can( 'promote_users' ) ) 136 return; 135 137 ?> 136 138 <div class="alignleft actions"> 137 139 <label class="screen-reader-text" for="new_role"><?php _e( 'Change role to…' ) ?></label> -
wp-admin/menu.php
191 191 if ( current_user_can('list_users') ) { 192 192 $_wp_real_parent_file['profile.php'] = 'users.php'; // Back-compat for plugins adding submenus to profile.php. 193 193 $submenu['users.php'][5] = array(__('Users'), 'list_users', 'users.php'); 194 $submenu['users.php'][10] = array(_x('Add New', 'user'), 'promote_users', 'user-new.php'); 194 if ( current_user_can('create_users') ) 195 $submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php'); 196 else 197 $submenu['users.php'][10] = array(_x('Add New', 'user'), 'promote_users', 'user-new.php'); 195 198 196 199 $submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php'); 197 200 } else { 198 201 $_wp_real_parent_file['users.php'] = 'profile.php'; 199 202 $submenu['profile.php'][5] = array(__('Your Profile'), 'read', 'profile.php'); 200 $submenu['profile.php'][10] = array(__('Add New User'), 'promote_users', 'user-new.php'); 203 if ( current_user_can('create_users') ) 204 $submenu['profile.php'][10] = array(__('Add New User'), 'create_users', 'user-new.php'); 205 else 206 $submenu['profile.php'][10] = array(__('Add New User'), 'promote_users', 'user-new.php'); 201 207 } 202 208 203 209 $menu[75] = array( __('Tools'), 'edit_posts', 'tools.php', '', 'menu-top menu-icon-tools', 'menu-tools', 'div' );