Weglot Translate – Translate your WP website - Version 2.3.1

Version Description

(05/12/2018) = * Bugfix : Button preview fail on migration for private mode

Download this release

Release Info

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

Code changes from version 2.3.0 to 2.3.1

readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Translate WP website - Weglot Translate ===
2
- Contributors: remyb92, gmulti
3
  Tags: translate,translation,language,multilingual,bilingual,international,localization,multilanguage,multi language,translations,translator,multilangues,traduction,traducteur,ubersetzung,mehrsprachig,traduccion,traduzione,vertaling,vertaler,meertalig
4
  Requires at least: 4.5
5
  Tested up to: 5.0
6
  Requires PHP: 5.4
7
- Stable tag: 2.3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -152,6 +152,9 @@ See changelog for upgrade changes.
152
 
153
  == Changelog ==
154
 
 
 
 
155
  = 2.3.0 (05/12/2018) =
156
  * Bugfix : Custom URL on archive page
157
  * Bugfix : Prevent error on translate AJAX
1
  === Translate WP website - Weglot Translate ===
2
+ Contributors: remyb92, gmulti, wysija
3
  Tags: translate,translation,language,multilingual,bilingual,international,localization,multilanguage,multi language,translations,translator,multilangues,traduction,traducteur,ubersetzung,mehrsprachig,traduccion,traduzione,vertaling,vertaler,meertalig
4
  Requires at least: 4.5
5
  Tested up to: 5.0
6
  Requires PHP: 5.4
7
+ Stable tag: 2.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
152
 
153
  == Changelog ==
154
 
155
+ = 2.3.1 (05/12/2018) =
156
+ * Bugfix : Button preview fail on migration for private mode
157
+
158
  = 2.3.0 (05/12/2018) =
159
  * Bugfix : Custom URL on archive page
160
  * Bugfix : Prevent error on translate AJAX
src/services/class-button-service-weglot.php CHANGED
@@ -78,7 +78,7 @@ class Button_Service_Weglot {
78
  * Get html button switcher
79
  *
80
  * @since 2.0
81
- * @version 2.3.0
82
  * @return string
83
  * @param string $add_class
84
  */
@@ -87,16 +87,21 @@ class Button_Service_Weglot {
87
  $original_language = weglot_get_original_language();
88
 
89
  $view_button = false;
90
- foreach ($private_mode as $key_code => $value) {
91
- if ( $key_code === $original_language || $key_code === 'active' ) {
92
- continue;
93
- }
 
94
 
95
- if ( ! $this->private_language_services->is_active_private_mode_for_lang( $key_code ) ) {
96
- $view_button = true;
 
97
  }
 
 
98
  }
99
- if ( ! $view_button) {
 
100
  return '';
101
  }
102
 
78
  * Get html button switcher
79
  *
80
  * @since 2.0
81
+ * @version 2.3.1
82
  * @return string
83
  * @param string $add_class
84
  */
87
  $original_language = weglot_get_original_language();
88
 
89
  $view_button = false;
90
+ if ( $private_mode['active'] && ! is_admin() ) {
91
+ foreach ($private_mode as $key_code => $value) {
92
+ if ( $key_code === $original_language || $key_code === 'active' ) {
93
+ continue;
94
+ }
95
 
96
+ if ( ! $this->private_language_services->is_active_private_mode_for_lang( $key_code ) ) {
97
+ $view_button = true;
98
+ }
99
  }
100
+ } else {
101
+ $view_button = true;
102
  }
103
+
104
+ if ( ! apply_filters( 'weglot_view_button_html', $view_button ) ) {
105
  return '';
106
  }
107
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitdcd4b6e424c9b83714d188a8ae11cec7::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit083a0087f89e1a005689d29cd9f22dcc::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitdcd4b6e424c9b83714d188a8ae11cec7
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitdcd4b6e424c9b83714d188a8ae11cec7
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitdcd4b6e424c9b83714d188a8ae11cec7', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitdcd4b6e424c9b83714d188a8ae11cec7', '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\ComposerStaticInitdcd4b6e424c9b83714d188a8ae11cec7::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitdcd4b6e424c9b83714d188a8ae11cec7
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitdcd4b6e424c9b83714d188a8ae11cec7::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequiredcd4b6e424c9b83714d188a8ae11cec7($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequiredcd4b6e424c9b83714d188a8ae11cec7($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 ComposerAutoloaderInit083a0087f89e1a005689d29cd9f22dcc
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit083a0087f89e1a005689d29cd9f22dcc', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit083a0087f89e1a005689d29cd9f22dcc', '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\ComposerStaticInit083a0087f89e1a005689d29cd9f22dcc::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\ComposerStaticInit083a0087f89e1a005689d29cd9f22dcc::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire083a0087f89e1a005689d29cd9f22dcc($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire083a0087f89e1a005689d29cd9f22dcc($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 ComposerStaticInitdcd4b6e424c9b83714d188a8ae11cec7
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
@@ -45,9 +45,9 @@ class ComposerStaticInitdcd4b6e424c9b83714d188a8ae11cec7
45
  public static function getInitializer(ClassLoader $loader)
46
  {
47
  return \Closure::bind(function () use ($loader) {
48
- $loader->prefixLengthsPsr4 = ComposerStaticInitdcd4b6e424c9b83714d188a8ae11cec7::$prefixLengthsPsr4;
49
- $loader->prefixDirsPsr4 = ComposerStaticInitdcd4b6e424c9b83714d188a8ae11cec7::$prefixDirsPsr4;
50
- $loader->prefixesPsr0 = ComposerStaticInitdcd4b6e424c9b83714d188a8ae11cec7::$prefixesPsr0;
51
 
52
  }, null, ClassLoader::class);
53
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit083a0087f89e1a005689d29cd9f22dcc
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
45
  public static function getInitializer(ClassLoader $loader)
46
  {
47
  return \Closure::bind(function () use ($loader) {
48
+ $loader->prefixLengthsPsr4 = ComposerStaticInit083a0087f89e1a005689d29cd9f22dcc::$prefixLengthsPsr4;
49
+ $loader->prefixDirsPsr4 = ComposerStaticInit083a0087f89e1a005689d29cd9f22dcc::$prefixDirsPsr4;
50
+ $loader->prefixesPsr0 = ComposerStaticInit083a0087f89e1a005689d29cd9f22dcc::$prefixesPsr0;
51
 
52
  }, null, ClassLoader::class);
53
  }
weglot.php CHANGED
@@ -11,7 +11,7 @@ Author: Weglot Translate team
11
  Author URI: https://weglot.com/
12
  Text Domain: weglot
13
  Domain Path: /languages/
14
- Version: 2.3.0
15
  */
16
 
17
  /**
@@ -26,7 +26,7 @@ if ( ! defined('ABSPATH')) {
26
  define('WEGLOT_NAME', 'Weglot');
27
  define('WEGLOT_SLUG', 'weglot-translate');
28
  define('WEGLOT_OPTION_GROUP', 'group-weglot-translate');
29
- define('WEGLOT_VERSION', '2.3.0');
30
  define('WEGLOT_PHP_MIN', '5.4');
31
  define('WEGLOT_BNAME', plugin_basename(__FILE__));
32
  define('WEGLOT_DIR', __DIR__ );
11
  Author URI: https://weglot.com/
12
  Text Domain: weglot
13
  Domain Path: /languages/
14
+ Version: 2.3.1
15
  */
16
 
17
  /**
26
  define('WEGLOT_NAME', 'Weglot');
27
  define('WEGLOT_SLUG', 'weglot-translate');
28
  define('WEGLOT_OPTION_GROUP', 'group-weglot-translate');
29
+ define('WEGLOT_VERSION', '2.3.1');
30
  define('WEGLOT_PHP_MIN', '5.4');
31
  define('WEGLOT_BNAME', plugin_basename(__FILE__));
32
  define('WEGLOT_DIR', __DIR__ );