WPGlobus – Multilingual Everything! - Version 2.7.10

Version Description

  • (Vendor/Yoast) Fixed an issue with using variables in post descriptions.
Download this release

Release Info

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

Code changes from version 2.7.9 to 2.7.10

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"},"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.7.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.1","_api_tested_up_to":"5.7.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.2","_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"}}
includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php CHANGED
@@ -747,9 +747,13 @@ class WPGlobus_YoastSEO {
747
  }
748
  }
749
 
750
- $description = self::get_meta( '_yoast_wpseo_metadesc', $meta_description );
 
 
 
 
751
 
752
- } elseif ( 'term' == $presentation->model->object_type ) {
753
 
754
  /**
755
  * Taxonomy.
@@ -789,7 +793,7 @@ class WPGlobus_YoastSEO {
789
  }
790
  }
791
 
792
- } elseif ( 'home-page' == $presentation->model->object_type ) {
793
 
794
  /**
795
  * When homepage displays latest post.
@@ -1087,10 +1091,11 @@ class WPGlobus_YoastSEO {
1087
  /**
1088
  * Get meta for extra language.
1089
  *
1090
- * @scope admin
1091
  * @since 2.2.16
 
1092
  */
1093
- protected static function get_meta( $meta_key, $meta_value = '' ) {
1094
 
1095
  if ( is_null(self::$wpseo_meta) ) {
1096
  self::get_wpseo_meta();
@@ -1105,6 +1110,13 @@ class WPGlobus_YoastSEO {
1105
 
1106
  if ( empty( $meta_value ) ) {
1107
 
 
 
 
 
 
 
 
1108
  /**
1109
  * Try get meta by post ID.
1110
  */
@@ -1117,15 +1129,22 @@ class WPGlobus_YoastSEO {
1117
 
1118
  return WPGlobus_Core::text_filter( self::$wpseo_meta[$meta_key][$post->ID], WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
1119
  }
1120
-
1121
  $_return_value = '';
1122
  foreach( self::$wpseo_meta[ $meta_key ] as $_meta_value ) {
 
 
 
 
 
 
 
1123
  if ( false !== strpos( $_meta_value, $meta_value ) ) {
1124
  $_return_value = WPGlobus_Core::text_filter( $_meta_value, WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
1125
  break;
1126
  }
1127
  }
1128
-
1129
  return $_return_value;
1130
  }
1131
 
747
  }
748
  }
749
 
750
+ /**
751
+ * Added $presentation->source as parameter.
752
+ * @since 2.7.10
753
+ */
754
+ $description = self::get_meta( '_yoast_wpseo_metadesc', $meta_description, $presentation->source );
755
 
756
+ } else if ( 'term' == $presentation->model->object_type ) {
757
 
758
  /**
759
  * Taxonomy.
793
  }
794
  }
795
 
796
+ } else if ( 'home-page' == $presentation->model->object_type ) {
797
 
798
  /**
799
  * When homepage displays latest post.
1091
  /**
1092
  * Get meta for extra language.
1093
  *
1094
+ * @scope both
1095
  * @since 2.2.16
1096
+ * @since 2.7.10 Added $presentation_source parameter.
1097
  */
1098
+ protected static function get_meta( $meta_key, $meta_value = '', $presentation_source = null ) {
1099
 
1100
  if ( is_null(self::$wpseo_meta) ) {
1101
  self::get_wpseo_meta();
1110
 
1111
  if ( empty( $meta_value ) ) {
1112
 
1113
+ if ( $presentation_source instanceof WP_Post ) {
1114
+ if ( empty( self::$wpseo_meta[$meta_key][$presentation_source->ID] ) ) {
1115
+ return '';
1116
+ }
1117
+ return WPGlobus_Core::text_filter( self::$wpseo_meta[$meta_key][$presentation_source->ID], WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
1118
+ }
1119
+
1120
  /**
1121
  * Try get meta by post ID.
1122
  */
1129
 
1130
  return WPGlobus_Core::text_filter( self::$wpseo_meta[$meta_key][$post->ID], WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
1131
  }
1132
+
1133
  $_return_value = '';
1134
  foreach( self::$wpseo_meta[ $meta_key ] as $_meta_value ) {
1135
+
1136
+ if ( $presentation_source instanceof WP_Post ) {
1137
+ $_meta_value = wpseo_replace_vars( $_meta_value, $presentation_source );
1138
+ } else if ( $post instanceof WP_Post ) {
1139
+ $_meta_value = wpseo_replace_vars( $_meta_value, $post );
1140
+ }
1141
+
1142
  if ( false !== strpos( $_meta_value, $meta_value ) ) {
1143
  $_return_value = WPGlobus_Core::text_filter( $_meta_value, WPGlobus::Config()->language, WPGlobus::RETURN_EMPTY );
1144
  break;
1145
  }
1146
  }
1147
+
1148
  return $_return_value;
1149
  }
1150
 
languages/wpglobus.pot CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2021 WPGlobus 2.7.9
2
- # This file is distributed under the same license as the WPGlobus 2.7.9 package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WPGlobus 2.7.9\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
@@ -1413,15 +1413,15 @@ msgstr ""
1413
  msgid "To use this field, please activate the %1$sACF Plus%2$s module"
1414
  msgstr ""
1415
 
1416
- #: includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php:1248
1417
  msgid "Bulk editing of the multilingual titles and descriptions is not supported by the current version."
1418
  msgstr ""
1419
 
1420
- #: includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php:1249
1421
  msgid "Therefore, to avoid any data loss, we do not recommend using this."
1422
  msgstr ""
1423
 
1424
- #: includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php:1252
1425
  msgid "WPGlobus warning: "
1426
  msgstr ""
1427
 
1
+ # Copyright (C) 2021 WPGlobus 2.7.10
2
+ # This file is distributed under the same license as the WPGlobus 2.7.10 package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WPGlobus 2.7.10\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
1413
  msgid "To use this field, please activate the %1$sACF Plus%2$s module"
1414
  msgstr ""
1415
 
1416
+ #: includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php:1267
1417
  msgid "Bulk editing of the multilingual titles and descriptions is not supported by the current version."
1418
  msgstr ""
1419
 
1420
+ #: includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php:1268
1421
  msgid "Therefore, to avoid any data loss, we do not recommend using this."
1422
  msgstr ""
1423
 
1424
+ #: includes/vendor/yoast-seo/class-wpglobus-yoastseo140.php:1271
1425
  msgid "WPGlobus warning: "
1426
  msgstr ""
1427
 
readme.txt CHANGED
@@ -220,6 +220,9 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
220
 
221
  == Changelog ==
222
 
 
 
 
223
  = 2.7.9 =
224
  * (Vendor/ACF) Added the current language name for the ACF fields metabox in the Builder mode.
225
  * (Vendor/ACF) Added filtering of the field array before it is updated.
220
 
221
  == Changelog ==
222
 
223
+ = 2.7.10 =
224
+ * (Vendor/Yoast) Fixed an issue with using variables in post descriptions.
225
+
226
  = 2.7.9 =
227
  * (Vendor/ACF) Added the current language name for the ACF fields metabox in the Builder mode.
228
  * (Vendor/ACF) Added filtering of the field array before it is updated.
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.7.9
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.7.9' );
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.7.10
19
  * Author: WPGlobus
20
  * Author URI: https://wpglobus.com/
21
  * Network: false
44
  exit;
45
  }
46
 
47
+ define( 'WPGLOBUS_VERSION', '2.7.10' );
48
  define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
49
  define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
50