WordPress.org

Make WordPress Core

Ticket #13689: maybe_blog_redirect_removal.diff

File maybe_blog_redirect_removal.diff, 1.2 KB (added by Frumph, 11 years ago)
  • wp-includes/ms-default-filters.php

     
    2929add_action( 'signup_hidden_fields', 'signup_nonce_fields' );
    3030
    3131// Template
    32 add_action( 'template_redirect', 'maybe_redirect_404' );
    3332add_filter( 'allowed_redirect_hosts', 'redirect_this_site' );
    3433
    3534// Administration
  • wp-includes/ms-functions.php

     
    13081308        return $result;
    13091309}
    13101310
    1311 function maybe_redirect_404() {
    1312         global $current_site;
    1313         if ( is_main_site() && is_404() && defined( 'NOBLOGREDIRECT' ) && ( $destination = apply_filters( 'blog_redirect_404', NOBLOGREDIRECT ) ) ) {
    1314                 if ( $destination == '%siteurl%' )
    1315                         $destination = network_home_url();
    1316                 wp_redirect( $destination );
    1317                 exit();
    1318         }
    1319 }
    1320 
    13211311function maybe_add_existing_user_to_blog() {
    13221312        if ( false === strpos( $_SERVER[ 'REQUEST_URI' ], '/newbloguser/' ) )
    13231313                return false;