Ticket #17950: 17950.5.diff
| File 17950.5.diff, 2.2 KB (added by , 13 years ago) |
|---|
-
wp-includes/general-template.php
195 195 else 196 196 return apply_filters('loginout', $link); 197 197 } 198 /** 199 * Returns the user registration URL 200 * 201 * Returns the URL that allows the user to log in to the site 202 * 203 * @since 3.6.0 204 * @uses site_url() To generate the log in URL 205 * @uses apply_filters() calls 'register_url' hook on final url 206 * 207 * @return string 208 */ 209 function wp_registration_url() { 210 return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) ); 211 } 198 212 213 199 214 /** 200 215 * Returns the Log Out URL. 201 216 * … … 338 353 339 354 if ( ! is_user_logged_in() ) { 340 355 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_registration_url() ) . '">' . __('Register') . '</a>' . $after; 342 357 else 343 358 $link = ''; 344 359 } else { -
wp-login.php
451 451 <p id="nav"> 452 452 <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e('Log in') ?></a> 453 453 <?php if ( get_option( 'users_can_register' ) ) : ?> 454 | <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( site_url( 'wp-login.php?action=register', 'login') ), __( 'Register' ) ) ); ?>454 | <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ) ); ?> 455 455 <?php endif; ?> 456 456 </p> 457 457 … … 510 510 <p id="nav"> 511 511 <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> 512 512 <?php if ( get_option( 'users_can_register' ) ) : ?> 513 | <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( site_url( 'wp-login.php?action=register', 'login') ), __( 'Register' ) ) ); ?>513 | <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ) ); ?> 514 514 <?php endif; ?> 515 515 </p> 516 516