Changeset 55161 for trunk/src/wp-includes/user.php
- Timestamp:
- 01/30/2023 10:25:53 AM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/user.php
r55015 r55161 2579 2579 $switched_locale = false; 2580 2580 if ( ! empty( $send_password_change_email ) || ! empty( $send_email_change_email ) ) { 2581 $switched_locale = switch_to_ locale( get_user_locale( $user_id ));2581 $switched_locale = switch_to_user_locale( $user_id ); 2582 2582 } 2583 2583 … … 3140 3140 $locale = get_user_locale( $user_data ); 3141 3141 3142 $switched_locale = switch_to_ locale( $locale);3142 $switched_locale = switch_to_user_locale( $user_data->ID ); 3143 3143 3144 3144 if ( is_multisite() ) { … … 4245 4245 // Localize message content for user; fallback to site default for visitors. 4246 4246 if ( ! empty( $request->user_id ) ) { 4247 $ locale = get_user_locale( $request->user_id );4247 $switched_locale = switch_to_user_locale( $request->user_id ); 4248 4248 } else { 4249 $locale = get_locale(); 4250 } 4251 4252 $switched_locale = switch_to_locale( $locale ); 4249 $switched_locale = switch_to_locale( get_locale() ); 4250 } 4253 4251 4254 4252 /** … … 4656 4654 // Localize message content for user; fallback to site default for visitors. 4657 4655 if ( ! empty( $request->user_id ) ) { 4658 $ locale = get_user_locale( $request->user_id );4656 $switched_locale = switch_to_user_locale( $request->user_id ); 4659 4657 } else { 4660 $locale = get_locale(); 4661 } 4662 4663 $switched_locale = switch_to_locale( $locale ); 4658 $switched_locale = switch_to_locale( get_locale() ); 4659 } 4664 4660 4665 4661 $email_data = array(
Note: See TracChangeset
for help on using the changeset viewer.