Yoast\WP\SEO\Config
Wincher_Client::get_authorization_url
Return the authorization URL.
Метод класса: Wincher_Client{}
Хуков нет.
Возвращает
Строку. The authentication URL.
Использование
$Wincher_Client = new Wincher_Client(); $Wincher_Client->get_authorization_url();
Код Wincher_Client::get_authorization_url() Wincher Client::get authorization url Yoast 26.7
public function get_authorization_url() {
$parsed_site_url = \wp_parse_url( \get_site_url() );
$url = $this->provider->getAuthorizationUrl(
[
'state' => WPSEO_Utils::format_json_encode( [ 'domain' => $parsed_site_url['host'] ] ),
]
);
$pkce_code = $this->provider->getPkceCode();
// Store a transient value with the PKCE code that we need in order to
// exchange the returned code for a token after authorization.
\set_transient( self::PKCE_TRANSIENT_NAME, $pkce_code, \DAY_IN_SECONDS );
return $url;
}