Docs: Add a note to the DocBlock for `wp_signon()` mentioning that it doesn't handle setting the current user.

Also outlines the conditions that must be met for is_user_logged_in() to work with it.

Part props SergeyBiryukov.
Fixes #28116.

Built from https://develop.svn.wordpress.org/trunk@40943


git-svn-id: http://core.svn.wordpress.org/trunk@40793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2017-06-25 20:08:40 +00:00
parent de7499f88f
commit f6bf00d378
2 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,11 @@
* set for a longer period depending on if the 'remember' credential is set to
* true.
*
* Note: wp_signon() doesn't handle setting the current user. This means that if the
* function is called before the {@see 'init'} hook is fired, is_user_logged_in() will
* evaluate as false until that point. If is_user_logged_in() is needed in conjunction
* with wp_signon(), wp_set_current_user() should be called explicitly.
*
* @since 2.5.0
*
* @global string $auth_secure_cookie

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-40942';
$wp_version = '4.9-alpha-40943';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.