From cbfa060298aa00dd1ccfe41523f9aa2f442daf2d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 27 Apr 2021 17:49:06 +0000 Subject: [PATCH] Docs: Document the usage of `$current_user` global in `get_user_by()`. Follow-up to [50790]. Props paaggeli, mukesh27. Fixes #53088. Built from https://develop.svn.wordpress.org/trunk@50792 git-svn-id: http://core.svn.wordpress.org/trunk@50401 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/pluggable.php b/wp-includes/pluggable.php index 0e4cbe80e1..18480c219a 100644 --- a/wp-includes/pluggable.php +++ b/wp-includes/pluggable.php @@ -93,6 +93,8 @@ if ( ! function_exists( 'get_user_by' ) ) : * @since 4.4.0 Added 'ID' as an alias of 'id' for the `$field` parameter. * @since 5.8.0 Returns the global `$current_user` if it's the user being fetched. * + * @global WP_User $current_user The current user object which holds the user data. + * * @param string $field The field to retrieve the user with. id | ID | slug | email | login. * @param int|string $value A value for $field. A user ID, slug, email address, or login name. * @return WP_User|false WP_User object on success, false on failure. diff --git a/wp-includes/version.php b/wp-includes/version.php index e2c5117230..f0233bc13b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-50791'; +$wp_version = '5.8-alpha-50792'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.