Yoast_Notification_Center::get_user_id()
Returns the given user ID if it exists. Otherwise, this function returns the ID of the current user.
Метод класса: Yoast_Notification_Center{}
Хуков нет.
Возвращает
int
. The user ID to use.
Использование
$result = Yoast_Notification_Center::get_user_id( $user_id );
- $user_id(int) (обязательный)
- The user ID to check.
Код Yoast_Notification_Center::get_user_id() Yoast Notification Center::get user id Yoast 22.4
private static function get_user_id( $user_id ) { if ( $user_id ) { return $user_id; } return get_current_user_id(); }