WordPress.org

Make WordPress Core

Ticket #17950: 17950.2.diff

File 17950.2.diff, 1.1 KB (added by scribu, 7 years ago)

$redirect param isn't useful

  • wp-includes/general-template.php

     
    195195}
    196196
    197197/**
     198 * Returns the user registration URL
     199 *
     200 * Returns the URL that allows the user to log in to the site
     201 *
     202 * @since 3.3.0
     203 * @uses site_url() To generate the log in URL
     204 * @uses apply_filters() calls 'register_url' hook on final url
     205 *
     206 * @return string
     207 */
     208function wp_register_url() {
     209        return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ), $redirect );
     210}
     211
     212/**
    198213 * Returns the Log Out URL.
    199214 *
    200215 * Returns the URL that allows the user to log out of the site
     
    333348
    334349        if ( ! is_user_logged_in() ) {
    335350                if ( get_option('users_can_register') )
    336                         $link = $before . '<a href="' . site_url('wp-login.php?action=register', 'login') . '">' . __('Register') . '</a>' . $after;
     351                        $link = $before . '<a href="' . wp_register_url() . '">' . __('Register') . '</a>' . $after;
    337352                else
    338353                        $link = '';
    339354        } else {