Yoast\WP\SEO\Config
OAuth_Client::get_tokens
Gets the stored tokens and refreshes them if they've expired.
Метод класса: OAuth_Client{}
Хуков нет.
Возвращает
OAuth_Token. The stored tokens.
Использование
$OAuth_Client = new OAuth_Client(); $OAuth_Client->get_tokens();
Код OAuth_Client::get_tokens() OAuth Client::get tokens Yoast 28.4
public function get_tokens() {
if ( empty( $this->token ) ) {
throw new Empty_Token_Exception();
}
if ( $this->token->has_expired() ) {
$this->token = $this->refresh_tokens( $this->token );
}
return $this->token;
}