wpseo_myyoast_authorization_redirect_uri хук-фильтрYoast 1.0

Filters the redirect URI embedded in a single MyYoast authorization request.

The returned value must be one of the client's registered redirect URIs; a value that is not registered is ignored to avoid an OAuth redirect_uri mismatch, and the computed default is used instead.

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

add_filter( 'wpseo_myyoast_authorization_redirect_uri', 'wp_kama_wpseo_myyoast_authorization_redirect_uri_filter', 10, 6 );

/**
 * Function for `wpseo_myyoast_authorization_redirect_uri` filter-hook.
 * 
 * @param string             $redirect_uri       The redirect URI to embed. Must be one of $client's registered redirect_uris.
 * @param Registered_Client  $client             The registered client for this flow.
 * @param int                $user_id            The WordPress user ID starting the flow.
 * @param string[]           $scopes             The scopes being requested.
 * @param Resource_Indicator $resource_indicator The RFC 8707 resource indicator the token will be bound to.
 * @param string|null        $return_url         The URL the user returns to after authorization, or null.
 *
 * @return string
 */
function wp_kama_wpseo_myyoast_authorization_redirect_uri_filter( $redirect_uri, $client, $user_id, $scopes, $resource_indicator, $return_url ){

	// filter...
	return $redirect_uri;
}
$redirect_uri(строка)
The redirect URI to embed. Must be one of $client's registered redirect_uris.
$client(Registered_Client)
The registered client for this flow.
$user_id(int)
The WordPress user ID starting the flow.
$scopes(string[])
The scopes being requested.
$resource_indicator(Resource_Indicator)
The RFC 8707 resource indicator the token will be bound to.
$return_url(строка|null)
The URL the user returns to after authorization, or null.

Где вызывается хук

Redirect_URI_Provider::get_authorization_redirect_uri()
wpseo_myyoast_authorization_redirect_uri
yoast/src/myyoast-client/infrastructure/wordpress/redirect-uri-provider.php 103-111
$filtered = \apply_filters(
	'wpseo_myyoast_authorization_redirect_uri',
	$chosen,
	$client,
	$user_id,
	$scopes,
	$resource_indicator,
	$return_url,
);

Где используется хук в Yoast SEO

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