← All changes
|
src/modules/Blocks/Language_Switcher/Abstract_Block.php
+0
-6
3.8.4
→
3.8.10
View file →
| @@ -150,9 +150,8 @@ | ||
| 150 | 150 | 'wp-element', |
| 151 | 151 | 'wp-i18n', |
| 152 | 152 | 'wp-server-side-render', |
| 153 | 153 | 'lodash', |
| 154 | - 'wp-editor', | |
| 155 | 154 | ), |
| 156 | 155 | POLYLANG_VERSION, |
| 157 | 156 | true |
| 158 | 157 | ); |
| @@ -160,13 +159,8 @@ | ||
| 160 | 159 | wp_localize_script( $script_handle, 'pll_block_editor_blocks_settings', PLL_Switcher::get_switcher_options( 'block', 'string' ) ); |
| 161 | 160 | |
| 162 | 161 | // Translated strings used in JS code |
| 163 | 162 | wp_set_script_translations( $script_handle, 'polylang' ); |
| 164 | - | |
| 165 | - // No need to render the JS variable if Polylang Pro is installed, the editor will use `lang` REST field instead. | |
| 166 | - if ( class_exists( 'WP_Syntex\Polylang_Pro\REST\Translated\Post' ) ) { | |
| 167 | - return; | |
| 168 | - } | |
| 169 | 163 | |
| 170 | 164 | // Fallback to default language if current language is not set, usually happens in Site Editor. |
| 171 | 165 | $current_language = $this->current_language; |
| 172 | 166 | |