Changeset 20631
- Timestamp:
- 04/27/2012 11:13:39 PM (12 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/user-new.php
r20332 r20631 99 99 $add_user_errors = $user_id; 100 100 } else { 101 if ( current_user_can('edit_users') ) { 102 $new_user_login = apply_filters('pre_user_login', sanitize_user(stripslashes($_REQUEST['user_login']), true)); 103 $redirect = 'users.php?usersearch='. urlencode($new_user_login) . '&update=add' . '#user-' . $user_id; 104 } else { 101 if ( current_user_can( 'list_users' ) ) 102 $redirect = 'users.php?update=add&id=' . $user_id; 103 else 105 104 $redirect = add_query_arg( 'update', 'add', 'user-new.php' ); 106 }107 105 wp_redirect( $redirect ); 108 106 die(); -
trunk/wp-admin/users.php
r20332 r20631 354 354 case 'del_many': 355 355 $delete_count = isset($_GET['delete_count']) ? (int) $_GET['delete_count'] : 0; 356 $messages[] = '<div id="message" class="updated"><p>' . sprintf( _n('%s user deleted', '%s users deleted', $delete_count), $delete_count) . '</p></div>';356 $messages[] = '<div id="message" class="updated"><p>' . sprintf( _n( 'User deleted.', '%s users deleted.', $delete_count ), number_format_i18n( $delete_count ) ) . '</p></div>'; 357 357 break; 358 358 case 'add': 359 $messages[] = '<div id="message" class="updated"><p>' . __('New user created.') . '</p></div>'; 359 if ( isset( $_GET['id'] ) && ( $user_id = $_GET['id'] ) && current_user_can( 'edit_user', $user_id ) ) { 360 $messages[] = '<div id="message" class="updated"><p>' . sprintf( __( 'New user created. <a href="%s">Edit user</a>' ), 361 esc_url( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), 362 self_admin_url( 'user-edit.php?user_id=' . $user_id ) ) ) ) . '</p></div>'; 363 } else { 364 $messages[] = '<div id="message" class="updated"><p>' . __( 'New user created.' ) . '</p></div>'; 365 } 360 366 break; 361 367 case 'promote':
Note: See TracChangeset
for help on using the changeset viewer.