blog_redirect_404
Filters the redirect URL for 404s on the main site.
The filter is only evaluated if the NOBLOGREDIRECT constant is defined.
Usage
add_filter( 'blog_redirect_404', 'wp_kama_blog_redirect_404_filter' );
/**
* Function for `blog_redirect_404` filter-hook.
*
* @param string $no_blog_redirect The redirect URL defined in NOBLOGREDIRECT.
*
* @return string
*/
function wp_kama_blog_redirect_404_filter( $no_blog_redirect ){
// filter...
return $no_blog_redirect;
}
- $no_blog_redirect(string)
- The redirect URL defined in NOBLOGREDIRECT.
Changelog
| Since 3.0.0 | Introduced. |
Where the hook is called
blog_redirect_404
wp-includes/ms-functions.php 2200
$destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT );