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
This commit is contained in:
Drew Jaynes 2017-08-19 20:19:44 +00:00
parent 7f7d4ef451
commit d2b78649a2
2 changed files with 15 additions and 15 deletions

View File

@ -936,13 +936,13 @@ function count_users( $strategy = 'time', $site_id = null ) {
* *
* @since 2.0.4 * @since 2.0.4
* *
* @global string $user_login The user username for logging in * @global string $user_login The user username for logging in
* @global object $userdata User data. * @global WP_User $userdata User data.
* @global int $user_level The level of the user * @global int $user_level The level of the user
* @global int $user_ID The ID 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_email The email address of the user
* @global string $user_url The url in the user's profile * @global string $user_url The url in the user's profile
* @global string $user_identity The display name of the user * @global string $user_identity The display name of the user
* *
* @param int $for_user_id Optional. User ID to set up global data. * @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 * @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. * @return bool|null Returns false on failure.
*/ */
function update_user_caches( $user ) { function update_user_caches( $user ) {
@ -1746,8 +1746,8 @@ function wp_insert_user( $userdata ) {
* *
* @since 2.0.0 * @since 2.0.0
* *
* @param int $user_id User ID. * @param int $user_id User ID.
* @param object $old_user_data Object containing user's data prior to update. * @param WP_User $old_user_data Object containing user's data prior to update.
*/ */
do_action( 'profile_update', $user_id, $old_user_data ); do_action( 'profile_update', $user_id, $old_user_data );
} else { } else {
@ -1777,7 +1777,7 @@ function wp_insert_user( $userdata ) {
* *
* @see wp_insert_user() For what fields can be set in $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. * @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) { function wp_update_user($userdata) {
@ -2282,7 +2282,7 @@ function check_password_reset_key($key, $login) {
* *
* @since 2.5.0 * @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 * @param string $new_pass New password for the user in plaintext
*/ */
function reset_password( $user, $new_pass ) { function reset_password( $user, $new_pass ) {
@ -2304,8 +2304,8 @@ function reset_password( $user, $new_pass ) {
* *
* @since 4.4.0 * @since 4.4.0
* *
* @param object $user The user. * @param WP_User $user The user.
* @param string $new_pass New user password. * @param string $new_pass New user password.
*/ */
do_action( 'after_password_reset', $user, $new_pass ); do_action( 'after_password_reset', $user, $new_pass );
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.