From d2b78649a2d8d314fc9930ee895696f400e52ff5 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sat, 19 Aug 2017 20:19:44 +0000 Subject: [PATCH] Docs: Document user object parameters for a variety of functions in wp-includes/user.php as `WP_User` type instead of the more generic `object` type. Props sebastianpisula. Fixes #40945. Built from https://develop.svn.wordpress.org/trunk@41272 git-svn-id: http://core.svn.wordpress.org/trunk@41112 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/user.php | 28 ++++++++++++++-------------- wp-includes/version.php | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/wp-includes/user.php b/wp-includes/user.php index d2f57e9be5..8ca02539e1 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -936,13 +936,13 @@ function count_users( $strategy = 'time', $site_id = null ) { * * @since 2.0.4 * - * @global string $user_login The user username for logging in - * @global object $userdata User data. - * @global int $user_level The level of the user - * @global int $user_ID The ID of the user - * @global string $user_email The email address of the user - * @global string $user_url The url in the user's profile - * @global string $user_identity The display name of the user + * @global string $user_login The user username for logging in + * @global WP_User $userdata User data. + * @global int $user_level The level of the user + * @global int $user_ID The ID of the user + * @global string $user_email The email address of the user + * @global string $user_url The url in the user's profile + * @global string $user_identity The display name of the user * * @param int $for_user_id Optional. User ID to set up global data. */ @@ -1258,7 +1258,7 @@ function sanitize_user_field($field, $value, $user_id, $context) { * * @since 3.0.0 * - * @param object|WP_User $user User object to be cached + * @param WP_User $user User object to be cached * @return bool|null Returns false on failure. */ function update_user_caches( $user ) { @@ -1746,8 +1746,8 @@ function wp_insert_user( $userdata ) { * * @since 2.0.0 * - * @param int $user_id User ID. - * @param object $old_user_data Object containing user's data prior to update. + * @param int $user_id User ID. + * @param WP_User $old_user_data Object containing user's data prior to update. */ do_action( 'profile_update', $user_id, $old_user_data ); } else { @@ -1777,7 +1777,7 @@ function wp_insert_user( $userdata ) { * * @see wp_insert_user() For what fields can be set in $userdata. * - * @param mixed $userdata An array of user data or a user object of type stdClass or WP_User. + * @param object|WP_User $userdata An array of user data or a user object of type stdClass or WP_User. * @return int|WP_Error The updated user's ID or a WP_Error object if the user could not be updated. */ function wp_update_user($userdata) { @@ -2282,7 +2282,7 @@ function check_password_reset_key($key, $login) { * * @since 2.5.0 * - * @param object $user The user + * @param WP_User $user The user * @param string $new_pass New password for the user in plaintext */ function reset_password( $user, $new_pass ) { @@ -2304,8 +2304,8 @@ function reset_password( $user, $new_pass ) { * * @since 4.4.0 * - * @param object $user The user. - * @param string $new_pass New user password. + * @param WP_User $user The user. + * @param string $new_pass New user password. */ do_action( 'after_password_reset', $user, $new_pass ); } diff --git a/wp-includes/version.php b/wp-includes/version.php index 464999f3e1..9d94e3ebe4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.9-alpha-41271'; +$wp_version = '4.9-alpha-41272'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.