Yoast\WP\SEO\MyYoast_Client\Application

MyYoast_Client::has_user_token │ public │ Yoast 1.0

Whether the given user has authorized with MyYoast for a resource.

Метод класса: MyYoast_Client{}

Хуков нет.

Возвращает

bool.

Использование

$MyYoast_Client = new MyYoast_Client();
$MyYoast_Client->has_user_token( $user_id, ?string $resource_indicator ): bool;
$user_id(int) (обязательный)
The WordPress user ID.
?string $resource_indicator
.
По умолчанию: null

Код MyYoast_Client::has_user_token() Yoast 28.9

public function has_user_token( int $user_id, ?string $resource_indicator = null ): bool {
	return $this->user_token_storage->get( $user_id, new Resource_Indicator( $resource_indicator ) ) !== null;
}