函数原型
is_user_logged_in(): bool
函数描述
Determines whether the current visitor is a logged in user.
是否弃用
未弃用
函数参数
无
函数返回值
bool True if user is logged in, false if not logged in.
函数位置
File: wp-includes/pluggable.php.
函数源码
function is_user_logged_in() {
$user = wp_get_current_user();
return $user->exists();
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |

