Elementor Essential Addons - Version 3.0.5

Version Description

  • 12/06/2019 =
  • Fixed: Global widget fatal error
  • Few minor bugfix and improvements
Download this release

Release Info

Developer re_enter_rupok
Plugin Icon 128x128 Elementor Essential Addons
Version 3.0.5
Comparing to
See all releases

Code changes from version 3.0.4 to 3.0.5

essential_adons_elementor.php CHANGED
@@ -4,7 +4,7 @@
4
  * Description: The ultimate elements library for Elementor page builder plugin for WordPress.
5
  * Plugin URI: https://essential-addons.com/elementor/
6
  * Author: WPDeveloper
7
- * Version: 3.0.4
8
  * Author URI: https://wpdeveloper.net/
9
  * Text Domain: essential-addons-elementor
10
  * Domain Path: /languages
@@ -23,7 +23,7 @@ define('EAEL_PLUGIN_FILE', __FILE__);
23
  define('EAEL_PLUGIN_BASENAME', plugin_basename(__FILE__));
24
  define('EAEL_PLUGIN_PATH', plugin_dir_path(__FILE__));
25
  define('EAEL_PLUGIN_URL', plugins_url('/', __FILE__));
26
- define('EAEL_PLUGIN_VERSION', '3.0.4');
27
  define('EAEL_ASSET_PATH', wp_upload_dir()['basedir'] . DIRECTORY_SEPARATOR . 'essential-addons-elementor');
28
  define('EAEL_ASSET_URL', wp_upload_dir()['baseurl'] . '/essential-addons-elementor');
29
 
4
  * Description: The ultimate elements library for Elementor page builder plugin for WordPress.
5
  * Plugin URI: https://essential-addons.com/elementor/
6
  * Author: WPDeveloper
7
+ * Version: 3.0.5
8
  * Author URI: https://wpdeveloper.net/
9
  * Text Domain: essential-addons-elementor
10
  * Domain Path: /languages
23
  define('EAEL_PLUGIN_BASENAME', plugin_basename(__FILE__));
24
  define('EAEL_PLUGIN_PATH', plugin_dir_path(__FILE__));
25
  define('EAEL_PLUGIN_URL', plugins_url('/', __FILE__));
26
+ define('EAEL_PLUGIN_VERSION', '3.0.5');
27
  define('EAEL_ASSET_PATH', wp_upload_dir()['basedir'] . DIRECTORY_SEPARATOR . 'essential-addons-elementor');
28
  define('EAEL_ASSET_URL', wp_upload_dir()['baseurl'] . '/essential-addons-elementor');
29
 
includes/Traits/Generator.php CHANGED
@@ -5,6 +5,8 @@ if (!defined('ABSPATH')) {
5
  exit;
6
  } // Exit if accessed directly
7
 
 
 
8
  trait Generator
9
  {
10
  /**
@@ -15,11 +17,12 @@ trait Generator
15
  public function collect_transient_elements($widget)
16
  {
17
  if($widget->get_name() === 'global') {
18
- $global_data = $widget->get_raw_data(false);
 
 
19
 
20
- if($global_data['templateID']) {
21
- $elements_data = json_decode(get_post_meta($global_data['templateID'], '_elementor_data', true));
22
- $this->transient_elements = array_merge($this->transient_elements, $this->collect_recursive_elements($elements_data));
23
  }
24
  } else {
25
  $this->transient_elements[] = $widget->get_name();
@@ -34,15 +37,11 @@ trait Generator
34
  public function collect_recursive_elements($elements) {
35
  $collections = [];
36
 
37
- foreach($elements as $element) {
38
- if($element->widgetType) {
39
- $collections[] = $element->widgetType;
40
- }
41
-
42
- if($element->elements) {
43
- $this->collect_recursive_elements($element->elements);
44
  }
45
- }
46
 
47
  return $collections;
48
  }
5
  exit;
6
  } // Exit if accessed directly
7
 
8
+ use \ReflectionClass;
9
+
10
  trait Generator
11
  {
12
  /**
17
  public function collect_transient_elements($widget)
18
  {
19
  if($widget->get_name() === 'global') {
20
+ $reflection = new ReflectionClass(get_class($widget));
21
+ $protected = $reflection->getProperty('template_data');
22
+ $protected->setAccessible(true);
23
 
24
+ if($global_data = $protected->getValue($widget)) {
25
+ $this->transient_elements = array_merge($this->transient_elements, $this->collect_recursive_elements($global_data['content']));
 
26
  }
27
  } else {
28
  $this->transient_elements[] = $widget->get_name();
37
  public function collect_recursive_elements($elements) {
38
  $collections = [];
39
 
40
+ array_walk_recursive($elements, function($val, $key) use (&$collections) {
41
+ if($key == 'widgetType') {
42
+ $collections[] = $val;
 
 
 
 
43
  }
44
+ });
45
 
46
  return $collections;
47
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: elementor, elements, addons, elementor addon, elementor widget, page build
4
  Requires at least: 4.0
5
  Tested up to: 5.2
6
  Requires PHP: 5.4
7
- Stable tag: 3.0.4
8
  License: GPLv3
9
  License URI: https://opensource.org/licenses/GPL-3.0
10
 
@@ -166,6 +166,10 @@ Your existing elements/content will work with premium version. So you won't lose
166
 
167
  == Changelog ==
168
 
 
 
 
 
169
  = 3.0.4 - 11/06/2019 =
170
  - Fixed: Global widget styles
171
  - Fixed: Filter Gallery grid class conflict
4
  Requires at least: 4.0
5
  Tested up to: 5.2
6
  Requires PHP: 5.4
7
+ Stable tag: 3.0.5
8
  License: GPLv3
9
  License URI: https://opensource.org/licenses/GPL-3.0
10
 
166
 
167
  == Changelog ==
168
 
169
+ = 3.0.5 - 12/06/2019 =
170
+ - Fixed: Global widget fatal error
171
+ - Few minor bugfix and improvements
172
+
173
  = 3.0.4 - 11/06/2019 =
174
  - Fixed: Global widget styles
175
  - Fixed: Filter Gallery grid class conflict