wphooks.info - blog_redirect_404

blog_redirect_404

(trunk - 5.0-alpha-42177)

The hook occurs in the following file:

wp-includes/ms-functions.php:
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
function maybe_redirect_404() {
	/**
	 * Filters the redirect URL for 404s on the main site.
	 *
	 * The filter is only evaluated if the NOBLOGREDIRECT constant is defined.
	 *
	 * @since 3.0.0
	 *
	 * @param string $no_blog_redirect The redirect URL defined in NOBLOGREDIRECT.
	 */
	if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT ) ) ) {
		if ( $destination == '%siteurl%' )
			$destination = network_home_url();
		wp_redirect( $destination );
		exit();
	}
}

/**
 * Add a new user to a blog by visiting /newbloguser/{key}/.