blog_redirect_404
Filters the redirect URL for 404s on the main site.
The filter is only evaluated if the NOBLOGREDIRECT constant is defined.
Использование
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(строка)
- The redirect URL defined in NOBLOGREDIRECT.
Список изменений
| С версии 3.0.0 | Введена. |
Где вызывается хук
blog_redirect_404
wp-includes/ms-functions.php 2200
$destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT );