Changeset 41692 for trunk/src/wp-login.php
- Timestamp:
- 10/02/2017 11:20:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r41691 r41692 426 426 setcookie( TEST_COOKIE, 'WP Cookie check', 0, SITECOOKIEPATH, COOKIE_DOMAIN, $secure ); 427 427 428 $lang = ! empty( $_GET['wp_lang'] ) ? sanitize_text_field( $_GET['wp_lang'] ) : ''; 429 $switched_locale = switch_to_locale( $lang ); 430 428 431 /** 429 432 * Fires when the login form is initialized. … … 432 435 */ 433 436 do_action( 'login_init' ); 437 434 438 /** 435 439 * Fires before a specified login form action. … … 485 489 setcookie( 'wp-postpass_' . COOKIEHASH, $hasher->HashPassword( wp_unslash( $_POST['post_password'] ) ), $expire, COOKIEPATH, COOKIE_DOMAIN, $secure ); 486 490 491 if ( $switched_locale ) { 492 restore_previous_locale(); 493 } 494 487 495 wp_safe_redirect( wp_get_referer() ); 488 496 exit(); … … 500 508 $redirect_to = 'wp-login.php?loggedout=true'; 501 509 $requested_redirect_to = ''; 510 } 511 512 if ( $switched_locale ) { 513 restore_previous_locale(); 502 514 } 503 515 … … 590 602 <?php 591 603 login_footer('user_login'); 604 605 if ( $switched_locale ) { 606 restore_previous_locale(); 607 } 608 592 609 break; 593 610 … … 714 731 <?php 715 732 login_footer('user_pass'); 733 734 if ( $switched_locale ) { 735 restore_previous_locale(); 736 } 737 716 738 break; 717 739 … … 789 811 <?php 790 812 login_footer('user_login'); 813 814 if ( $switched_locale ) { 815 restore_previous_locale(); 816 } 817 791 818 break; 792 819 … … 1032 1059 <?php 1033 1060 login_footer(); 1061 1062 if ( $switched_locale ) { 1063 restore_previous_locale(); 1064 } 1065 1034 1066 break; 1035 1067 } // end action switch
Note: See TracChangeset
for help on using the changeset viewer.