mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-12-06 20:58:55 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@20596 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -277,6 +277,15 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
$redirect['path'] = trailingslashit($redirect['path']) . $addl_path;
|
||||
$redirect_url = $redirect['scheme'] . '://' . $redirect['host'] . $redirect['path'];
|
||||
}
|
||||
|
||||
if ( 'wp-register.php' == basename( $redirect['path'] ) ) {
|
||||
if ( is_multisite() )
|
||||
$redirect_url = apply_filters( 'wp_signup_location', site_url( 'wp-signup.php' ) );
|
||||
else
|
||||
$redirect_url = site_url( 'wp-login.php?action=register' );
|
||||
wp_redirect( $redirect_url, 301 );
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
// tack on any additional query vars
|
||||
|
||||
Reference in New Issue
Block a user