WordPress.org

Make WordPress Core

Ticket #17950: 17950.3.diff

File 17950.3.diff, 2.1 KB (added by scribu, 17 months ago)
  • wp-includes/general-template.php

    diff --git wp-includes/general-template.php wp-includes/general-template.php
    index c7634bd..50faa5d 100644
    function wp_loginout($redirect = '', $echo = true) { 
    197197} 
    198198 
    199199/** 
     200 * Returns the user registration URL 
     201 * 
     202 * Returns the URL that allows the user to log in to the site 
     203 * 
     204 * @since 3.3.0 
     205 * @uses site_url() To generate the log in URL 
     206 * @uses apply_filters() calls 'register_url' hook on final url 
     207 * 
     208 * @return string 
     209 */ 
     210function wp_register_url() { 
     211        return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) ); 
     212} 
     213 
     214/** 
    200215 * Returns the Log Out URL. 
    201216 * 
    202217 * Returns the URL that allows the user to log out of the site 
    function wp_register( $before = '<li>', $after = '</li>', $echo = true ) { 
    338353 
    339354        if ( ! is_user_logged_in() ) { 
    340355                if ( get_option('users_can_register') ) 
    341                         $link = $before . '<a href="' . site_url('wp-login.php?action=register', 'login') . '">' . __('Register') . '</a>' . $after; 
     356                        $link = $before . '<a href="' . esc_url( wp_register_url() ) . '">' . __('Register') . '</a>' . $after; 
    342357                else 
    343358                        $link = ''; 
    344359        } else { 
  • wp-login.php

    diff --git wp-login.php wp-login.php
    index 5d4f3f7..bb46008 100644
    case 'retrievepassword' : 
    448448<p id="nav"> 
    449449<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e('Log in') ?></a> 
    450450<?php if ( get_option( 'users_can_register' ) ) : ?> 
    451  | <a href="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login' ) ); ?>"><?php _e( 'Register' ); ?></a> 
     451 | <a href="<?php echo esc_url( wp_register_url() ); ?>"><?php _e( 'Register' ); ?></a> 
    452452<?php endif; ?> 
    453453</p> 
    454454 
    case 'rp' : 
    507507<p id="nav"> 
    508508<a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> 
    509509<?php if ( get_option( 'users_can_register' ) ) : ?> 
    510  | <a href="<?php echo esc_url( site_url( 'wp-login.php?action=register', 'login' ) ); ?>"><?php _e( 'Register' ); ?></a> 
     510 | <a href="<?php echo esc_url( wp_register_url() ); ?>"><?php _e( 'Register' ); ?></a> 
    511511<?php endif; ?> 
    512512</p> 
    513513