Skip to content

atmosphere_oauth_redirect_uri

github-actions[bot] edited this page Jul 14, 2026 · 9 revisions

Filters the OAuth redirect URI.

Allows consumers (e.g. wrapper plugins) to set their own callback URL so the OAuth flow returns to their admin page instead of the default Atmosphere settings page. The return MUST be a string pointing at this site's admin area over HTTPS — anything else is rejected to prevent a malicious or buggy filter from redirecting OAuth codes off-site or over cleartext.

Auto-generated Example

/**
 * Filters the OAuth redirect URI.
 * 
 * Allows consumers (e.g. wrapper plugins) to set their own callback
 * URL so the OAuth flow returns to their admin page instead of the
 * default Atmosphere settings page. The return MUST be a string
 * pointing at this site's admin area over HTTPS — anything else is
 * rejected to prevent a malicious or buggy filter from redirecting
 * OAuth codes off-site or over cleartext.
 *
 * @param string $uri 
 * @return string The filtered value.
 */
function my_atmosphere_oauth_redirect_uri_callback( string $uri ) {
    // Your code here.
    return $uri;
}
add_filter( 'atmosphere_oauth_redirect_uri', 'my_atmosphere_oauth_redirect_uri_callback' );

Parameters

  • string $uri Default redirect URI.

Files

\apply_filters( 'atmosphere_oauth_redirect_uri', $uri )

← All Hooks

Clone this wiki locally