determine_current_user

过滤钩子


apply_filters( 'determine_current_user', false )
参数
  • (int|false)
    $user_id
    User ID if one has been determined, false otherwise.
    Required:
定义位置
  • wp-includes/user.php
    , line 3604
引入
3.9.0
弃用

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 );