WPGlobus – Multilingual Everything! - Version 2.4.4

Version Description

= 2.0.0 =

WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.

Download this release

Release Info

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

Code changes from version 2.4.3 to 2.4.4

includes/vendor/rank-math-seo/class-wpglobus-vendor-rank_math_seo-front.php CHANGED
@@ -3,6 +3,7 @@
3
  * File: class-wpglobus-vendor-rank_math_seo-front.php
4
  *
5
  * @since 2.4.3
 
6
  *
7
  * @package WPGlobus\Builders\RankMathSEO.
8
  * @author Alex Gor(alexgff)
@@ -17,20 +18,63 @@ if ( ! class_exists( 'WPGlobus_Vendor_RankMathSEO_Front' ) ) :
17
 
18
  public static function controller() {
19
  add_filter( 'wpglobus_multilingual_meta_keys', array( __CLASS__, 'filter__multilingual_meta_keys' ), 5 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  /**
23
  * Specify meta keys where the meta data can be multilingual.
24
  */
25
  public static function filter__multilingual_meta_keys( $multilingual_meta_keys ) {
26
-
27
  $multilingual_meta_keys['rank_math_title'] = true;
28
  $multilingual_meta_keys['rank_math_description'] = true;
29
  $multilingual_meta_keys['rank_math_focus_keyword'] = true;
30
-
31
  return $multilingual_meta_keys;
32
  }
33
-
34
  }
35
 
36
  endif;
3
  * File: class-wpglobus-vendor-rank_math_seo-front.php
4
  *
5
  * @since 2.4.3
6
+ * @since 2.4.4 Add filters for title, description.
7
  *
8
  * @package WPGlobus\Builders\RankMathSEO.
9
  * @author Alex Gor(alexgff)
18
 
19
  public static function controller() {
20
  add_filter( 'wpglobus_multilingual_meta_keys', array( __CLASS__, 'filter__multilingual_meta_keys' ), 5 );
21
+
22
+ /**
23
+ * We need this filter when title is empty and use macro.
24
+ *
25
+ * @since 2.4.4
26
+ * @see seo-by-rank-math\includes\frontend\paper\class-paper.php
27
+ * @see seo-by-rank-math\includes\traits\class-hooker.php
28
+ */
29
+ add_filter( 'rank_math/frontend/title', array( __CLASS__, 'filter__frontend_title' ), 5 );
30
+
31
+ /**
32
+ * @since 2.4.4
33
+ * @see seo-by-rank-math\includes\frontend\paper\class-paper.php
34
+ * @see seo-by-rank-math\includes\traits\class-hooker.php
35
+ */
36
+ add_filter( 'rank_math/frontend/description', array( __CLASS__, 'filter__frontend_description' ), 5 );
37
  }
38
+
39
+ /**
40
+ * Filter the title.
41
+ * @since 2.4.4
42
+ *
43
+ * @param string $title The title being put out.
44
+ */
45
+ public static function filter__frontend_title( $title ) {
46
+
47
+ if ( WPGlobus_Core::has_translations($title) ) {
48
+ return WPGlobus_Core::extract_text($title);
49
+ }
50
+
51
+ return $title;
52
+ }
53
+
54
+ /**
55
+ * Filter the description.
56
+ * @since 2.4.4
57
+ *
58
+ * @param string $description The description sentence.
59
+ */
60
+ public static function filter__frontend_description( $description ) {
61
+
62
+ if ( WPGlobus_Core::has_translations($description) ) {
63
+ return WPGlobus_Core::extract_text($description);
64
+ }
65
+
66
+ return $description;
67
+ }
68
 
69
  /**
70
  * Specify meta keys where the meta data can be multilingual.
71
  */
72
  public static function filter__multilingual_meta_keys( $multilingual_meta_keys ) {
 
73
  $multilingual_meta_keys['rank_math_title'] = true;
74
  $multilingual_meta_keys['rank_math_description'] = true;
75
  $multilingual_meta_keys['rank_math_focus_keyword'] = true;
 
76
  return $multilingual_meta_keys;
77
  }
 
78
  }
79
 
80
  endif;
languages/wpglobus.pot CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2020 WPGlobus 2.4.3
2
- # This file is distributed under the same license as the WPGlobus 2.4.3 package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: WPGlobus 2.4.3\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
1
+ # Copyright (C) 2020 WPGlobus 2.4.4
2
+ # This file is distributed under the same license as the WPGlobus 2.4.4 package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: WPGlobus 2.4.4\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
readme.txt CHANGED
@@ -220,6 +220,10 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
220
 
221
  = 2.4.3 =
222
 
 
 
 
 
223
  * (Builders/RankMathSEO) Added `WordPress SEO Plugin – Rank Math` support (Beta stage).
224
  * (Core/Plugin Install) Added info box before add-ons list.
225
 
220
 
221
  = 2.4.3 =
222
 
223
+ * (Builders/RankMathSEO) Added filters for title and description on frontend.
224
+
225
+ = 2.4.3 =
226
+
227
  * (Builders/RankMathSEO) Added `WordPress SEO Plugin – Rank Math` support (Beta stage).
228
  * (Core/Plugin Install) Added info box before add-ons list.
229
 
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.4.3
19
  * Author: WPGlobus
20
  * Author URI: https://wpglobus.com/
21
  * Network: false
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
42
  exit;
43
  }
44
 
45
- define( 'WPGLOBUS_VERSION', '2.4.3' );
46
  define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
47
  define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
48
 
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.4.4
19
  * Author: WPGlobus
20
  * Author URI: https://wpglobus.com/
21
  * Network: false
42
  exit;
43
  }
44
 
45
+ define( 'WPGLOBUS_VERSION', '2.4.4' );
46
  define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
47
  define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
48