maybe_redirect_404 [ WordPress Function ]
maybe_redirect_404 ( No parameters )
| Defined at: |
|
Soorgelijke functies: auth_redirect, wp_safe_redirect, wp_redirect, is_redirect, wp_validate_redirect
Correct 404 redirects when NOBLOGREDIRECT is defined.
Source
<?php
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();
}
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- ms-functions.php
May 7, 2010 ... is_user_spammy(). maybe_add_existing_user_to_blog(). maybe_redirect_404(). newblog_notify_siteadmin(). newuser_notify_siteadmin() ...
www.tig12.net - WordPress 3.0 Multisite – Subdomain installation NOBLOGREDIRECT
Jun 5, 2010 ... The function that is causing the bad behavior of not directing 404 pages properly is maybe_redirect_404() and it's being called as an ...
frumph.net - #13689 (multisite noblogredirect set, 404 error result not sending ...
function maybe_redirect_404() is not needed, .. at all. ... If I completely remove maybe_redirect_404() and it's filter call for it *everything* works in multisite, the ...
core.trac.wordpress.org - WordPress › Support » Multisite with forum plugin Simple:Press
As a workaround, I created a script with this: <?php remove_action( ' template_redirect', 'maybe_redirect_404' ); ?> and put it in my wp-content/mu- plugins folder.
wordpress.org