WordPress.org

Make WordPress Core

Changeset 20596


Ignore:
Timestamp:
04/25/2012 08:49:57 PM (8 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.

Location:
trunk
Files:
1 deleted
3 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
  • trunk/wp-includes/rewrite.php

    r20000 r20596  
    15351535            $registration_pages['.*wp-activate.php$'] = $this->index . '?activate=true';
    15361536        }
     1537        $registration_pages['.*wp-register.php$'] = $this->index . '?register=true'; // Deprecated
    15371538
    15381539        // Post
  • trunk/wp-includes/version.php

    r20593 r20596  
    1212 * @global int $wp_db_version
    1313 */
    14 $wp_db_version = 20148;
     14$wp_db_version = 20596;
    1515
    1616/**
Note: See TracChangeset for help on using the changeset viewer.