Advertisements

maybe_redirect_404

Definition:
function maybe_redirect_404() {}

Correct 404 redirects when NOBLOGREDIRECT is defined.

Defined filters

  • blog_redirect_404
    apply_filters( 'blog_redirect_404', NOBLOGREDIRECT )

Source code

function maybe_redirect_404() {

	global $current_site;

	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();

	}

}

2335

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: