Changeset 55161 for trunk/src/wp-includes/ms-functions.php
- Timestamp:
- 01/30/2023 10:25:53 AM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ms-functions.php
r55075 r55161 955 955 956 956 $user = get_user_by( 'login', $user_login ); 957 $switched_locale = switch_to_locale( get_user_locale( $user ));957 $switched_locale = $user && switch_to_user_locale( $user->ID ); 958 958 959 959 $message = sprintf( … … 1069 1069 1070 1070 $user = get_user_by( 'login', $user_login ); 1071 $switched_locale = switch_to_locale( get_user_locale( $user ));1071 $switched_locale = $user && switch_to_user_locale( $user->ID ); 1072 1072 1073 1073 // Send email with activation link. … … 1611 1611 $user = get_userdata( $user_id ); 1612 1612 1613 $switched_locale = switch_to_ locale( get_user_locale( $user ));1613 $switched_locale = switch_to_user_locale( $user_id ); 1614 1614 1615 1615 $welcome_email = get_site_option( 'welcome_email' ); … … 1735 1735 if ( $network_admin ) { 1736 1736 // If the network admin email address corresponds to a user, switch to their locale. 1737 $switched_locale = switch_to_ locale( get_user_locale( $network_admin ));1737 $switched_locale = switch_to_user_locale( $network_admin->ID ); 1738 1738 } else { 1739 1739 // Otherwise switch to the locale of the current site. … … 1844 1844 $user = get_userdata( $user_id ); 1845 1845 1846 $switched_locale = switch_to_ locale( get_user_locale( $user ));1846 $switched_locale = switch_to_user_locale( $user_id ); 1847 1847 1848 1848 /** … … 2727 2727 update_site_option( 'network_admin_hash', $new_admin_email ); 2728 2728 2729 $switched_locale = switch_to_ locale( get_user_locale() );2729 $switched_locale = switch_to_user_locale( get_current_user_id() ); 2730 2730 2731 2731 /* translators: Do not translate USERNAME, ADMIN_URL, EMAIL, SITENAME, SITEURL: those are placeholders. */
Note: See TracChangeset
for help on using the changeset viewer.