WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/27/2021 05:47:39 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Docs: Document the usage of $current_user global in get_user_by().

Follow-up to [50790].

Props paaggeli, mukesh27.
Fixes #53088.

File:
1 edited

Legend:

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

    r50790 r50792  
    9393     * @since 4.4.0 Added 'ID' as an alias of 'id' for the `$field` parameter.
    9494     * @since 5.8.0 Returns the global `$current_user` if it's the user being fetched.
     95     *
     96     * @global WP_User $current_user The current user object which holds the user data.
    9597     *
    9698     * @param string     $field The field to retrieve the user with. id | ID | slug | email | login.
Note: See TracChangeset for help on using the changeset viewer.