Make WordPress Core

Ticket #18544: 18544.patch

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

     
    265265                                $redirect['path'] = trailingslashit($redirect['path']) . $addl_path;
    266266                        $redirect_url = $redirect['scheme'] . '://' . $redirect['host'] . $redirect['path'];
    267267                }
     268
     269                if ( 'wp-register.php' == basename( $redirect['path'] ) ) {
     270                        if ( is_multisite() )
     271                                $redirect_url = apply_filters( 'wp_signup_location', site_url('wp-signup.php') );
     272                        else
     273                                $redirect_url = site_url('wp-login.php?action=register');
     274                        wp_redirect( $redirect_url, 301 );
     275                        die();
     276                }
    268277        }
    269278
    270279        // tack on any additional query vars
  • wp-includes/rewrite.php

     
    14951495                        $registration_pages['.*wp-signup.php$'] = $this->index . '?signup=true';
    14961496                        $registration_pages['.*wp-activate.php$'] = $this->index . '?activate=true';
    14971497                }
     1498                $registration_pages['.*wp-register.php$'] = $this->index . '?register=true'; // Deprecated
    14981499
    14991500                // Post
    15001501                $post_rewrite = $this->generate_rewrite_rules($this->permalink_structure, EP_PERMALINK);
  • 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;
    15 ?>