allow main site 404 URL to be filtered, fixes #12758

git-svn-id: https://develop.svn.wordpress.org/trunk@14911 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ron Rennick 2010-05-25 23:41:36 +00:00
parent 47548d6b7d
commit ca9f9c1086

View File

@ -1303,7 +1303,7 @@ function signup_nonce_check( $result ) {
function maybe_redirect_404() {
global $current_site;
if ( apply_filters( 'blog_redirect_404', true ) && is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = 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 );