is_user_logged_in()
Determines whether the current visitor is a logged in user.
Description
For more information on this and similar theme functions, check out the Conditional Tags article in the Theme Developer Handbook.
Return
(bool) True if user is logged in, false if not logged in.
Source
File: wp-includes/pluggable.php
function is_user_logged_in() {
$user = wp_get_current_user();
return $user->exists();
}
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |