Changeset 24053
- Timestamp:
- 04/22/2013 08:21:22 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r23916 r24053 220 220 * Returns the Log Out URL. 221 221 * 222 * Returns the URL that allows the user to log out of the site 222 * Returns the URL that allows the user to log out of the site. 223 223 * 224 224 * @since 2.7.0 225 * @uses wp_nonce_url() To protect against CSRF 226 * @uses site_url() To generate the log in URL227 * @uses apply_filters() calls 'logout_url' hook on final logout url225 * @uses wp_nonce_url() To protect against CSRF. 226 * @uses site_url() To generate the log out URL. 227 * @uses apply_filters() calls 'logout_url' hook on final logout URL. 228 228 * 229 229 * @param string $redirect Path to redirect to on logout. … … 245 245 * Returns the Log In URL. 246 246 * 247 * Returns the URL that allows the user to log in to the site 247 * Returns the URL that allows the user to log in to the site. 248 248 * 249 249 * @since 2.7.0 250 * @uses site_url() To generate the log in URL 251 * @uses apply_filters() calls 'login_url' hook on final login url250 * @uses site_url() To generate the log in URL. 251 * @uses apply_filters() calls 'login_url' hook on final login URL. 252 252 * 253 253 * @param string $redirect Path to redirect to on login. … … 265 265 266 266 return apply_filters('login_url', $login_url, $redirect); 267 } 268 269 /** 270 * Returns the user registration URL. 271 * 272 * Returns the URL that allows the user to register on the site. 273 * 274 * @since 3.6.0 275 * @uses site_url() To generate the registration URL. 276 * @uses apply_filters() calls 'register_url' hook on final URL. 277 * 278 * @return string 279 */ 280 function wp_registration_url() { 281 return apply_filters( 'register_url', site_url( 'wp-login.php?action=register', 'login' ) ); 267 282 } 268 283 … … 360 375 if ( ! is_user_logged_in() ) { 361 376 if ( get_option('users_can_register') ) 362 $link = $before . '<a href="' . site_url('wp-login.php?action=register', 'login') . '">' . __('Register') . '</a>' . $after;377 $link = $before . '<a href="' . esc_url( wp_registration_url() ) . '">' . __('Register') . '</a>' . $after; 363 378 else 364 379 $link = ''; -
trunk/wp-login.php
r23805 r24053 467 467 <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e('Log in') ?></a> 468 468 <?php if ( get_option( 'users_can_register' ) ) : ?> 469 | <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( site_url( 'wp-login.php?action=register', 'login') ), __( 'Register' ) ) ); ?>469 | <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ) ); ?> 470 470 <?php endif; ?> 471 471 </p> … … 526 526 <a href="<?php echo esc_url( wp_login_url() ); ?>"><?php _e( 'Log in' ); ?></a> 527 527 <?php if ( get_option( 'users_can_register' ) ) : ?> 528 | <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( site_url( 'wp-login.php?action=register', 'login') ), __( 'Register' ) ) ); ?>528 | <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ) ); ?> 529 529 <?php endif; ?> 530 530 </p> … … 733 733 <?php if ( ! isset( $_GET['checkemail'] ) || ! in_array( $_GET['checkemail'], array( 'confirm', 'newpass' ) ) ) : ?> 734 734 <?php if ( get_option( 'users_can_register' ) ) : ?> 735 <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( site_url( 'wp-login.php?action=register', 'login') ), __( 'Register' ) ) ); ?> |735 <?php echo apply_filters( 'register', sprintf( '<a href="%s">%s</a>', esc_url( wp_registration_url() ), __( 'Register' ) ) ); ?> | 736 736 <?php endif; ?> 737 737 <a href="<?php echo esc_url( wp_lostpassword_url() ); ?>" title="<?php esc_attr_e( 'Password Lost and Found' ); ?>"><?php _e( 'Lost your password?' ); ?></a>
Note: See TracChangeset
for help on using the changeset viewer.