From bc9e25d05348615c5f893d6c9273857ecd9c4eaf Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Mon, 24 Aug 2015 22:22:33 +0000 Subject: [PATCH] Docs: Clarify the return description for `wp_create_user()` to illustrate that a `WP_Error` object will be returned on failure. Props jmayhak Fixes #33321. git-svn-id: https://develop.svn.wordpress.org/trunk@33725 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 4cdf9f41f8..ada22b2226 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -2365,7 +2365,8 @@ All at ###SITENAME### * @param string $username The user's username. * @param string $password The user's password. * @param string $email Optional. The user's email. Default empty. - * @return int|WP_Error The new user's ID. + * @return int|WP_Error The newly created user's ID or a WP_Error object if the user could not + * be created. */ function wp_create_user($username, $password, $email = '') { $user_login = wp_slash( $username );