WPGlobus – Multilingual Everything! - Version 2.8.1

Version Description

  • (Vendor/Yoast) Fixed PHP Notice: Undefined index: description.
  • (Vendor/Yoast) Fixed an issue with og:title meta.
Download this release

Release Info

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

Code changes from version 2.8.0 to 2.8.1

data/wpglobus-product-info.json CHANGED
@@ -1 +1 @@
1
- {"multilingual-woocommerce-nets-netaxept":{"title":"{:en}Multilingual WooCommerce Nets Netaxept{:}{:ru}\u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce Nets Netaxept{:}","_api_new_version":"1.0.3","_api_tested_up_to":"4.9.8"},"wpglobus-multi-currency":{"title":"{:en}Multi-Currency for WooCommerce{:}{:ru}WPGlobus - \u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce{:}","_api_new_version":"1.1.1","_api_tested_up_to":"4.9.4"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.6"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.1.0","_api_tested_up_to":"5.5"},"wpglobus-for-ultimate-member":{"title":"{:en}WPGlobus for Ultimate Member{:}{:ru}WPGlobus \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Ultimate Member{:}","_api_new_version":"1.1.0","_api_tested_up_to":"5.6"},"wpglobus-menu-visibility":{"title":"WPGlobus Menu Visibility","_api_new_version":"2.0.0","_api_tested_up_to":"5.6"},"wpglobus-for-bridge-theme":{"title":"{:en}WPGlobus for the \"Bridge\" theme{:}{:ru}WPGlobus \u0434\u043b\u044f \u0442\u0435\u043c\u044b Bridge{:}","_api_new_version":"2.4.0","_api_tested_up_to":"5.5"},"wpglobus-language-widgets":{"title":"{:en}WPGlobus Language Widgets{:}{:ru}\u042f\u0437\u044b\u043a\u0438 WPGlobus \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432{:}","_api_new_version":"2.1.0","_api_tested_up_to":"5.7"},"wpglobus-multilingual-popups":{"title":"{:en}WPGlobus Multilingual Popups{:}{:ru}WPGlobus Multilingual Popups{:}","_api_new_version":"1.4.0","_api_tested_up_to":"5.7"},"woocommerce-wpglobus":{"title":"{:en}WPGlobus for WooCommerce{:}{:ru}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 WooCommerce WPGlobus{:}","_api_new_version":"5.3.0","_api_tested_up_to":"5.7"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.7.3","_api_tested_up_to":"5.7.2"},"wpglobus-multilingual-notices":{"title":"{:en}WPGlobus Multilingual Notices{:}{:ru}WPGlobus - \u043c\u043d\u043e\u0433\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f{:}","_api_new_version":"2.8.0","_api_tested_up_to":"5.7.2"}}
1
+ {"multilingual-woocommerce-nets-netaxept":{"title":"{:en}Multilingual WooCommerce Nets Netaxept{:}{:ru}\u041c\u0443\u043b\u044c\u0442\u0438\u044f\u0437\u044b\u0447\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce Nets Netaxept{:}","_api_new_version":"1.0.3","_api_tested_up_to":"4.9.8"},"wpglobus-multi-currency":{"title":"{:en}Multi-Currency for WooCommerce{:}{:ru}WPGlobus - \u041c\u0443\u043b\u044c\u0442\u0438\u0432\u0430\u043b\u044e\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f WooCommerce{:}","_api_new_version":"1.1.1","_api_tested_up_to":"4.9.4"},"wpglobus-mobile-menu":{"title":"{:en}WPGlobus Mobile Menu{:}{:ru}WPGlobus Mobile Menu{:}","_api_new_version":"2.2.0","_api_tested_up_to":"5.6"},"wpglobus-header-images":{"title":"{:en}WPGlobus Header Images{:}{:ru}WPGlobus Header Images{:}","_api_new_version":"2.1.0","_api_tested_up_to":"5.5"},"wpglobus-for-ultimate-member":{"title":"{:en}WPGlobus for Ultimate Member{:}{:ru}WPGlobus \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Ultimate Member{:}","_api_new_version":"1.1.0","_api_tested_up_to":"5.6"},"wpglobus-menu-visibility":{"title":"WPGlobus Menu Visibility","_api_new_version":"2.0.0","_api_tested_up_to":"5.6"},"wpglobus-for-bridge-theme":{"title":"{:en}WPGlobus for the \"Bridge\" theme{:}{:ru}WPGlobus \u0434\u043b\u044f \u0442\u0435\u043c\u044b Bridge{:}","_api_new_version":"2.4.0","_api_tested_up_to":"5.5"},"wpglobus-language-widgets":{"title":"{:en}WPGlobus Language Widgets{:}{:ru}\u042f\u0437\u044b\u043a\u0438 WPGlobus \u0434\u043b\u044f \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432{:}","_api_new_version":"2.1.0","_api_tested_up_to":"5.7"},"wpglobus-multilingual-popups":{"title":"{:en}WPGlobus Multilingual Popups{:}{:ru}WPGlobus Multilingual Popups{:}","_api_new_version":"1.4.0","_api_tested_up_to":"5.7"},"woocommerce-wpglobus":{"title":"{:en}WPGlobus for WooCommerce{:}{:ru}\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 WooCommerce WPGlobus{:}","_api_new_version":"5.3.0","_api_tested_up_to":"5.7"},"wpglobus-plus":{"title":"{:en}WPGlobus Plus multilingual extension{:}{:ru}WPGlobus \u041f\u043b\u044e\u0441{:}","_api_new_version":"1.7.3","_api_tested_up_to":"5.7.2"},"wpglobus-multilingual-notices":{"title":"{:en}WPGlobus Multilingual Notices{:}{:ru}WPGlobus - \u043c\u043d\u043e\u0433\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0435 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f{:}","_api_new_version":"2.9.1","_api_tested_up_to":"5.7.2"}}
includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php CHANGED
@@ -272,10 +272,10 @@ class WPGlobus_YoastSEO {
272
  * @param Abstract_Schema_Piece[] $graph_piece_generators A value object with context variables.
273
  */
274
  public static function filter__wpseo_schema_person( $graph_piece, $context, $graph_piece_generator, $graph_piece_generators ) {
275
-
276
  $keys = array( 'name', 'description' );
277
  foreach( $keys as $_key ) {
278
- if ( WPGlobus_Core::has_translations( $graph_piece[$_key] ) ) {
279
  $graph_piece[$_key] = WPGlobus_Core::extract_text( $graph_piece[$_key], WPGlobus::Config()->language );
280
  }
281
  }
@@ -696,14 +696,31 @@ class WPGlobus_YoastSEO {
696
  }
697
 
698
  } else {
699
-
700
  /**
701
  * @since 2.5.23
702
  */
703
  if ( WPGlobus_Core::has_translations( $title ) ) {
704
  $title = WPGlobus_Core::extract_text( $title, WPGlobus::Config()->language );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
705
  }
706
-
707
  }
708
 
709
  } elseif ( 'term' == $presentation->model->object_type ) {
@@ -1199,9 +1216,9 @@ class WPGlobus_YoastSEO {
1199
  protected static function get_meta( $meta_key, $meta_value = '', $presentation_source = null ) {
1200
 
1201
  // TODO: Test it!
1202
- if ( ! empty( $meta_value ) ) {
1203
- return WPGlobus_Core::extract_text( $meta_value );
1204
- }
1205
 
1206
  if ( is_null(self::$wpseo_meta) ) {
1207
  self::get_wpseo_meta();
@@ -1209,11 +1226,11 @@ class WPGlobus_YoastSEO {
1209
 
1210
  if ( empty( self::$wpseo_meta[ $meta_key ] ) ) {
1211
  // TODO: Test it!
1212
- if ( ! empty( $presentation_source->ID ) ) {
1213
- self::$wpseo_meta[ $meta_key ][ $presentation_source->ID ] = $meta_value;
1214
- } else {
1215
  return '';
1216
- }
1217
  }
1218
 
1219
  /** @global WP_Post $post */
@@ -1226,7 +1243,8 @@ class WPGlobus_YoastSEO {
1226
  return '';
1227
  }
1228
  // TODO: Test it!
1229
- return WPGlobus_Core::extract_text( self::$wpseo_meta[$meta_key][$presentation_source->ID] );
 
1230
  }
1231
 
1232
  /**
@@ -1240,7 +1258,8 @@ class WPGlobus_YoastSEO {
1240
  }
1241
 
1242
  // TODO: Test it!
1243
- return WPGlobus_Core::extract_text( self::$wpseo_meta[$meta_key][$post->ID] );
 
1244
  }
1245
 
1246
  $_return_value = '';
@@ -1254,7 +1273,8 @@ class WPGlobus_YoastSEO {
1254
 
1255
  if ( false !== strpos( $_meta_value, $meta_value ) ) {
1256
  // TODO: Test it!
1257
- $_return_value = WPGlobus_Core::extract_text( $_meta_value );
 
1258
  break;
1259
  }
1260
  }
272
  * @param Abstract_Schema_Piece[] $graph_piece_generators A value object with context variables.
273
  */
274
  public static function filter__wpseo_schema_person( $graph_piece, $context, $graph_piece_generator, $graph_piece_generators ) {
275
+
276
  $keys = array( 'name', 'description' );
277
  foreach( $keys as $_key ) {
278
+ if ( ! empty( $graph_piece[$_key] ) && WPGlobus_Core::has_translations( $graph_piece[$_key] ) ) {
279
  $graph_piece[$_key] = WPGlobus_Core::extract_text( $graph_piece[$_key], WPGlobus::Config()->language );
280
  }
281
  }
696
  }
697
 
698
  } else {
699
+
700
  /**
701
  * @since 2.5.23
702
  */
703
  if ( WPGlobus_Core::has_translations( $title ) ) {
704
  $title = WPGlobus_Core::extract_text( $title, WPGlobus::Config()->language );
705
+ } else {
706
+ /**
707
+ * The Opengraph title is received in the last saved language. Get it from meta.
708
+ * @since 2.8.1
709
+ */
710
+ if ( empty( $meta_cache['_yoast_wpseo_focuskw'][0] ) ) {
711
+ $__title = self::get_option( 'wpseo_titles', 'title-' . $presentation->model->object_sub_type );
712
+ if ( ! is_null($__title) ) {
713
+ $title = $__title;
714
+ }
715
+ } else {
716
+ $title = $meta_cache['_yoast_wpseo_title'][0];
717
+ }
718
+
719
+ if ( ! empty($title) ) {
720
+ $title = wpseo_replace_vars( $title, $presentation->source );
721
+ }
722
  }
723
+
724
  }
725
 
726
  } elseif ( 'term' == $presentation->model->object_type ) {
1216
  protected static function get_meta( $meta_key, $meta_value = '', $presentation_source = null ) {
1217
 
1218
  // TODO: Test it!
1219
+ // if ( ! empty( $meta_value ) ) {
1220
+ // return WPGlobus_Core::extract_text( $meta_value );
1221
+ // }
1222
 
1223
  if ( is_null(self::$wpseo_meta) ) {
1224
  self::get_wpseo_meta();
1226
 
1227
  if ( empty( self::$wpseo_meta[ $meta_key ] ) ) {
1228
  // TODO: Test it!
1229
+ // if ( ! empty( $presentation_source->ID ) ) {
1230
+ // self::$wpseo_meta[ $meta_key ][ $presentation_source->ID ] = $meta_value;
1231
+ // } else {
1232
  return '';
1233
+ // }
1234
  }
1235
 
1236
  /** @global WP_Post $post */
1243
  return '';
1244
  }
1245
  // TODO: Test it!
1246
+ // return WPGlobus_Core::extract_text( self::$wpseo_meta[$meta_key][$presentation_source->ID] );
1247
+ return WPGlobus_Core::text_filter( self::$wpseo_meta[$meta_key][$presentation_source->ID], WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
1248
  }
1249
 
1250
  /**
1258
  }
1259
 
1260
  // TODO: Test it!
1261
+ // return WPGlobus_Core::extract_text( self::$wpseo_meta[$meta_key][$post->ID] );
1262
+ return WPGlobus_Core::text_filter( self::$wpseo_meta[$meta_key][$post->ID], WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
1263
  }
1264
 
1265
  $_return_value = '';
1273
 
1274
  if ( false !== strpos( $_meta_value, $meta_value ) ) {
1275
  // TODO: Test it!
1276
+ // $_return_value = WPGlobus_Core::extract_text( $_meta_value );
1277
+ $_return_value = WPGlobus_Core::text_filter( $_meta_value, WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
1278
  break;
1279
  }
1280
  }
readme.txt CHANGED
@@ -220,6 +220,10 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
220
 
221
  == Changelog ==
222
 
 
 
 
 
223
  = 2.8.0 =
224
  * (Compatibility) Tested up to WordPress 5.8
225
  * (Core/Options) Added `use_widgets_block_editor` option.
@@ -229,24 +233,6 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
229
  * (Core/JS) Checking existing WPGlobusWidgets before init.
230
  * (Core/JS) Don't run with WP 5.8 when the block editor enables for managing widgets.
231
 
232
- = 2.7.14 =
233
- * (Vendor/Yoast) Fixed incorrect meta description output in some situations.
234
- * (Vendor/Yoast) Additional multilingual filters.
235
-
236
- = 2.7.13 =
237
- * (Vendor/Yoast) Init `TinyMCE` description editor on the `term.php` page.
238
- * (Vendor/Yoast) Fixed incorrect rewriting taxonomy metas during the update process.
239
-
240
- = 2.7.12 =
241
- * (Core/JS) Force init `WPGlobusDialogApp` before using.
242
-
243
- = 2.7.11 =
244
- * (Vendor/Yoast) Fixed issue with the breadcrumbs title (generated from the taxonomy title) in the `Schema Presenter`.
245
- * (Core/Post Types) Added the `elementor_snippet` post type to the `"hidden types"` list.
246
-
247
- = 2.7.10 =
248
- * (Vendor/Yoast) Fixed an issue with using variables in post descriptions.
249
-
250
  == Demo Sites ==
251
 
252
  * [WPGlobus.com](https://wpglobus.com/):
220
 
221
  == Changelog ==
222
 
223
+ = 2.8.1 =
224
+ * (Vendor/Yoast) Fixed PHP Notice: `Undefined index: description`.
225
+ * (Vendor/Yoast) Fixed an issue with `og:title` meta.
226
+
227
  = 2.8.0 =
228
  * (Compatibility) Tested up to WordPress 5.8
229
  * (Core/Options) Added `use_widgets_block_editor` option.
233
  * (Core/JS) Checking existing WPGlobusWidgets before init.
234
  * (Core/JS) Don't run with WP 5.8 when the block editor enables for managing widgets.
235
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  == Demo Sites ==
237
 
238
  * [WPGlobus.com](https://wpglobus.com/):
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.8.0
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.8.0' );
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.8.1
19
  * Author: WPGlobus
20
  * Author URI: https://wpglobus.com/
21
  * Network: false
44
  exit;
45
  }
46
 
47
+ define( 'WPGLOBUS_VERSION', '2.8.1' );
48
  define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
49
  define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
50