WPGlobus – Multilingual Everything! - Version 2.10.6

Version Description

  • Tested up to: 6.1
  • Fix: (Core) Don't run JS script if jQuery is not defined.
Download this release

Release Info

Developer tivnet
Plugin Icon 128x128 WPGlobus – Multilingual Everything!
Version 2.10.6
Comparing to
See all releases

Code changes from version 2.10.5 to 2.10.6

includes/admin/class-wpglobus-admin-bar-menu.php CHANGED
@@ -67,22 +67,24 @@ if ( ! class_exists( 'WPGlobus_Admin_Bar_Menu' ) ) :
67
  <!--suppress AnonymousFunctionJS, JSUnusedLocalSymbols -->
68
  <script type="text/javascript">
69
  //<![CDATA[
70
- jQuery(document).ready(function ($) {
71
- wpglobus_select_lang = function (locale) {
72
- $.post(ajaxurl, {
73
- action: 'WPGlobus_process_ajax',
74
- order: {action: 'wpglobus_select_lang', locale: locale}
75
- }, function (d) {
76
- })
77
- .done(function () {
78
- window.location.reload();
79
- });
80
- }
81
- $('#wpglobus-default-locale').on('click', function (e) {
82
- wpglobus_select_lang('<?php echo esc_js( WPGlobus::Config()->locale[ WPGlobus::Config()->language ] ); ?>');
83
- });
 
84
 
85
- });
 
86
  //]]>
87
  </script>
88
  <?php
@@ -211,3 +213,5 @@ if ( ! class_exists( 'WPGlobus_Admin_Bar_Menu' ) ) :
211
  }
212
 
213
  endif;
 
 
67
  <!--suppress AnonymousFunctionJS, JSUnusedLocalSymbols -->
68
  <script type="text/javascript">
69
  //<![CDATA[
70
+ if ( 'function' === typeof jQuery ) {
71
+ jQuery(document).ready(function ($) {
72
+ wpglobus_select_lang = function (locale) {
73
+ $.post(ajaxurl, {
74
+ action: 'WPGlobus_process_ajax',
75
+ order: {action: 'wpglobus_select_lang', locale: locale}
76
+ }, function (d) {
77
+ })
78
+ .done(function () {
79
+ window.location.reload();
80
+ });
81
+ }
82
+ $('#wpglobus-default-locale').on('click', function (e) {
83
+ wpglobus_select_lang('<?php echo esc_js( WPGlobus::Config()->locale[ WPGlobus::Config()->language ] ); ?>');
84
+ });
85
 
86
+ });
87
+ }
88
  //]]>
89
  </script>
90
  <?php
213
  }
214
 
215
  endif;
216
+
217
+ # --- EOF
includes/class-wpglobus.php CHANGED
@@ -3939,7 +3939,9 @@ class WPGlobus {
3939
  ?>
3940
  <script type='text/javascript'>
3941
  /* <![CDATA[ */
3942
- jQuery('#wp-admin-bar-site-name a').eq(0).text("<?php echo esc_js( $bn ); ?>");
 
 
3943
  /* ]]> */
3944
  </script>
3945
  <?php
3939
  ?>
3940
  <script type='text/javascript'>
3941
  /* <![CDATA[ */
3942
+ if ( 'function' === typeof jQuery ) {
3943
+ jQuery('#wp-admin-bar-site-name a').eq(0).text("<?php echo esc_js( $bn ); ?>");
3944
+ }
3945
  /* ]]> */
3946
  </script>
3947
  <?php
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: tivnetinc, alexgff, tivnet
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SLF8M4YNZHNQN
4
  Tags: WPGlobus, localization, multilanguage, multilingual, translate
5
  Requires at least: 5.5
6
- Tested up to: 6.0
7
  Requires PHP: 5.6
8
  Stable tag: trunk
9
  License: GPL-3.0-or-later
@@ -218,6 +218,10 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
218
 
219
  == Changelog ==
220
 
 
 
 
 
221
  = 2.10.5 =
222
  * Fix: (Core/Filters) Translations not loaded correctly in some situations (refactored `\WPGlobus_Filters::filter__get_locale`).
223
  * Fix: (Elementor) Update language switcher.
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SLF8M4YNZHNQN
4
  Tags: WPGlobus, localization, multilanguage, multilingual, translate
5
  Requires at least: 5.5
6
+ Tested up to: 6.1
7
  Requires PHP: 5.6
8
  Stable tag: trunk
9
  License: GPL-3.0-or-later
218
 
219
  == Changelog ==
220
 
221
+ = 2.10.6 =
222
+ * Tested up to: 6.1
223
+ * Fix: (Core) Don't run JS script if jQuery is not defined.
224
+
225
  = 2.10.5 =
226
  * Fix: (Core/Filters) Translations not loaded correctly in some situations (refactored `\WPGlobus_Filters::filter__get_locale`).
227
  * Fix: (Elementor) Update language switcher.
wpglobus.php CHANGED
@@ -15,7 +15,7 @@
15
  * Description: A WordPress Globalization / Multilingual Plugin. Posts, pages, menus, widgets and even custom fields - in multiple languages!
16
  * Text Domain: wpglobus
17
  * Domain Path: /languages/
18
- * Version: 2.10.5
19
  * Author: WPGlobus
20
  * Author URI: https://wpglobus.com/
21
  * Network: false
@@ -44,7 +44,7 @@ if ( ! defined( 'ABSPATH' ) ) {
44
  exit;
45
  }
46
 
47
- define( 'WPGLOBUS_VERSION', '2.10.5' );
48
  define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
49
  define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
50
 
15
  * Description: A WordPress Globalization / Multilingual Plugin. Posts, pages, menus, widgets and even custom fields - in multiple languages!
16
  * Text Domain: wpglobus
17
  * Domain Path: /languages/
18
+ * Version: 2.10.6
19
  * Author: WPGlobus
20
  * Author URI: https://wpglobus.com/
21
  * Network: false
44
  exit;
45
  }
46
 
47
+ define( 'WPGLOBUS_VERSION', '2.10.6' );
48
  define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
49
  define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
50