wp_safe_redirect_fallback filter-hookWP 4.3.0

Filters the redirect fallback URL for when the provided redirect is not safe (local).

Usage

add_filter( 'wp_safe_redirect_fallback', 'wp_kama_safe_redirect_fallback_filter', 10, 2 );

/**
 * Function for `wp_safe_redirect_fallback` filter-hook.
 * 
 * @param string $fallback_url The fallback URL to use by default.
 * @param int    $status       The HTTP response status code to use.
 *
 * @return string
 */
function wp_kama_safe_redirect_fallback_filter( $fallback_url, $status ){

	// filter...
	return $fallback_url;
}
$fallback_url(string)
The fallback URL to use by default.
$status(int)
The HTTP response status code to use.

Changelog

Since 4.3.0 Introduced.

Where the hook is called

wp_safe_redirect()
wp_safe_redirect_fallback
wp-includes/pluggable.php 1527
$location = wp_validate_redirect( $location, apply_filters( 'wp_safe_redirect_fallback', admin_url(), $status ) );

Where the hook is used in WordPress

Usage not found.