Yoast\WP\SEO\MyYoast_Client\Infrastructure\WordPress
Redirect_URI_Provider::get_redirect_uris
Returns the redirect URIs to register this client with.
Defaults to the canonical admin callback URL, which the wpseo_myyoast_redirect_uris may extend, remove, or replace. Always returns at least one URI.
Метод класса: Redirect_URI_Provider{}
Хуки из метода
Возвращает
Строку[]. The redirect URIs to register.
Использование
$Redirect_URI_Provider = new Redirect_URI_Provider(); $Redirect_URI_Provider->get_redirect_uris(): array;
Код Redirect_URI_Provider::get_redirect_uris() Redirect URI Provider::get redirect uris Yoast 28.3
public function get_redirect_uris(): array {
$canonical = $this->get_canonical_redirect_uri();
/**
* Filters the redirect URIs registered with MyYoast for this site.
*
* Use this to register additional OAuth callback URLs for non-standard setups (reverse
* proxies, alternate admin URLs, ...), or to replace the default callback URL entirely. The
* canonical admin callback URL is passed as the default and may be removed or replaced.
*
* @param string[] $redirect_uris The redirect URIs to register. Defaults to the canonical admin callback URL.
*/
$filtered = \apply_filters( 'wpseo_myyoast_redirect_uris', [ $canonical ] );
$redirect_uris = $this->unique( $this->only_valid_uris( $filtered ) );
// At least one redirect URI is required to register; fall back to the canonical URL when the filter empties the set.
if ( $redirect_uris === [] ) {
return [ $canonical ];
}
return $redirect_uris;
}