maybe_redirect_404 [ WordPress Function ]
maybe_redirect_404 ( No parameters )
| Defined at: |
|
Benzer Fonksiyonlar: 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 ]
Google Arama Sonuçlarý
- 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 - php /** * Sets up the default filters and actions - WordPress SVN
... Register Nonce add_action( 'signup_hidden_fields', 'signup_nonce_fields' ); // Template add_action( 'template_redirect', 'maybe_redirect_404' ); add_filter( ...
core.svn.wordpress.org