allow main site 404 URL to be filtered, fixes #12758
git-svn-id: http://svn.automattic.com/wordpress/trunk@14911 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dfc7ce5f38
commit
b8187fcd54
|
@ -1303,7 +1303,7 @@ function signup_nonce_check( $result ) {
|
||||||
|
|
||||||
function maybe_redirect_404() {
|
function maybe_redirect_404() {
|
||||||
global $current_site;
|
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%' )
|
if ( $destination == '%siteurl%' )
|
||||||
$destination = network_home_url();
|
$destination = network_home_url();
|
||||||
wp_redirect( $destination );
|
wp_redirect( $destination );
|
||||||
|
|
Loading…
Reference in New Issue