PluginProbe ʕ •ᴥ•ʔ
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution / 4.6.8
ShopEngine Elementor WooCommerce Builder Addon – All in One WooCommerce Solution v4.6.8
4.9.1 4.9.0 2.0.0 2.1.0 2.2.0 2.2.1 2.2.2 2.3.0 2.4.0 2.5.0 2.5.1 3.0.0 3.1.0 3.1.1 4.0.0 4.0.1 4.1.0 4.1.1 4.2.0 4.2.1 4.3.0 4.3.1 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.6.8 4.6.9 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.7.6 4.7.7 4.7.8 4.7.9 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.8.5 4.8.6 4.8.7 4.8.8 4.8.9 trunk 0.1.2-beta 0.1.3-beta 0.1.4-beta 1.0.0 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.5.0 1.5.1 1.6.0 1.6.1 1.7.0 1.8.0 1.8.1 1.9.0
shopengine / utils / elementor-data-map.php
shopengine / utils Last commit date
banner 2 years ago emailkit 1 year ago notice 2 years ago plugins 1 year ago pro-awareness 1 year ago stories 2 years ago controls-helper.php 4 years ago elementor-data-map.php 4 years ago global-helper.php 3 years ago helper.php 2 years ago notice.php 2 years ago shipping-calculation.php 3 years ago util.php 2 years ago
elementor-data-map.php
58 lines
1 <?php
2
3 namespace ShopEngine\Utils;
4
5 class Elementor_Data_Map {
6
7 private $_el = [];
8
9 public function get_elementor_data($post_id) {
10
11 $dt = get_post_meta($post_id, '_elementor_data', true);
12
13 return json_decode($dt);
14 }
15
16 public function get_widget_data($widget_name, $data = false, $post_id = null) {
17
18 if($data === false && !empty($post_id)) {
19
20 $data = $this->get_elementor_data($post_id);
21 }
22
23 if(!empty($data) && is_array($data)) {
24
25 $this->_el = [];
26
27 $this->search_el($data, $widget_name);
28
29 return $this->_el;
30 }
31
32 return [];
33 }
34
35 private function search_el($data, $name) {
36
37 if(!is_array($data)) {
38
39 return;
40 }
41
42 foreach($data as $k => $v) {
43
44 if(!empty($v->elements) && is_array($v->elements)) {
45
46 $this->search_el($v->elements, $name);
47
48 } else {
49
50 if($v->elType == 'widget' && $v->widgetType == $name) {
51
52 $this->_el[] = $v;
53 }
54 }
55 }
56 }
57 }
58