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/translator/js.php +2 -2 2.12.22.16.7 View file →
@@ -108,9 +108,9 @@
108 108
109 109 $json = array();
110 110
111 111 preg_match_all(
112 - '#\(\s?["|\'](.*)["|\'],\s?(.*)\s?\);#Ui',
112 + '#\(\s?["\'](.*)["\'],\s?(.*)\s?\);#Ui',
113 113 $js,
114 114 $json
115 115 );
116 116
@@ -220,9 +220,9 @@
220 220 // Whitelist of function calls that contain translatable JSON
221 221 $allowed_functions = wplng_data_json_in_js_functions();
222 222
223 223 if ( empty( $allowed_functions ) ) {
224 - return array();
224 + return $js;
225 225 }
226 226
227 227 preg_match_all(
228 228 '#([a-zA-Z_$][a-zA-Z0-9_$]*(?:\.[a-zA-Z_$][a-zA-Z0-9_$]*)+)\s*\(\s*(\{(?:[^{}"\'\\\\]+|"(?:\\\\.|[^"\\\\])*"|\'(?:\\\\.|[^\'\\\\])*\'|(?2))*\})\s*\)#Us',