diff -r be944660c56a -r 3d72ae0968f4 wp/wp-admin/includes/user.php --- a/wp/wp-admin/includes/user.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-admin/includes/user.php Tue Sep 27 16:37:53 2022 +0200 @@ -25,7 +25,7 @@ * @since 2.0.0 * * @param int $user_id Optional. User ID. - * @return int|WP_Error User ID of the updated user. + * @return int|WP_Error User ID of the updated user or WP_Error on failure. */ function edit_user( $user_id = 0 ) { $wp_roles = wp_roles(); @@ -174,7 +174,7 @@ // Checking the password has been typed twice the same. if ( ( $update || ! empty( $pass1 ) ) && $pass1 != $pass2 ) { - $errors->add( 'pass', __( 'Error: Passwords don’t match. Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) ); + $errors->add( 'pass', __( 'Error: Passwords do not match. Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) ); } if ( ! empty( $pass1 ) ) { @@ -200,7 +200,7 @@ if ( empty( $user->user_email ) ) { $errors->add( 'empty_email', __( 'Error: Please enter an email address.' ), array( 'form-field' => 'email' ) ); } elseif ( ! is_email( $user->user_email ) ) { - $errors->add( 'invalid_email', __( 'Error: The email address isn’t correct.' ), array( 'form-field' => 'email' ) ); + $errors->add( 'invalid_email', __( 'Error: The email address is not correct.' ), array( 'form-field' => 'email' ) ); } else { $owner_id = email_exists( $user->user_email ); if ( $owner_id && ( ! $update || ( $owner_id != $user->ID ) ) ) { @@ -234,9 +234,9 @@ * * @since 4.4.0 * - * @param int $user_id ID of the newly created user. - * @param string $notify Type of notification that should happen. See wp_send_new_user_notifications() - * for more information on possible values. + * @param int|WP_Error $user_id ID of the newly created user or WP_Error on failure. + * @param string $notify Type of notification that should happen. See + * wp_send_new_user_notifications() for more information. */ do_action( 'edit_user_created_user', $user_id, $notify ); } @@ -510,10 +510,11 @@ /** * @since 2.8.0 * - * @global string $pagenow + * @global string $pagenow The filename of the current screen. */ function default_password_nag() { global $pagenow; + // Short-circuit it. if ( 'profile.php' === $pagenow || ! get_user_option( 'default_password_nag' ) ) { return; @@ -536,7 +537,7 @@ function delete_users_add_js() { ?> add( 'invalid_redirect_scheme', - __( 'The success url must be served over a secure connection.' ) + __( 'The success URL must be served over a secure connection.' ) ); } } @@ -631,7 +638,7 @@ if ( 'http' === $scheme ) { $error->add( 'invalid_redirect_scheme', - __( 'The rejection url must be served over a secure connection.' ) + __( 'The rejection URL must be served over a secure connection.' ) ); } } @@ -639,7 +646,7 @@ if ( ! empty( $request['app_id'] ) && ! wp_is_uuid( $request['app_id'] ) ) { $error->add( 'invalid_app_id', - __( 'The app id must be a uuid.' ) + __( 'The application ID must be a UUID.' ) ); }