diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/customize/class-wp-customize-selective-refresh.php --- a/wp/wp-includes/customize/class-wp-customize-selective-refresh.php Thu Sep 29 08:06:27 2022 +0200 +++ b/wp/wp-includes/customize/class-wp-customize-selective-refresh.php Fri Sep 05 18:40:08 2025 +0200 @@ -12,6 +12,7 @@ * * @since 4.5.0 */ +#[AllowDynamicProperties] final class WP_Customize_Selective_Refresh { /** @@ -171,7 +172,7 @@ } } - $switched_locale = switch_to_locale( get_user_locale() ); + $switched_locale = switch_to_user_locale( get_current_user_id() ); $l10n = array( 'shiftClickToEdit' => __( 'Shift-click to edit this element.' ), 'clickEditMenu' => __( 'Click to edit this menu.' ), @@ -192,7 +193,7 @@ ); // Export data to JS. - printf( '', wp_json_encode( $exports ) ); + wp_print_inline_script_tag( sprintf( 'var _customizePartialRefreshExports = %s;', wp_json_encode( $exports ) ) ); } /**