Make WordPress Core

Ticket #31495: 31495.2.patch

File 31495.2.patch, 5.3 KB (added by johnbillion, 10 years ago)
  • src/wp-signup.php

     
    2828add_action( 'wp_head', 'do_signup_header' );
    2929
    3030if ( !is_multisite() ) {
    31         wp_redirect( site_url('wp-login.php?action=register') );
     31        wp_redirect( wp_registration_url() );
    3232        die();
    3333}
    3434
     
    669669if ( $active_signup == 'none' ) {
    670670        _e( 'Registration has been disabled.' );
    671671} elseif ( $active_signup == 'blog' && !is_user_logged_in() ) {
    672         $login_url = site_url( 'wp-login.php?redirect_to=' . urlencode( network_site_url( 'wp-signup.php' ) ) );
     672        $login_url = wp_login_url( network_site_url( 'wp-signup.php' ) );
    673673        echo sprintf( __( 'You must first <a href="%s">log in</a>, and then you can create a new site.' ), $login_url );
    674674} else {
    675675        $stage = isset( $_POST['stage'] ) ?  $_POST['stage'] : 'default';
  • src/wp-login.php

     
    742742        login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors);
    743743?>
    744744
    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() ); ?>" method="post" novalidate="novalidate">
    746746        <p>
    747747                <label for="user_login"><?php _e('Username') ?><br />
    748748                <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label>
     
    908908        }
    909909?>
    910910
    911 <form name="loginform" id="loginform" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
     911<form name="loginform" id="loginform" action="<?php echo esc_url( wp_login_url() ); ?>" method="post">
    912912        <p>
    913913                <label for="user_login"><?php _e('Username') ?><br />
    914914                <input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" /></label>
  • src/wp-includes/canonical.php

     
    326326                                /** This filter is documented in wp-login.php */
    327327                                $redirect_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) );
    328328                        } else {
    329                                 $redirect_url = site_url( 'wp-login.php?action=register' );
     329                                $redirect_url = wp_registration_url();
    330330                        }
    331331
    332332                        wp_redirect( $redirect_url, 301 );
     
    591591                site_url( 'login', 'relative' ),
    592592        );
    593593        if ( in_array( untrailingslashit( $_SERVER['REQUEST_URI'] ), $logins ) ) {
    594                 wp_redirect( site_url( 'wp-login.php', 'login' ) );
     594                wp_redirect( wp_login_url() );
    595595                exit;
    596596        }
    597597}
  • src/wp-admin/network.php

     
    556556        <?php endif; // end IIS/Apache code branches.
    557557
    558558        if ( !is_multisite() ) { ?>
    559                 <p><?php _e( 'Once you complete these steps, your network is enabled and configured. You will have to log in again.' ); ?> <a href="<?php echo esc_url( site_url( 'wp-login.php' ) ); ?>"><?php _e( 'Log In' ); ?></a></p>
     559                <p><?php _e( 'Once you complete these steps, your network is enabled and configured. You will have to log in again.' ); ?> <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log In' ); ?></a></p>
    560560<?php
    561561        }
    562562}
  • src/wp-admin/install.php

     
    190190// Let's check to make sure WP isn't already installed.
    191191if ( is_blog_installed() ) {
    192192        display_header();
    193         die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p><p class="step"><a href="../wp-login.php" class="button button-large">' . __( 'Log In' ) . '</a></p></body></html>' );
     193        die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p><p class="step"><a href="' . esc_url( wp_login_url() ) . '" class="button button-large">' . __( 'Log In' ) . '</a></p></body></html>' );
    194194}
    195195
    196196/**
     
    341341        </tr>
    342342</table>
    343343
    344 <p class="step"><a href="../wp-login.php" class="button button-large"><?php _e( 'Log In' ); ?></a></p>
     344<p class="step"><a href="<?php echo esc_url( wp_login_url() ); ?>" class="button button-large"><?php _e( 'Log In' ); ?></a></p>
    345345
    346346<?php
    347347                }
  • src/wp-activate.php

     
    1414require( dirname( __FILE__ ) . '/wp-blog-header.php' );
    1515
    1616if ( !is_multisite() ) {
    17         wp_redirect( site_url( '/wp-login.php?action=register' ) );
     17        wp_redirect( wp_registration_url() );
    1818        die();
    1919}
    2020