From 01a61186605a87e95f89870a51c75de5519d82d1 Mon Sep 17 00:00:00 2001 From: johnbillion Date: Sun, 4 Dec 2016 19:23:53 +0000 Subject: [PATCH] Users: Clarify the return value of `get_current_user_id()` for non-logged-in users. Props ovenall Fixes #39051 git-svn-id: https://develop.svn.wordpress.org/trunk@39486 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php index 028606385b..6f5dae67f9 100644 --- a/src/wp-includes/user.php +++ b/src/wp-includes/user.php @@ -420,7 +420,7 @@ function count_many_users_posts( $users, $post_type = 'post', $public_only = fal * * @since MU * - * @return int The current user's ID + * @return int The current user's ID, or 0 if no user is logged in. */ function get_current_user_id() { if ( ! function_exists( 'wp_get_current_user' ) )