PluginProbe
Translate and Go multilingual – Automatic AI translation – wpLingua / 2.16.7
Translate and Go multilingual – Automatic AI translation – wpLingua v2.16.7
2.16.7 2.16.6 2.16.5 2.16.4 2.16.3 2.16.2 2.16.1 2.16.0 2.15.2 2.15.1 2.15.0 2.14.3 2.14.2 2.14.1 2.14.0 2.13.1 2.13.0 2.12.3 2.12.2 2.12.1 trunk 1.0.3 1.0.4 1.0.5 1.1.0 All 112 releases
← All changes | inc/admin/assets.php +18 -1 2.12.22.16.7 View file →
@@ -178,9 +178,14 @@
178 178
179 179 if ( function_exists( 'wp_enqueue_code_editor' ) ) {
180 180 $cm_settings = array();
181 181 $cm_settings['codeEditor'] = wp_enqueue_code_editor(
182 - array( 'type' => 'text/css' )
182 + array(
183 + 'type' => 'text/css',
184 + 'codemirror' => array(
185 + 'lineWrapping' => true,
186 + ),
187 + )
183 188 );
184 189
185 190 wp_localize_script( 'jquery', 'cm_settings', $cm_settings );
186 191 wp_enqueue_script( 'wp-theme-plugin-editor' );
@@ -196,8 +201,10 @@
196 201 if ( ! empty( $custom_css )
197 202 && is_string( $custom_css )
198 203 ) {
199 204 $custom_css = wp_strip_all_tags( $custom_css );
205 + // Prevent breaking out of the <style> context
206 + $custom_css = str_replace( '</style', '', $custom_css );
200 207 wp_add_inline_style( 'wplingua', $custom_css );
201 208 }
202 209 }
203 210
@@ -321,8 +328,18 @@
321 328 'wplingua-option-dictionary',
322 329 plugins_url() . '/wplingua/assets/js/admin/option-page-dictionary.js',
323 330 array( 'jquery' ),
324 331 WPLNG_PLUGIN_VERSION
332 + );
333 +
334 + wp_localize_script(
335 + 'wplingua-option-dictionary',
336 + 'wplngDictionaryAjax',
337 + array(
338 + 'ajaxurl' => admin_url( 'admin-ajax.php' ),
339 + 'nonce' => wp_create_nonce( 'wplng_dictionary_update_translations' ),
340 + 'errorMessageAjax' => esc_html__( 'Error [0]: The AJAX call failed.', 'wplingua' ),
341 + )
325 342 );
326 343
327 344 /**
328 345 * Enqueue wpLingua CSS styles