Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




maybe_redirect_404 [ WordPress Function ]

maybe_redirect_404 ( No parameters )
Defined at:



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

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics