Skip to content

Commit

Permalink
Remove is_locale_switched() check and update comment to reflect inten…
Browse files Browse the repository at this point in the history
…ted property
  • Loading branch information
ramonjd committed Jul 30, 2024
1 parent b5e597f commit 9506188
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/compat/wordpress-6.7/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ function gutenberg_get_block_editor_settings_6_7( $settings ) {

if ( $current_user_locale !== $current_site_locale ) {
$switched_locale = switch_to_locale( $current_site_locale );
if ( is_locale_switched() && $switched_locale ) {
if ( $switched_locale ) {
$current_site_is_rtl = is_rtl();
restore_previous_locale();
}
}

// @TODO confirm if `lang` just needs to be added to the `/wp/v2/settings` response`.
// @TODO confirm if `is_rtl` just needs to be added to the `/wp/v2/settings` response`.
$settings['siteLocale'] = array(
'lang' => $current_site_locale,
'isRTL' => $current_site_is_rtl,
Expand Down

0 comments on commit 9506188

Please sign in to comment.