$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.'
),
'clickEditWidget' =>
__( 'Click to edit this widget.'
),
'clickEditTitle' =>
__( 'Click to edit the site title.'
),
'clickEditMisc' =>
__( 'Click to edit this element.'
),
/* translators: %s: document.write() */
'badDocumentWrite' =>
sprintf( __( '%s is forbidden'
), 'document.write()'
),
);
if ( $switched_locale ) { restore_previous_locale();
} $exports = array
( 'partials' =>
$partials,
'renderQueryVar' => self::RENDER_QUERY_VAR,
'l10n' =>
$l10n,
);
// Export data to JS.
printf( '<script>var _customizePartialRefreshExports = %s;</script>',
wp_json_encode( $exports ) );
}