Changeset 13465
- Timestamp:
- 02/27/2010 06:21:03 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-login.php
r13427 r13465 360 360 wp_logout(); 361 361 362 $redirect_to = 'wp-login.php?loggedout=true'; 363 if ( isset( $_REQUEST['redirect_to'] ) ) 364 $redirect_to = $_REQUEST['redirect_to']; 365 366 wp_safe_redirect($redirect_to); 362 $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?loggedout=true'; 363 wp_safe_redirect( $redirect_to ); 367 364 exit(); 368 365 … … 374 371 $errors = retrieve_password(); 375 372 if ( !is_wp_error($errors) ) { 376 wp_redirect('wp-login.php?checkemail=confirm'); 373 $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?checkemail=confirm'; 374 wp_safe_redirect( $redirect_to ); 377 375 exit(); 378 376 } … … 380 378 381 379 if ( isset($_GET['error']) && 'invalidkey' == $_GET['error'] ) $errors->add('invalidkey', __('Sorry, that key does not appear to be valid.')); 380 $redirect_to = apply_filters( 'lostpassword_redirect', !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' ); 382 381 383 382 do_action('lost_password'); … … 394 393 </p> 395 394 <?php do_action('lostpassword_form'); ?> 395 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 396 396 <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Get New Password'); ?>" tabindex="100" /></p> 397 397 </form> … … 435 435 case 'register' : 436 436 if ( is_multisite() ) { 437 // WPMU doesn't use this437 // Multisite uses wp-signup.php 438 438 wp_redirect( apply_filters( 'wp_signup_location', get_bloginfo('wpurl') . '/wp-signup.php' ) ); 439 439 exit; … … 454 454 $errors = register_new_user($user_login, $user_email); 455 455 if ( !is_wp_error($errors) ) { 456 wp_redirect('wp-login.php?checkemail=registered'); 456 $redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered'; 457 wp_safe_redirect( $redirect_to ); 457 458 exit(); 458 459 } 459 460 } 460 461 462 $redirect_to = apply_filters( 'registration_redirect', !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' ); 461 463 login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors); 462 464 ?> … … 474 476 <p id="reg_passmail"><?php _e('A password will be e-mailed to you.') ?></p> 475 477 <br class="clear" /> 478 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 476 479 <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="<?php esc_attr_e('Register'); ?>" tabindex="100" /></p> 477 480 </form>
Note: See TracChangeset
for help on using the changeset viewer.