diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 265b57cfe2..e603d1dd2f 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -316,7 +316,7 @@ function page_comments_status_meta_box($post){

trackbacks and pingbacks.'); ?>

urlencode($new_user_login), 'update' => $update), $redirect ); + wp_redirect( $redirect . '#user-' . $user_id ); + die(); + } +} + +$title = __('Add New User'); +$parent_file = 'users.php'; + +wp_enqueue_script('admin-users'); +wp_enqueue_script('admin-forms'); + +require_once ('admin-header.php'); + +screen_meta('user'); + +?> +
+

+ + +
+ +
+ + + +
+ get_error_messages() as $message ) + echo "

$message

"; + ?> +
+ +
+ +' . sprintf(__('Users can register themselves or you can manually create users here.'), site_url('wp-register.php')) . '

'; + else + echo '

' . sprintf(__('Users cannot currently register themselves, but you can manually create users here.'), admin_url('options-general.php#users_can_register')) . '

'; +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
+

+ + +

+
+ +
+ + \ No newline at end of file diff --git a/wp-admin/users.php b/wp-admin/users.php index 0bf9cc450b..7b9514eeaa 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -176,23 +176,6 @@ case 'delete': break; -case 'adduser': - check_admin_referer('add-user'); - - if ( ! current_user_can('create_users') ) - wp_die(__('You can’t create users.')); - - $user_id = add_user(); - $update = 'add'; - if ( is_wp_error( $user_id ) ) - $add_user_errors = $user_id; - else { - $new_user_login = apply_filters('pre_user_login', sanitize_user(stripslashes($_REQUEST['user_login']), true)); - $redirect = add_query_arg( array('usersearch' => urlencode($new_user_login), 'update' => $update), $redirect ); - wp_redirect( $redirect . '#user-' . $user_id ); - die(); - } - default: if ( !empty($_GET['_wp_http_referer']) ) { @@ -407,82 +390,7 @@ foreach ( $wp_user_search->get_results() as $userid ) { ?>
- - -
-

- - -
- get_error_messages() as $message ) - echo "

$message

"; - ?> -
- -
- ' . sprintf(__('Users can register themselves or you can manually create users here.'), site_url('wp-register.php')) . '

'; - else - echo '

' . sprintf(__('Users cannot currently register themselves, but you can manually create users here.'), admin_url('options-general.php#users_can_register')) . '

'; -?> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-

- - -

-
- -
- -