Yoast_Notification_Center::get_user_id()private staticYoast 1.0

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 22.1

private static function get_user_id( $user_id ) {
	if ( $user_id ) {
		return $user_id;
	return get_current_user_id();