Make WordPress Core

Ticket #18544: 18544.2.patch

File 18544.2.patch, 1.8 KB (added by SergeyBiryukov, 13 years ago)
  • wp-includes/canonical.php

     
    277277                                $redirect['path'] = trailingslashit($redirect['path']) . $addl_path;
    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
    282291        // tack on any additional query vars
  • wp-includes/rewrite.php

     
    15341534                        $registration_pages['.*wp-signup.php$'] = $this->index . '?signup=true';
    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
    15391540                $post_rewrite = $this->generate_rewrite_rules( $this->permalink_structure, EP_PERMALINK, false, true, false, false );
  • wp-register.php

     
    1 <?php
    2 /**
    3  * Used to be the page which displayed the registration form.
    4  *
    5  * This file is no longer used in WordPress and is
    6  * deprecated.
    7  *
    8  * @package WordPress
    9  * @deprecated Use wp_register() to create a registration link instead
    10  */
    11 
    12 require('./wp-load.php');
    13 wp_redirect( site_url('wp-login.php?action=register') );
    14 exit;