Make WordPress Core

Changeset 41272


Ignore:
Timestamp:
08/19/2017 08:18:21 PM (7 years ago)
Author:
DrewAPicture
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/user.php

    r41209 r41272  
    937937 * @since 2.0.4
    938938 *
    939  * @global string $user_login    The user username for logging in
    940  * @global object $userdata      User data.
    941  * @global int    $user_level    The level of the user
    942  * @global int    $user_ID       The ID of the user
    943  * @global string $user_email    The email address of the user
    944  * @global string $user_url      The url in the user's profile
    945  * @global string $user_identity The display name of the user
     939 * @global string  $user_login    The user username for logging in
     940 * @global WP_User $userdata      User data.
     941 * @global int     $user_level    The level of the user
     942 * @global int     $user_ID       The ID of the user
     943 * @global string  $user_email    The email address of the user
     944 * @global string  $user_url      The url in the user's profile
     945 * @global string  $user_identity The display name of the user
    946946 *
    947947 * @param int $for_user_id Optional. User ID to set up global data.
     
    12591259 * @since 3.0.0
    12601260 *
    1261  * @param object|WP_User $user User object to be cached
     1261 * @param WP_User $user User object to be cached
    12621262 * @return bool|null Returns false on failure.
    12631263 */
     
    17471747         * @since 2.0.0
    17481748         *
    1749          * @param int    $user_id       User ID.
    1750          * @param object $old_user_data Object containing user's data prior to update.
     1749         * @param int     $user_id       User ID.
     1750         * @param WP_User $old_user_data Object containing user's data prior to update.
    17511751         */
    17521752        do_action( 'profile_update', $user_id, $old_user_data );
     
    17781778 * @see wp_insert_user() For what fields can be set in $userdata.
    17791779 *
    1780  * @param mixed $userdata An array of user data or a user object of type stdClass or WP_User.
     1780 * @param object|WP_User $userdata An array of user data or a user object of type stdClass or WP_User.
    17811781 * @return int|WP_Error The updated user's ID or a WP_Error object if the user could not be updated.
    17821782 */
     
    22832283 * @since 2.5.0
    22842284 *
    2285  * @param object $user     The user
     2285 * @param WP_User $user     The user
    22862286 * @param string $new_pass New password for the user in plaintext
    22872287 */
     
    23052305     * @since 4.4.0
    23062306     *
    2307      * @param object $user     The user.
    2308      * @param string $new_pass New user password.
     2307     * @param WP_User $user     The user.
     2308     * @param string  $new_pass New user password.
    23092309     */
    23102310    do_action( 'after_password_reset', $user, $new_pass );
Note: See TracChangeset for help on using the changeset viewer.