Ticket #12282: 12282.diff
File 12282.diff, 3.1 KB (added by , 14 years ago) |
---|
-
wp-login.php
359 359 check_admin_referer('log-out'); 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 = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?loggedout=true'; 363 wp_safe_redirect( $redirect_to ); 367 364 exit(); 368 365 369 366 break; … … 373 370 if ( $http_post ) { 374 371 $errors = retrieve_password(); 375 372 if ( !is_wp_error($errors) ) { 376 wp_redirect('wp-login.php?checkemail=confirm'); 373 $redirect_to = isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?checkemail=confirm'; 374 wp_safe_redirect( $redirect_to ); 377 375 exit(); 378 376 } 379 377 } 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', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' ); 382 381 383 382 do_action('lost_password'); 384 383 login_header(__('Lost Password'), '<p class="message">' . __('Please enter your username or e-mail address. You will receive a new password via e-mail.') . '</p>', $errors); … … 393 392 <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" tabindex="10" /></label> 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> 398 398 … … 434 434 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; 440 440 } … … 453 453 $user_email = $_POST['user_email']; 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 = isset( $_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', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' ); 461 463 login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors); 462 464 ?> 463 465 … … 473 475 <?php do_action('register_form'); ?> 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> 478 481