diff --git a/wp-activate.php b/wp-activate.php
index a796cc5..ee6d818 100644
a
|
b
|
require( dirname(__FILE__) . '/wp-load.php' ); |
14 | 14 | require( dirname( __FILE__ ) . '/wp-blog-header.php' ); |
15 | 15 | |
16 | 16 | if ( !is_multisite() ) { |
17 | | wp_redirect( site_url( '/wp-login.php?action=register' ) ); |
| 17 | wp_redirect( wp_registration_url() ); |
18 | 18 | die(); |
19 | 19 | } |
20 | 20 | |
diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php
index f75a72e..7bb0915 100644
a
|
b
|
function redirect_canonical( $requested_url = null, $do_redirect = true ) { |
326 | 326 | /** This filter is documented in wp-login.php */ |
327 | 327 | $redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); |
328 | 328 | } else { |
329 | | $redirect_url = site_url( 'wp-login.php?action=register' ); |
| 329 | $redirect_url = wp_registration_url(); |
330 | 330 | } |
331 | 331 | |
332 | 332 | wp_redirect( $redirect_url, 301 ); |
diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php
index 8f2cdf6..0bfa2e1 100644
a
|
b
|
function wp_login_url($redirect = '', $force_reauth = false) { |
357 | 357 | * Returns the URL that allows the user to register on the site. |
358 | 358 | * |
359 | 359 | * @since 3.6.0 |
| 360 | * @since 4.4.0 The `$scheme` parameter was added. |
360 | 361 | * |
361 | 362 | * @return string User registration URL. |
362 | 363 | */ |
363 | | function wp_registration_url() { |
| 364 | function wp_registration_url( $scheme = null ) { |
364 | 365 | /** |
365 | 366 | * Filter the user registration URL. |
366 | 367 | * |
… |
… |
function wp_registration_url() { |
368 | 369 | * |
369 | 370 | * @param string $register The user registration URL. |
370 | 371 | */ |
371 | | return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) ); |
| 372 | return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', $scheme ) ); |
372 | 373 | } |
373 | 374 | |
374 | 375 | /** |
… |
… |
function wp_lostpassword_url( $redirect = '' ) { |
515 | 516 | function wp_register( $before = '<li>', $after = '</li>', $echo = true ) { |
516 | 517 | if ( ! is_user_logged_in() ) { |
517 | 518 | if ( get_option('users_can_register') ) |
518 | | $link = $before . '<a href="' . esc_url( wp_registration_url() ) . '">' . __('Register') . '</a>' . $after; |
| 519 | $link = $before . '<a href="' . esc_url( wp_registration_url( 'login' ) ) . '">' . __('Register') . '</a>' . $after; |
519 | 520 | else |
520 | 521 | $link = ''; |
521 | 522 | } else { |
diff --git a/wp-login.php b/wp-login.php
index 57b2a2e..791d195 100644
a
|
b
|
case 'retrievepassword' : |
578 | 578 | <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e('Log in') ?></a> |
579 | 579 | <?php |
580 | 580 | if ( get_option( 'users_can_register' ) ) : |
581 | | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
| 581 | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url( 'login' ) ), __( 'Register' ) ); |
582 | 582 | |
583 | 583 | /** This filter is documented in wp-includes/general-template.php */ |
584 | 584 | echo ' | ' . apply_filters( 'register', $registration_url ); |
… |
… |
case 'rp' : |
687 | 687 | <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> |
688 | 688 | <?php |
689 | 689 | if ( get_option( 'users_can_register' ) ) : |
690 | | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
| 690 | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url( 'login' ) ), __( 'Register' ) ); |
691 | 691 | |
692 | 692 | /** This filter is documented in wp-includes/general-template.php */ |
693 | 693 | echo ' | ' . apply_filters( 'register', $registration_url ); |
… |
… |
case 'register' : |
742 | 742 | login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors); |
743 | 743 | ?> |
744 | 744 | |
745 | | <form name="registerform" id="registerform" action="<?php echo esc_url( site_url('wp-login.php?action=register', 'login_post') ); ?>" method="post" novalidate="novalidate"> |
| 745 | <form name="registerform" id="registerform" action="<?php echo esc_url( wp_registration_url( 'login_post' ) ); ?>" method="post" novalidate="novalidate"> |
746 | 746 | <p> |
747 | 747 | <label for="user_login"><?php _e('Username') ?><br /> |
748 | 748 | <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label> |
… |
… |
default: |
944 | 944 | <p id="nav"> |
945 | 945 | <?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) : |
946 | 946 | if ( get_option( 'users_can_register' ) ) : |
947 | | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ); |
| 947 | $registration_url = sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url( 'login' ) ), __( 'Register' ) ); |
948 | 948 | |
949 | 949 | /** This filter is documented in wp-includes/general-template.php */ |
950 | 950 | echo apply_filters( 'register', $registration_url ) . ' | '; |
diff --git a/wp-signup.php b/wp-signup.php
index 3373f8e..34e835b 100644
a
|
b
|
function do_signup_header() { |
28 | 28 | add_action( 'wp_head', 'do_signup_header' ); |
29 | 29 | |
30 | 30 | if ( !is_multisite() ) { |
31 | | wp_redirect( site_url('wp-login.php?action=register') ); |
| 31 | wp_redirect( wp_registration_url() ); |
32 | 32 | die(); |
33 | 33 | } |
34 | 34 | |