Version Description
- (Builders/Elementor) Added support for the Elementor Kit loading CSS.
Download this release
Release Info
Developer | tivnet |
Plugin | WPGlobus – Multilingual Everything! |
Version | 2.5.5 |
Comparing to | |
See all releases |
Code changes from version 2.5.4 to 2.5.5
- includes/builders/elementor/class-wpglobus-elementor-front.php +59 -2
- languages/wpglobus.pot +3 -3
- readme.txt +4 -0
- wpglobus.php +2 -2
includes/builders/elementor/class-wpglobus-elementor-front.php
CHANGED
@@ -10,6 +10,16 @@
|
|
10 |
* @see elementor\core\files\css\post.php
|
11 |
*/
|
12 |
use Elementor\Core\Files\CSS\Post as Post_CSS;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
if ( ! class_exists( 'WPGlobus_Elementor_Front' ) ) :
|
15 |
|
@@ -94,9 +104,11 @@ if ( ! class_exists( 'WPGlobus_Elementor_Front' ) ) :
|
|
94 |
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'on__enqueue_styles' ), 20 );
|
95 |
|
96 |
/**
|
97 |
-
* @
|
|
|
|
|
98 |
*/
|
99 |
-
|
100 |
|
101 |
/**
|
102 |
* @since 2.1.13
|
@@ -170,6 +182,51 @@ if ( ! class_exists( 'WPGlobus_Elementor_Front' ) ) :
|
|
170 |
|
171 |
return $template;
|
172 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
|
174 |
/**
|
175 |
* @since 2.1.15
|
10 |
* @see elementor\core\files\css\post.php
|
11 |
*/
|
12 |
use Elementor\Core\Files\CSS\Post as Post_CSS;
|
13 |
+
/**
|
14 |
+
* @since 2.5.5
|
15 |
+
* @see elementor\core\files\css\post-preview.php
|
16 |
+
*/
|
17 |
+
use Elementor\Core\Files\CSS\Post_Preview as Post_Preview;
|
18 |
+
/**
|
19 |
+
* @since 2.5.5
|
20 |
+
* @see elementor\core\kits\manager.php
|
21 |
+
*/
|
22 |
+
use Elementor\Core\Kits\Manager as Manager;
|
23 |
|
24 |
if ( ! class_exists( 'WPGlobus_Elementor_Front' ) ) :
|
25 |
|
104 |
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'on__enqueue_styles' ), 20 );
|
105 |
|
106 |
/**
|
107 |
+
* @since 2.5.5
|
108 |
+
* @see `do_action` in elementor\includes\frontend.php
|
109 |
+
* @see callback function name and using it in elementor\core\kits\manager.php
|
110 |
*/
|
111 |
+
add_action( 'elementor/frontend/after_enqueue_styles', array( __CLASS__, 'frontend_before_enqueue_styles' ), 0 );
|
112 |
|
113 |
/**
|
114 |
* @since 2.1.13
|
182 |
|
183 |
return $template;
|
184 |
}
|
185 |
+
|
186 |
+
/**
|
187 |
+
* @since 2.5.5
|
188 |
+
*/
|
189 |
+
public static function frontend_before_enqueue_styles() {
|
190 |
+
|
191 |
+
if ( WPGlobus::Config()->language == WPGlobus::Config()->default_language ) {
|
192 |
+
return;
|
193 |
+
}
|
194 |
+
|
195 |
+
if ( ! self::is_builder_support() ) {
|
196 |
+
return;
|
197 |
+
}
|
198 |
+
|
199 |
+
$manager = new Manager();
|
200 |
+
|
201 |
+
$kit = $manager->get_kit_for_frontend();
|
202 |
+
|
203 |
+
if ( $kit ) {
|
204 |
+
if ( $kit->is_autosave() ) {
|
205 |
+
$css_file = Post_Preview::create( $kit->get_id() );
|
206 |
+
} else {
|
207 |
+
$css_file = Post_CSS::create( $kit->get_id() );
|
208 |
+
}
|
209 |
+
|
210 |
+
$handle = 'elementor-post-' . $css_file->get_post_id() .'-' . WPGlobus::Config()->language;
|
211 |
+
|
212 |
+
$url = $css_file->get_url();
|
213 |
+
|
214 |
+
/**
|
215 |
+
* @since 2.5.5 @W.I.P `enqueue` doesn't work here.
|
216 |
+
* @see `frontend_before_enqueue_styles` in elementor\core\kits\manager.php.
|
217 |
+
*/
|
218 |
+
// $css_file->enqueue();
|
219 |
+
|
220 |
+
wp_register_style(
|
221 |
+
$handle,
|
222 |
+
$url,
|
223 |
+
array(),
|
224 |
+
'wpglobus-' . WPGLOBUS_VERSION
|
225 |
+
|
226 |
+
);
|
227 |
+
wp_enqueue_style($handle);
|
228 |
+
}
|
229 |
+
}
|
230 |
|
231 |
/**
|
232 |
* @since 2.1.15
|
languages/wpglobus.pot
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
# Copyright (C) 2020 WPGlobus 2.5.
|
2 |
-
# This file is distributed under the same license as the WPGlobus 2.5.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: WPGlobus 2.5.
|
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.5.5
|
2 |
+
# This file is distributed under the same license as the WPGlobus 2.5.5 package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: WPGlobus 2.5.5\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
@@ -217,6 +217,10 @@ WPGlobus Version 2 supports WordPress 5.x, with Gutenberg.
|
|
217 |
|
218 |
== Changelog ==
|
219 |
|
|
|
|
|
|
|
|
|
220 |
= 2.5.4 =
|
221 |
|
222 |
* (Core/Options) Handling `li_class` attribute for section.
|
217 |
|
218 |
== Changelog ==
|
219 |
|
220 |
+
= 2.5.5 =
|
221 |
+
|
222 |
+
* (Builders/Elementor) Added support for the Elementor Kit loading CSS.
|
223 |
+
|
224 |
= 2.5.4 =
|
225 |
|
226 |
* (Core/Options) Handling `li_class` attribute for section.
|
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.5.
|
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.5.
|
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.5.5
|
19 |
* Author: WPGlobus
|
20 |
* Author URI: https://wpglobus.com/
|
21 |
* Network: false
|
42 |
exit;
|
43 |
}
|
44 |
|
45 |
+
define( 'WPGLOBUS_VERSION', '2.5.5' );
|
46 |
define( 'WPGLOBUS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
|
47 |
define( 'WPGLOBUS_AJAX', 'wpglobus-ajax' );
|
48 |
|