Weglot Translate – Translate your WP website - Version 2.7.0

Version Description

(18/03/2019) = * Changed : Improve Compatibility with Caldera Forms

Download this release

Release Info

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

Code changes from version 2.6.0 to 2.7.0

bootstrap.php CHANGED
@@ -84,10 +84,12 @@ abstract class Context_Weglot {
84
  '\WeglotWP\Actions\Migration_Weglot',
85
  '\WeglotWP\Third\Woocommerce\WC_Filter_Urls_Weglot',
86
  '\WeglotWP\Third\Woocommerce\WC_Cart_Reload_Weglot',
 
87
  '\WeglotWP\Third\Amp\Amp_Enqueue_Weglot',
88
  '\WeglotWP\Actions\Admin\Metabox_Url_Translate_Weglot',
89
  '\WeglotWP\Actions\Front\Front_Menu_Weglot',
90
  '\WeglotWP\Actions\Front\Search_Weglot',
 
91
  ];
92
 
93
  self::$context->set_actions( $actions );
84
  '\WeglotWP\Actions\Migration_Weglot',
85
  '\WeglotWP\Third\Woocommerce\WC_Filter_Urls_Weglot',
86
  '\WeglotWP\Third\Woocommerce\WC_Cart_Reload_Weglot',
87
+ '\WeglotWP\Third\CalderaForms\Caldera_I18n_Inline',
88
  '\WeglotWP\Third\Amp\Amp_Enqueue_Weglot',
89
  '\WeglotWP\Actions\Admin\Metabox_Url_Translate_Weglot',
90
  '\WeglotWP\Actions\Front\Front_Menu_Weglot',
91
  '\WeglotWP\Actions\Front\Search_Weglot',
92
+ '\WeglotWP\Actions\Front\Redirect_Comment',
93
  ];
94
 
95
  self::$context->set_actions( $actions );
composer.json CHANGED
@@ -13,7 +13,7 @@
13
  }
14
  ],
15
  "require": {
16
- "weglot/weglot-php": "^0.5",
17
  "galbar/jsonpath": "dev-master"
18
  },
19
  "require-dev": {
13
  }
14
  ],
15
  "require": {
16
+ "weglot/weglot-php": "0.5.20",
17
  "galbar/jsonpath": "dev-master"
18
  },
19
  "require-dev": {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: translate,translation,language,multilingual,bilingual,international,locali
4
  Requires at least: 4.5
5
  Tested up to: 5.1
6
  Requires PHP: 5.4
7
- Stable tag: 2.6.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -153,6 +153,9 @@ See changelog for upgrade changes.
153
 
154
  == Changelog ==
155
 
 
 
 
156
  = 2.6.0 (06/03/2019) =
157
  * Add : Prevent elementor ajax action on 2.5
158
  * Add : Compatibility with Caldera Forms
4
  Requires at least: 4.5
5
  Tested up to: 5.1
6
  Requires PHP: 5.4
7
+ Stable tag: 2.7.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
153
 
154
  == Changelog ==
155
 
156
+ = 2.7.0 (18/03/2019) =
157
+ * Changed : Improve Compatibility with Caldera Forms
158
+
159
  = 2.6.0 (06/03/2019) =
160
  * Add : Prevent elementor ajax action on 2.5
161
  * Add : Compatibility with Caldera Forms
src/actions/front/class-redirect-comment.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WeglotWP\Actions\Front;
4
+
5
+ if ( ! defined( 'ABSPATH' ) ) {
6
+ exit;
7
+ }
8
+
9
+ use WeglotWP\Models\Hooks_Interface_Weglot;
10
+
11
+ /**
12
+ *
13
+ * @since 2.7.0
14
+ */
15
+ class Redirect_Comment implements Hooks_Interface_Weglot {
16
+
17
+ /**
18
+ * @see Hooks_Interface_Weglot
19
+ *
20
+ * @since 2.7.0
21
+ * @return void
22
+ */
23
+ public function hooks() {
24
+ add_filter( 'comment_post_redirect', [ '\WeglotWP\Helpers\Helper_Filter_Url_Weglot', 'filter_url_lambda' ] );
25
+ }
26
+ }
27
+
28
+
src/actions/front/class-translate-page-weglot.php CHANGED
@@ -150,12 +150,12 @@ class Translate_Page_Weglot implements Hooks_Interface_Weglot {
150
  return;
151
  }
152
 
153
- $file = apply_filters( 'weglot_debug_file', WEGLOT_DIR . '/tests/templates/wp-api-posts.json' );
154
 
155
  if ( defined( 'WEGLOT_DEBUG' ) && WEGLOT_DEBUG && file_exists( $file ) ) {
156
  $this->translate_services->set_original_language( weglot_get_original_language() );
157
  $this->translate_services->set_current_language( $this->request_url_services->get_current_language() );
158
- header( 'Content-Type: application/json' );
159
  echo $this->translate_services->weglot_treat_page( file_get_contents( $file ) ); //phpcs:ignore
160
  die;
161
  } else {
150
  return;
151
  }
152
 
153
+ $file = apply_filters( 'weglot_debug_file', WEGLOT_DIR . '/tests/templates/content.html' );
154
 
155
  if ( defined( 'WEGLOT_DEBUG' ) && WEGLOT_DEBUG && file_exists( $file ) ) {
156
  $this->translate_services->set_original_language( weglot_get_original_language() );
157
  $this->translate_services->set_current_language( $this->request_url_services->get_current_language() );
158
+ // header( 'Content-Type: application/json' );
159
  echo $this->translate_services->weglot_treat_page( file_get_contents( $file ) ); //phpcs:ignore
160
  die;
161
  } else {
src/helpers/class-helper-filter-url-weglot.php CHANGED
@@ -34,6 +34,7 @@ abstract class Helper_Filter_Url_Weglot {
34
  public static function filter_url_lambda( $url ) {
35
  $current_and_original_language = weglot_get_current_and_original_language();
36
  $request_url_service = weglot_get_request_url_service();
 
37
  if ( $current_and_original_language['current'] === $current_and_original_language['original'] ) {
38
  return $url;
39
  }
34
  public static function filter_url_lambda( $url ) {
35
  $current_and_original_language = weglot_get_current_and_original_language();
36
  $request_url_service = weglot_get_request_url_service();
37
+
38
  if ( $current_and_original_language['current'] === $current_and_original_language['original'] ) {
39
  return $url;
40
  }
src/services/class-option-service-weglot.php CHANGED
@@ -120,6 +120,7 @@ class Option_Service_Weglot {
120
  $exclude_urls[] = '/wp-login.php';
121
  $exclude_urls[] = '/sitemaps_xsl.xsl';
122
  $exclude_urls[] = '/sitemaps.xml';
 
123
 
124
  return apply_filters( 'weglot_exclude_urls', $exclude_urls );
125
  }
120
  $exclude_urls[] = '/wp-login.php';
121
  $exclude_urls[] = '/sitemaps_xsl.xsl';
122
  $exclude_urls[] = '/sitemaps.xml';
123
+ $exclude_urls[] = 'wp-comments-post.php';
124
 
125
  return apply_filters( 'weglot_exclude_urls', $exclude_urls );
126
  }
src/services/class-request-url-service-weglot.php CHANGED
@@ -111,10 +111,14 @@ class Request_Url_Service_Weglot {
111
  * @return string
112
  */
113
  public function get_current_language( $with_filter = true ) {
 
 
114
  if ( ( wp_doing_ajax() || $this->is_rest() ) && isset( $_SERVER['HTTP_REFERER'] ) ) { //phpcs:ignore
115
  $current_language = $this->create_url_object( $_SERVER['HTTP_REFERER'] )->detectCurrentLanguage(); //phpcs:ignore
116
  } else {
117
- $current_language = $this->get_weglot_url()->detectCurrentLanguage();
 
 
118
  }
119
 
120
  if ( $with_filter ) {
111
  * @return string
112
  */
113
  public function get_current_language( $with_filter = true ) {
114
+ $current_language = $this->get_weglot_url()->detectCurrentLanguage();
115
+
116
  if ( ( wp_doing_ajax() || $this->is_rest() ) && isset( $_SERVER['HTTP_REFERER'] ) ) { //phpcs:ignore
117
  $current_language = $this->create_url_object( $_SERVER['HTTP_REFERER'] )->detectCurrentLanguage(); //phpcs:ignore
118
  } else {
119
+ if ( strpos( $this->get_full_url(), 'wp-comments-post.php' ) !== false ) {
120
+ $current_language = $this->create_url_object( $_SERVER['HTTP_REFERER'] )->detectCurrentLanguage(); //phpcs:ignore
121
+ }
122
  }
123
 
124
  if ( $with_filter ) {
src/third/calderaforms/class-caldera-active.php CHANGED
@@ -27,11 +27,7 @@ class Caldera_Active implements Third_Active_Interface_Weglot {
27
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
28
  }
29
 
30
- $active = true;
31
-
32
- if ( ! is_plugin_active( 'caldera-forms/caldera-core.php' ) ) {
33
- $active = false;
34
- }
35
 
36
  return apply_filters( 'weglot_caldera_forms_is_active', $active );
37
  }
27
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
28
  }
29
 
30
+ $active = defined( 'CFCORE_VER' );
 
 
 
 
31
 
32
  return apply_filters( 'weglot_caldera_forms_is_active', $active );
33
  }
src/third/calderaforms/class-caldera-i18n-inline.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace WeglotWP\Third\CalderaForms;
4
+
5
+ if ( ! defined( 'ABSPATH' ) ) {
6
+ exit;
7
+ }
8
+
9
+
10
+ use WeglotWP\Models\Hooks_Interface_Weglot;
11
+ use WeglotWP\Helpers\Helper_Filter_Url_Weglot;
12
+
13
+
14
+ /**
15
+ * @since 3.0.0
16
+ */
17
+ class Caldera_I18n_Inline implements Hooks_Interface_Weglot {
18
+
19
+ /**
20
+ * @since 3.0.0
21
+ * @return void
22
+ */
23
+ public function __construct() {
24
+ $this->caldera_active_services = weglot_get_service( 'Caldera_Active' );
25
+ }
26
+
27
+ /**
28
+ * @since 3.0.0
29
+ */
30
+ public function hooks() {
31
+ if ( ! $this->caldera_active_services->is_active() ) {
32
+ return;
33
+ }
34
+
35
+ add_filter( 'caldera_forms_print_translation_strings_in_footer', '__return_true' );
36
+ }
37
+ }
src/third/calderaforms/class-caldera-translate.php CHANGED
@@ -9,17 +9,109 @@ if ( ! defined( 'ABSPATH' ) ) {
9
 
10
  use WeglotWP\Helpers\Helper_Json_Inline_Weglot;
11
 
 
 
 
 
 
 
 
12
  /**
13
  * Caldera_Translate
14
  *
15
  * @since 2.6.0
16
  */
17
  class Caldera_Translate {
 
 
 
 
 
 
18
  protected function translate_entries( $dom ) {
19
  $parser = weglot_get_service( 'Parser_Service_Weglot' )->get_parser();
20
  return $parser->translate( $dom, weglot_get_original_language(), weglot_get_current_language() ); // phpcs:ignore
21
  }
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  /**
24
  * @since 2.6.0
25
  *
@@ -49,6 +141,7 @@ class Caldera_Translate {
49
  */
50
  public function translate_words( $content ) {
51
  $content = $this->translate_script_html_template( $content );
 
52
 
53
  return $content;
54
  }
9
 
10
  use WeglotWP\Helpers\Helper_Json_Inline_Weglot;
11
 
12
+ use Weglot\Client\Api\WordEntry;
13
+ use Weglot\Client\Api\Enum\WordType;
14
+ use Weglot\Client\Client;
15
+ use Weglot\Client\Endpoint\Translate;
16
+ use Weglot\Client\Api\TranslateEntry;
17
+ use Weglot\Client\Api\Enum\BotType;
18
+
19
  /**
20
  * Caldera_Translate
21
  *
22
  * @since 2.6.0
23
  */
24
  class Caldera_Translate {
25
+
26
+ /**
27
+ * @since 2.6.0
28
+ * @param string $dom
29
+ * @return string
30
+ */
31
  protected function translate_entries( $dom ) {
32
  $parser = weglot_get_service( 'Parser_Service_Weglot' )->get_parser();
33
  return $parser->translate( $dom, weglot_get_original_language(), weglot_get_current_language() ); // phpcs:ignore
34
  }
35
 
36
+ /**
37
+ * @since 2.7.0
38
+ * @param array $all_words
39
+ * @return array
40
+ */
41
+ protected function translate_words_inline( $all_words ) {
42
+ // TranslateEntry
43
+ $params = [
44
+ 'language_from' => weglot_get_original_language(),
45
+ 'language_to' => weglot_get_current_language(),
46
+ 'request_url' => weglot_get_current_full_url(),
47
+ 'bot' => BotType::HUMAN,
48
+ ];
49
+
50
+ $translate = new TranslateEntry( $params );
51
+
52
+ $word_collection = $translate->getInputWords();
53
+ foreach ( $all_words as $value ) {
54
+ $value = Helper_Json_Inline_Weglot::format_for_api( $value );
55
+ $word_collection->addOne( new WordEntry( $value, WordType::TEXT ) );
56
+ }
57
+
58
+ $client = new Client( weglot_get_option( 'api_key' ) );
59
+ $translate = new Translate( $translate, $client );
60
+
61
+ return $translate->handle();
62
+ }
63
+
64
+ /**
65
+ * @since 2.7.0
66
+ * @param string $content
67
+ * @return string
68
+ */
69
+ protected function translate_i18n_inline( $content ) {
70
+ $regex = apply_filters( 'weglot_caldera_forms_match_validator_settings', '#CF_VALIDATOR_STRINGS(.*?);#' );
71
+ preg_match( $regex, $content, $match );
72
+ if ( ! isset( $match[1] ) ) {
73
+ return $content;
74
+ }
75
+
76
+ $regex = apply_filters( 'weglot_caldera_forms_translate_validator_settings', '#(defaultMessage|email|url|number|integer|digits|alphanum|required|pattern|min|max|range|minlength|maxlength|length|mincheck|maxcheck|check|equalto|notblank)":"(.*?)"#' );
77
+ preg_match_all( $regex, $match[1], $all );
78
+
79
+ if ( empty( $all[2] ) ) {
80
+ return $content;
81
+ }
82
+ $current_language = weglot_get_current_language();
83
+
84
+ $object = $this->translate_words_inline( $all[2] );
85
+
86
+ foreach ( $object->getInputWords() as $key => $input_word ) {
87
+ $from_input_encoding = apply_filters( 'weglot_caldera_translate_need_json_encode', true );
88
+
89
+ $encoded = true;
90
+
91
+ if ( in_array( $current_language, apply_filters('weglot_caldera_translate_languages_encoded_output', ['fr'] ), true ) ) {
92
+ $encoded = false;
93
+ }
94
+
95
+ $to_output_encoding = apply_filters( 'weglot_caldera_translate_need_json_encode', $encoded );
96
+ $from_input = $input_word->getWord();
97
+ $to_output = $object->getOutputWords()[ $key ]->getWord();
98
+ if ( '' === $from_input ) {
99
+ continue;
100
+ }
101
+
102
+ if ( $from_input_encoding ) {
103
+ $from_input = Helper_Json_Inline_Weglot::need_json_encode_api( $from_input );
104
+ }
105
+ if ( $to_output_encoding ) {
106
+ $to_output = Helper_Json_Inline_Weglot::need_json_encode_api( $to_output );
107
+ }
108
+
109
+ $content = str_replace( '"' . $from_input . '"', '"' . $to_output . '"', $content );
110
+ }
111
+
112
+ return $content;
113
+ }
114
+
115
  /**
116
  * @since 2.6.0
117
  *
141
  */
142
  public function translate_words( $content ) {
143
  $content = $this->translate_script_html_template( $content );
144
+ $content = $this->translate_i18n_inline( $content );
145
 
146
  return $content;
147
  }
src/third/woocommerce/class-wc-filter-urls-weglot.php CHANGED
@@ -41,6 +41,7 @@ class WC_Filter_Urls_Weglot implements Hooks_Interface_Weglot {
41
 
42
  add_filter( 'woocommerce_get_cart_url', [ '\WeglotWP\Helpers\Helper_Filter_Url_Weglot', 'filter_url_without_ajax' ] );
43
  add_filter( 'woocommerce_get_checkout_url', [ '\WeglotWP\Helpers\Helper_Filter_Url_Weglot', 'filter_url_without_ajax' ] );
 
44
  add_filter( 'woocommerce_payment_successful_result', [ $this, 'woocommerce_filter_url_array' ] );
45
  add_filter( 'woocommerce_get_checkout_order_received_url', [ $this, 'woocommerce_filter_order_received_url' ] );
46
  add_action( 'woocommerce_reset_password_notification', [ $this, 'woocommerce_filter_reset_password' ], 999 );
41
 
42
  add_filter( 'woocommerce_get_cart_url', [ '\WeglotWP\Helpers\Helper_Filter_Url_Weglot', 'filter_url_without_ajax' ] );
43
  add_filter( 'woocommerce_get_checkout_url', [ '\WeglotWP\Helpers\Helper_Filter_Url_Weglot', 'filter_url_without_ajax' ] );
44
+ add_filter( 'woocommerce_get_myaccount_page_permalink', [ '\WeglotWP\Helpers\Helper_Filter_Url_Weglot', 'filter_url_without_ajax' ] );
45
  add_filter( 'woocommerce_payment_successful_result', [ $this, 'woocommerce_filter_url_array' ] );
46
  add_filter( 'woocommerce_get_checkout_order_received_url', [ $this, 'woocommerce_filter_order_received_url' ] );
47
  add_action( 'woocommerce_reset_password_notification', [ $this, 'woocommerce_filter_reset_password' ], 999 );
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit329d0bcd8475cb063db4d6c047ac2ecc::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInite1098bd8183a6ef79167c2f7794e2531::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit329d0bcd8475cb063db4d6c047ac2ecc
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit329d0bcd8475cb063db4d6c047ac2ecc
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit329d0bcd8475cb063db4d6c047ac2ecc', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit329d0bcd8475cb063db4d6c047ac2ecc', '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\ComposerStaticInit329d0bcd8475cb063db4d6c047ac2ecc::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit329d0bcd8475cb063db4d6c047ac2ecc
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit329d0bcd8475cb063db4d6c047ac2ecc::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire329d0bcd8475cb063db4d6c047ac2ecc($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire329d0bcd8475cb063db4d6c047ac2ecc($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 ComposerAutoloaderInite1098bd8183a6ef79167c2f7794e2531
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInite1098bd8183a6ef79167c2f7794e2531', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInite1098bd8183a6ef79167c2f7794e2531', '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\ComposerStaticInite1098bd8183a6ef79167c2f7794e2531::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\ComposerStaticInite1098bd8183a6ef79167c2f7794e2531::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequiree1098bd8183a6ef79167c2f7794e2531($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequiree1098bd8183a6ef79167c2f7794e2531($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 ComposerStaticInit329d0bcd8475cb063db4d6c047ac2ecc
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
@@ -59,9 +59,9 @@ class ComposerStaticInit329d0bcd8475cb063db4d6c047ac2ecc
59
  public static function getInitializer(ClassLoader $loader)
60
  {
61
  return \Closure::bind(function () use ($loader) {
62
- $loader->prefixLengthsPsr4 = ComposerStaticInit329d0bcd8475cb063db4d6c047ac2ecc::$prefixLengthsPsr4;
63
- $loader->prefixDirsPsr4 = ComposerStaticInit329d0bcd8475cb063db4d6c047ac2ecc::$prefixDirsPsr4;
64
- $loader->prefixesPsr0 = ComposerStaticInit329d0bcd8475cb063db4d6c047ac2ecc::$prefixesPsr0;
65
 
66
  }, null, ClassLoader::class);
67
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInite1098bd8183a6ef79167c2f7794e2531
8
  {
9
  public static $files = array (
10
  '6c200413eed8aeea54dbaf934a31b127' => __DIR__ . '/..' . '/weglot/simplehtmldom/src/simple_html_dom.php',
59
  public static function getInitializer(ClassLoader $loader)
60
  {
61
  return \Closure::bind(function () use ($loader) {
62
+ $loader->prefixLengthsPsr4 = ComposerStaticInite1098bd8183a6ef79167c2f7794e2531::$prefixLengthsPsr4;
63
+ $loader->prefixDirsPsr4 = ComposerStaticInite1098bd8183a6ef79167c2f7794e2531::$prefixDirsPsr4;
64
+ $loader->prefixesPsr0 = ComposerStaticInite1098bd8183a6ef79167c2f7794e2531::$prefixesPsr0;
65
 
66
  }, null, ClassLoader::class);
67
  }
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: 2.6.0
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', '2.6.0');
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: 2.7.0
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', '2.7.0');
26
  define('WEGLOT_PHP_MIN', '5.4');
27
  define('WEGLOT_BNAME', plugin_basename(__FILE__));
28
  define('WEGLOT_DIR', __DIR__ );