Use a filter instead of a new NO404REDIRECT constant. see #12758.
git-svn-id: https://develop.svn.wordpress.org/trunk@14899 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
314a092327
commit
75e66fcb9c
@ -1303,7 +1303,7 @@ function signup_nonce_check( $result ) {
|
||||
|
||||
function maybe_redirect_404() {
|
||||
global $current_site;
|
||||
if ( ( !defined( 'NO404REDIRECT' ) || ! NO404REDIRECT ) && is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = NOBLOGREDIRECT ) ) {
|
||||
if ( apply_filters( 'blog_redirect_404', true ) && is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = NOBLOGREDIRECT ) ) {
|
||||
if ( $destination == '%siteurl%' )
|
||||
$destination = network_home_url();
|
||||
wp_redirect( $destination );
|
||||
|
Loading…
Reference in New Issue
Block a user