WordPress开发者和主题制作者的搜索引擎



determine_current_user ›

Since3.9.0
已弃用n/a
apply_filters( 'determine_current_user', false )
参数:
  • (int|bool) $user_id User ID if one has been determined, false otherwise.
    Required: Yes
定义在:
文档:

Filters the current user.

The default filters use this to determine the current user from the request's cookies, if available.

Returning a value of false will effectively short-circuit setting the current user.





源码

$user_id = apply_filters( 'determine_current_user', false );