Weglot Translate – Translate your WP website - Version 3.1.2

Version Description

(24/09/2019) = - Bugfix: Custom URL with GET parameters - Bugfix: Ninja Forms JSON translate - Bugfix: Prevent errors due to call protected method

Download this release

Release Info

Developer remyb92
Plugin Icon 128x128 Weglot Translate – Translate your WP website
Version 3.1.2
Comparing to
See all releases

Code changes from version 3.1.1 to 3.1.2

composer.json CHANGED
@@ -14,7 +14,7 @@
14
  }
15
  ],
16
  "require": {
17
- "weglot/weglot-php": "^0.5",
18
  "gmulti/morphism-php": "^0.3.0"
19
  },
20
  "require-dev": {
14
  }
15
  ],
16
  "require": {
17
+ "weglot/weglot-php": "^1.0",
18
  "gmulti/morphism-php": "^0.3.0"
19
  },
20
  "require-dev": {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: translate, multilingual, language, translation, localization
4
  Requires at least: 4.5
5
  Tested up to: 5.2
6
  Requires PHP: 5.4
7
- Stable tag: 3.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -153,6 +153,11 @@ See changelog for upgrade changes.
153
 
154
  == Changelog ==
155
 
 
 
 
 
 
156
  = 3.1.1 (11/09/2019) =
157
  - Add: IE 11 compatibility with languages switcher
158
  - Add: WP-CLI compatibility
4
  Requires at least: 4.5
5
  Tested up to: 5.2
6
  Requires PHP: 5.4
7
+ Stable tag: 3.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
153
 
154
  == Changelog ==
155
 
156
+ = 3.1.2 (24/09/2019) =
157
+ - Bugfix: Custom URL with GET parameters
158
+ - Bugfix: Ninja Forms JSON translate
159
+ - Bugfix: Prevent errors due to call protected method
160
+
161
  = 3.1.1 (11/09/2019) =
162
  - Add: IE 11 compatibility with languages switcher
163
  - Add: WP-CLI compatibility
src/actions/front/class-translate-page-weglot.php CHANGED
@@ -216,8 +216,8 @@ class Translate_Page_Weglot implements Hooks_Interface_Weglot {
216
  $request_without_language = array_values(array_filter( explode( '/', str_replace(
217
  '/' . $current_language . '/',
218
  '/',
219
- $_SERVER['REQUEST_URI'] //phpcs:ignore
220
- ) ), 'strlen' ));
221
 
222
  $index_entries = count( $request_without_language ) - 1;
223
  if ( isset( $request_without_language[ $index_entries ] ) ) {
216
  $request_without_language = array_values(array_filter( explode( '/', str_replace(
217
  '/' . $current_language . '/',
218
  '/',
219
+ strpos($_SERVER['REQUEST_URI'], "?") ? substr($_SERVER['REQUEST_URI'], 0, strpos($_SERVER['REQUEST_URI'], "?")) : $_SERVER['REQUEST_URI']
220
+ ) ), 'strlen' ));
221
 
222
  $index_entries = count( $request_without_language ) - 1;
223
  if ( isset( $request_without_language[ $index_entries ] ) ) {
src/third/ninjaforms/regexcheckers/class-ninja-form-json-setting.php CHANGED
@@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {
15
  */
16
  class Ninja_Form_Json_Setting
17
  {
18
- const REGEX = '#form.settings=(.*?);#';
19
 
20
  const TYPE = SourceType::SOURCE_JSON;
21
 
15
  */
16
  class Ninja_Form_Json_Setting
17
  {
18
+ const REGEX = '#form.settings=(.*?);form#';
19
 
20
  const TYPE = SourceType::SOURCE_JSON;
21
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit55c2425bee3a37fd3355db32a438ae2b::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit992cdfaed0e7c8387b4002eea92cf041::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit55c2425bee3a37fd3355db32a438ae2b
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit55c2425bee3a37fd3355db32a438ae2b
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit55c2425bee3a37fd3355db32a438ae2b', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit55c2425bee3a37fd3355db32a438ae2b', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit55c2425bee3a37fd3355db32a438ae2b::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit55c2425bee3a37fd3355db32a438ae2b
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit55c2425bee3a37fd3355db32a438ae2b::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire55c2425bee3a37fd3355db32a438ae2b($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire55c2425bee3a37fd3355db32a438ae2b($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit992cdfaed0e7c8387b4002eea92cf041
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit992cdfaed0e7c8387b4002eea92cf041', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit992cdfaed0e7c8387b4002eea92cf041', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit992cdfaed0e7c8387b4002eea92cf041::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit992cdfaed0e7c8387b4002eea92cf041::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire992cdfaed0e7c8387b4002eea92cf041($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire992cdfaed0e7c8387b4002eea92cf041($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit55c2425bee3a37fd3355db32a438ae2b
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
@@ -57,10 +57,10 @@ class ComposerStaticInit55c2425bee3a37fd3355db32a438ae2b
57
  public static function getInitializer(ClassLoader $loader)
58
  {
59
  return \Closure::bind(function () use ($loader) {
60
- $loader->prefixLengthsPsr4 = ComposerStaticInit55c2425bee3a37fd3355db32a438ae2b::$prefixLengthsPsr4;
61
- $loader->prefixDirsPsr4 = ComposerStaticInit55c2425bee3a37fd3355db32a438ae2b::$prefixDirsPsr4;
62
- $loader->prefixesPsr0 = ComposerStaticInit55c2425bee3a37fd3355db32a438ae2b::$prefixesPsr0;
63
- $loader->classMap = ComposerStaticInit55c2425bee3a37fd3355db32a438ae2b::$classMap;
64
 
65
  }, null, ClassLoader::class);
66
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit992cdfaed0e7c8387b4002eea92cf041
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
57
  public static function getInitializer(ClassLoader $loader)
58
  {
59
  return \Closure::bind(function () use ($loader) {
60
+ $loader->prefixLengthsPsr4 = ComposerStaticInit992cdfaed0e7c8387b4002eea92cf041::$prefixLengthsPsr4;
61
+ $loader->prefixDirsPsr4 = ComposerStaticInit992cdfaed0e7c8387b4002eea92cf041::$prefixDirsPsr4;
62
+ $loader->prefixesPsr0 = ComposerStaticInit992cdfaed0e7c8387b4002eea92cf041::$prefixesPsr0;
63
+ $loader->classMap = ComposerStaticInit992cdfaed0e7c8387b4002eea92cf041::$classMap;
64
 
65
  }, null, ClassLoader::class);
66
  }
vendor/composer/installed.json CHANGED
@@ -171,17 +171,17 @@
171
  },
172
  {
173
  "name": "weglot/weglot-php",
174
- "version": "0.5.32",
175
- "version_normalized": "0.5.32.0",
176
  "source": {
177
  "type": "git",
178
  "url": "https://github.com/weglot/weglot-php.git",
179
- "reference": "604e5750c4fae03ccb23e40bfbdc543444df2046"
180
  },
181
  "dist": {
182
  "type": "zip",
183
- "url": "https://api.github.com/repos/weglot/weglot-php/zipball/604e5750c4fae03ccb23e40bfbdc543444df2046",
184
- "reference": "604e5750c4fae03ccb23e40bfbdc543444df2046",
185
  "shasum": ""
186
  },
187
  "require": {
@@ -194,7 +194,7 @@
194
  "codeception/codeception": "^2.4",
195
  "vlucas/phpdotenv": "^2.4"
196
  },
197
- "time": "2019-09-10T14:24:10+00:00",
198
  "type": "library",
199
  "installation-source": "dist",
200
  "autoload": {
171
  },
172
  {
173
  "name": "weglot/weglot-php",
174
+ "version": "1.0.0",
175
+ "version_normalized": "1.0.0.0",
176
  "source": {
177
  "type": "git",
178
  "url": "https://github.com/weglot/weglot-php.git",
179
+ "reference": "ce8909398d3754bcef12036d5aaf4adc3f40d475"
180
  },
181
  "dist": {
182
  "type": "zip",
183
+ "url": "https://api.github.com/repos/weglot/weglot-php/zipball/ce8909398d3754bcef12036d5aaf4adc3f40d475",
184
+ "reference": "ce8909398d3754bcef12036d5aaf4adc3f40d475",
185
  "shasum": ""
186
  },
187
  "require": {
194
  "codeception/codeception": "^2.4",
195
  "vlucas/phpdotenv": "^2.4"
196
  },
197
+ "time": "2019-09-16T13:55:47+00:00",
198
  "type": "library",
199
  "installation-source": "dist",
200
  "autoload": {
vendor/gmulti/morphism-php/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- vendor
2
- composer.lock
 
 
vendor/weglot/simplehtmldom/.gitignore DELETED
@@ -1 +0,0 @@
1
- .idea/
 
vendor/weglot/translation-definitions/.gitignore DELETED
@@ -1,6 +0,0 @@
1
- # The project has no dependency
2
- composer.lock
3
- /vendor/
4
- node_modules
5
- yarn.lock
6
- test*
 
 
 
 
 
 
vendor/weglot/weglot-php/.gitignore DELETED
@@ -1,22 +0,0 @@
1
- ##> ide-config ##
2
- .idea/
3
- .vscode/
4
- ##< ide-config ##
5
-
6
- ##> composer ##
7
- vendor/
8
- composer.phar
9
- composer.lock
10
- ##< composer ##
11
-
12
- ##> php-cs-fixer ##
13
- .php_cs.cache
14
- ##< php-cs-fixer ##
15
-
16
- ##> phpmetrics ##
17
- phpmetrics/
18
- ##< phpmetrics ##
19
-
20
- ##> dotenv ##
21
- .env
22
- ##< dotenv
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/weglot/weglot-php/src/Util/Server.php CHANGED
@@ -25,7 +25,7 @@ class Server
25
  * @param bool $use_forwarded_host
26
  * @return string
27
  */
28
- protected static function urlOrigin(array $server, $use_forwarded_host = false)
29
  {
30
  return self::getProtocol($server) . '://' . self::getHost($server, $use_forwarded_host);
31
  }
25
  * @param bool $use_forwarded_host
26
  * @return string
27
  */
28
+ public static function urlOrigin(array $server, $use_forwarded_host = false)
29
  {
30
  return self::getProtocol($server) . '://' . self::getHost($server, $use_forwarded_host);
31
  }
vendor/weglot/weglot-php/tests/_data/.gitkeep DELETED
File without changes
vendor/weglot/weglot-php/tests/_output/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- *
2
- !.gitignore
 
 
vendor/weglot/weglot-php/tests/_support/_generated/.gitignore DELETED
@@ -1,2 +0,0 @@
1
- *
2
- !.gitignore
 
 
vendor/weglot/weglot-php/tests/acceptance/.gitkeep DELETED
File without changes
vendor/weglot/weglot-php/tests/functional/.gitkeep DELETED
File without changes
weglot.php CHANGED
@@ -7,7 +7,7 @@ Author: Weglot Translate team
7
  Author URI: https://weglot.com/
8
  Text Domain: weglot
9
  Domain Path: /languages/
10
- Version: 3.1.1
11
  */
12
 
13
  /**
@@ -22,7 +22,7 @@ if ( ! defined('ABSPATH')) {
22
  define('WEGLOT_NAME', 'Weglot');
23
  define('WEGLOT_SLUG', 'weglot-translate');
24
  define('WEGLOT_OPTION_GROUP', 'group-weglot-translate');
25
- define('WEGLOT_VERSION', '3.1.1');
26
  define('WEGLOT_PHP_MIN', '5.4');
27
  define('WEGLOT_BNAME', plugin_basename(__FILE__));
28
  define('WEGLOT_DIR', __DIR__ );
7
  Author URI: https://weglot.com/
8
  Text Domain: weglot
9
  Domain Path: /languages/
10
+ Version: 3.1.2
11
  */
12
 
13
  /**
22
  define('WEGLOT_NAME', 'Weglot');
23
  define('WEGLOT_SLUG', 'weglot-translate');
24
  define('WEGLOT_OPTION_GROUP', 'group-weglot-translate');
25
+ define('WEGLOT_VERSION', '3.1.2');
26
  define('WEGLOT_PHP_MIN', '5.4');
27
  define('WEGLOT_BNAME', plugin_basename(__FILE__));
28
  define('WEGLOT_DIR', __DIR__ );