Make WordPress Core


Ignore:
Timestamp:
04/25/2012 08:49:57 PM (13 years ago)
Author:
nacin
Message:

Remove wp-register.php.

  • Don't remove it on update. If you have it now, you'll keep it. New installs won't get it.
  • Peform a redirect using rewrite + canonical to the new location, if the file doesn't exist.

props SergeyBiryukov.
fixes #18544.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/canonical.php

    r20444 r20596  
    278278            $redirect_url = $redirect['scheme'] . '://' . $redirect['host'] . $redirect['path'];
    279279        }
     280
     281        if ( 'wp-register.php' == basename( $redirect['path'] ) ) {
     282            if ( is_multisite() )
     283                $redirect_url = apply_filters( 'wp_signup_location', site_url( 'wp-signup.php' ) );
     284            else
     285                $redirect_url = site_url( 'wp-login.php?action=register' );
     286            wp_redirect( $redirect_url, 301 );
     287            die();
     288        }
    280289    }
    281290
Note: See TracChangeset for help on using the changeset viewer.