wp_safe_redirect_fallback
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_fallback
wp-includes/pluggable.php 1541
$fallback_url = apply_filters( 'wp_safe_redirect_fallback', admin_url(), $status );