Unlimited Elements For Elementor (Free Widgets, Addons, Templates) - Version 1.4.72

Version Description

Download this release

Release Info

Developer unitecms
Plugin Icon 128x128 Unlimited Elements For Elementor (Free Widgets, Addons, Templates)
Version 1.4.72
Comparing to
See all releases

Code changes from version 1.4.70 to 1.4.72

Files changed (34) hide show
  1. assets_libraries/filters/ue_filters.js +180 -0
  2. inc_php/framework/functions.class.php +39 -1
  3. inc_php/framework/settings_output.class.php +3 -0
  4. inc_php/unitecreator_dialog_param.class.php +40 -0
  5. inc_php/unitecreator_filters_process.class.php +73 -9
  6. inc_php/unitecreator_helper.class.php +1 -1
  7. inc_php/unitecreator_helperhtml.class.php +47 -0
  8. inc_php/unitecreator_output.class.php +33 -6
  9. inc_php/unitecreator_settings.class.php +22 -2
  10. inc_php/unitecreator_template_engine.class.php +72 -23
  11. includes.php +1 -1
  12. js/unitecreator_admin.js +6 -1
  13. js/unitecreator_includes.js +60 -1
  14. provider/core/plugins/unlimited_elements/elementor/assets/uc_editor_admin.js +13 -4
  15. provider/core/plugins/unlimited_elements/elementor/elementor_dynamic_visibility.class.php +192 -0
  16. provider/core/plugins/unlimited_elements/elementor/elementor_integrate.class.php +52 -1
  17. provider/core/plugins/unlimited_elements/elementor/elementor_widget.class.php +41 -20
  18. provider/core/plugins/unlimited_elements/elementor/pagination.class.php +37 -92
  19. provider/core/plugins/unlimited_elements/plugin.php +1 -0
  20. provider/core/plugins/unlimited_elements/settings/general_settings_el.xml +8 -0
  21. provider/core/plugins/unlimited_elements/views/settingselementor.php +4 -0
  22. provider/functions_wordpress.class.php +62 -9
  23. provider/provider_dialog_param.class.php +5 -1
  24. provider/provider_functions.class.php +1 -1
  25. provider/provider_helper.class.php +1 -1
  26. provider/provider_params_processor.class.php +213 -8
  27. provider/provider_settings.class.php +73 -3
  28. provider/provider_template_engine.class.php +0 -1
  29. provider/woocommerce_integrate.class.php +12 -2
  30. readme.txt +19 -0
  31. release_log.txt +20 -0
  32. unlimited_elements.php +3 -3
  33. views/objects/addon_view.class.php +10 -0
  34. views/objects/addon_view_childparams.class.php +19 -4
assets_libraries/filters/ue_filters.js ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ function UEListingFilters(){
3
+
4
+ var g_objFilters, g_objListing, g_listingData, g_urlBase;
5
+
6
+ var g_types = {
7
+ CHECKBOX:"checkbox"
8
+ };
9
+
10
+
11
+ /**
12
+ * console log some string
13
+ */
14
+ function trace(str){
15
+ console.log(str);
16
+ }
17
+
18
+ /**
19
+ * get object property
20
+ */
21
+ function getVal(obj, name, defaultValue){
22
+
23
+ if(!defaultValue)
24
+ var defaultValue = "";
25
+
26
+ var val = "";
27
+
28
+ if(!obj || typeof obj != "object")
29
+ val = defaultValue;
30
+ else if(obj.hasOwnProperty(name) == false){
31
+ val = defaultValue;
32
+ }else{
33
+ val = obj[name];
34
+ }
35
+
36
+ return(val);
37
+ }
38
+
39
+
40
+ /**
41
+ * get filter type
42
+ */
43
+ function getFilterType(objFilter){
44
+
45
+ if(objFilter.is(":checkbox"))
46
+ return(g_types.CHECKBOX);
47
+
48
+ return(null);
49
+ }
50
+
51
+
52
+ /**
53
+ * clear filter
54
+ */
55
+ function clearFilter(objFilter){
56
+
57
+ var type = getFilterType(objFilter);
58
+
59
+ switch(type){
60
+ case g_types.CHECKBOX:
61
+ objFilter.prop("checked", false);
62
+ break;
63
+ }
64
+
65
+ }
66
+
67
+
68
+ /**
69
+ * clear filters
70
+ */
71
+ function clearFilters(){
72
+
73
+ jQuery.each(g_objFilters,function(index, filter){
74
+ var objFilter = jQuery(filter);
75
+ clearFilter(objFilter);
76
+ });
77
+
78
+ }
79
+
80
+ /**
81
+ * build url query from the filters
82
+ */
83
+ function buildUrlQuery(){
84
+
85
+ //product_cat
86
+ //shoes, dress
87
+
88
+ //product_cat~shoes,dress;cat~123,43;
89
+ //ucfilters=product_cat~shoes,dress;cat~123,43;
90
+
91
+ $query = "query";
92
+
93
+ return($query);
94
+ }
95
+
96
+ /**
97
+ * on filters change
98
+ */
99
+ function onFiltersChange(){
100
+
101
+ var query = buildUrlQuery();
102
+
103
+ trace(query);
104
+
105
+ }
106
+
107
+
108
+ /**
109
+ * init events
110
+ */
111
+ function initEvents(){
112
+
113
+ var objCheckboxes = g_objFilters.filter("input[type=checkbox]");
114
+
115
+ objCheckboxes.on("click", onFiltersChange);
116
+
117
+ }
118
+
119
+
120
+ /**
121
+ * init
122
+ */
123
+ function init(){
124
+
125
+ g_objFilters = jQuery(".uc-listing-filter");
126
+
127
+ if(g_objFilters.length == 0){
128
+ return(false);
129
+ }
130
+
131
+ //init the listing
132
+
133
+ g_objListing = jQuery(".uc-filterable-listing");
134
+
135
+ if(g_objListing.length == 0){
136
+ trace("fitlers not loaded, no listing available on page");
137
+ return(false);
138
+ }
139
+
140
+ //get first listing
141
+ if(g_objListing.length > 1)
142
+ g_objListing = jQuery(g_objListing[0]);
143
+
144
+ g_listingData = g_objListing.data("ucfilters");
145
+ if(!g_listingData)
146
+ g_listingData = {};
147
+
148
+ g_urlBase = getVal(g_listingData, "urlbase");
149
+
150
+ if(!g_urlBase){
151
+ trace("ue filters error - base url not inited");
152
+ return(false);
153
+ }
154
+
155
+ clearFilters();
156
+
157
+ initEvents();
158
+
159
+ }
160
+
161
+
162
+ /**
163
+ * init the class
164
+ */
165
+ function construct(){
166
+
167
+ if(!jQuery){
168
+ trace("Filters not loaded, jQuery not loaded");
169
+ return(false);
170
+ }
171
+
172
+ jQuery("document").ready(init);
173
+
174
+ }
175
+
176
+ construct();
177
+ }
178
+
179
+ new UEListingFilters();
180
+
inc_php/framework/functions.class.php CHANGED
@@ -1347,6 +1347,23 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1347
  return($url);
1348
  }
1349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1350
  public static function z___________VALIDATIONS_________(){}
1351
 
1352
  /**
@@ -1535,6 +1552,26 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1535
 
1536
  }
1537
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1538
 
1539
  /**
1540
  * validate that the value is alphanumeric
@@ -2114,9 +2151,10 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
2114
  }
2115
 
2116
 
2117
-
2118
  public static function z___________OTHERS__________(){}
2119
 
 
 
2120
  /**
2121
  * encode svg to bg image url
2122
  */
1347
  return($url);
1348
  }
1349
 
1350
+ /**
1351
+ * get base url from any url
1352
+ */
1353
+ public static function getBaseUrl($url){
1354
+
1355
+ $arrUrl = parse_url($url);
1356
+
1357
+ $scheme = UniteFunctionsUC::getVal($arrUrl, "scheme","http");
1358
+ $host = UniteFunctionsUC::getVal($arrUrl, "host");
1359
+ $path = UniteFunctionsUC::getVal($arrUrl, "path");
1360
+
1361
+ $url = "{$scheme}://{$host}{$path}";
1362
+
1363
+ return($url);
1364
+ }
1365
+
1366
+
1367
  public static function z___________VALIDATIONS_________(){}
1368
 
1369
  /**
1552
 
1553
  }
1554
 
1555
+ /**
1556
+ * return if the array is id's array
1557
+ */
1558
+ public static function isValidIDsArray($arr){
1559
+
1560
+ if(is_array($arr) == false)
1561
+ return(false);
1562
+
1563
+ if(empty($arr))
1564
+ return(true);
1565
+
1566
+ foreach($arr as $key=>$value){
1567
+
1568
+ if(is_numeric($key) == false || is_numeric($value) == false)
1569
+ return(false);
1570
+ }
1571
+
1572
+ return(true);
1573
+ }
1574
+
1575
 
1576
  /**
1577
  * validate that the value is alphanumeric
2151
  }
2152
 
2153
 
 
2154
  public static function z___________OTHERS__________(){}
2155
 
2156
+
2157
+
2158
  /**
2159
  * encode svg to bg image url
2160
  */
inc_php/framework/settings_output.class.php CHANGED
@@ -192,6 +192,9 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
192
  //set hidden
193
  $isHidden = isset($setting["hidden"]);
194
 
 
 
 
195
  //operate saps
196
  if($this->showSaps == true && $this->sapsType == self::SAPS_TYPE_INLINE){
197
 
192
  //set hidden
193
  $isHidden = isset($setting["hidden"]);
194
 
195
+ if($isHidden == true && $setting["hidden"] === "false")
196
+ $isHidden = false;
197
+
198
  //operate saps
199
  if($this->showSaps == true && $this->sapsType == self::SAPS_TYPE_INLINE){
200
 
inc_php/unitecreator_dialog_param.class.php CHANGED
@@ -27,6 +27,7 @@ class UniteCreatorDialogParamWork{
27
  const PARAM_POSTS_LIST = "uc_posts_list";
28
  const PARAM_POST_TERMS = "uc_post_terms";
29
  const PARAM_WOO_CATS = "uc_woo_categories";
 
30
 
31
  const PARAM_USERS = "uc_users";
32
  const PARAM_TEMPLATE = "uc_template";
@@ -151,6 +152,7 @@ class UniteCreatorDialogParamWork{
151
  $this->arrProParams[self::PARAM_BACKGROUND] = true;
152
  $this->arrProParams[self::PARAM_BORDER] = true;
153
  $this->arrProParams[self::PARAM_SLIDER] = true;
 
154
 
155
  }
156
 
@@ -183,6 +185,8 @@ class UniteCreatorDialogParamWork{
183
  $this->addParam(self::PARAM_POSTS_LIST, esc_html__("Posts List", "unlimited-elements-for-elementor"));
184
  $this->addParam(self::PARAM_POST_TERMS, esc_html__("Posts Terms", "unlimited-elements-for-elementor"));
185
  $this->addParam(self::PARAM_WOO_CATS, esc_html__("WooCommerce Categories", "unlimited-elements-for-elementor"));
 
 
186
  $this->addParam(self::PARAM_USERS, esc_html__("Users List", "unlimited-elements-for-elementor"));
187
  $this->addParam(self::PARAM_TEMPLATE, esc_html__("Elementor Template", "unlimited-elements-for-elementor"));
188
  $this->addParam(self::PARAM_MENU, esc_html__("Menu", "unlimited-elements-for-elementor"));
@@ -727,8 +731,14 @@ class UniteCreatorDialogParamWork{
727
  <?php
728
  $this->putCheckbox("use_custom_fields", __("Use Custom Fields", "unlimited-elements-for-elementor"));
729
  ?>
 
 
 
 
 
730
 
731
  <br><br>
 
732
  <hr>
733
 
734
  <?php
@@ -745,6 +755,15 @@ class UniteCreatorDialogParamWork{
745
 
746
  }
747
 
 
 
 
 
 
 
 
 
 
748
 
749
  /**
750
  * put post list param
@@ -793,7 +812,25 @@ class UniteCreatorDialogParamWork{
793
  $this->putCheckbox("show_image_sizes", __("Show Image Sizes Select", "unlimited-elements-for-elementor"));
794
  ?>
795
 
 
 
 
 
 
 
 
 
 
796
  <hr>
 
 
 
 
 
 
 
 
 
797
  <?php
798
 
799
  $this->putStyleCheckbox();
@@ -1199,6 +1236,9 @@ class UniteCreatorDialogParamWork{
1199
  case self::PARAM_WOO_CATS:
1200
  $this->putWooCatsParam();
1201
  break;
 
 
 
1202
  case self::PARAM_FORM:
1203
  $this->putFormParam();
1204
  break;
27
  const PARAM_POSTS_LIST = "uc_posts_list";
28
  const PARAM_POST_TERMS = "uc_post_terms";
29
  const PARAM_WOO_CATS = "uc_woo_categories";
30
+ const PARAM_LISTING = "uc_listing";
31
 
32
  const PARAM_USERS = "uc_users";
33
  const PARAM_TEMPLATE = "uc_template";
152
  $this->arrProParams[self::PARAM_BACKGROUND] = true;
153
  $this->arrProParams[self::PARAM_BORDER] = true;
154
  $this->arrProParams[self::PARAM_SLIDER] = true;
155
+ $this->arrProParams[self::PARAM_LISTING] = true;
156
 
157
  }
158
 
185
  $this->addParam(self::PARAM_POSTS_LIST, esc_html__("Posts List", "unlimited-elements-for-elementor"));
186
  $this->addParam(self::PARAM_POST_TERMS, esc_html__("Posts Terms", "unlimited-elements-for-elementor"));
187
  $this->addParam(self::PARAM_WOO_CATS, esc_html__("WooCommerce Categories", "unlimited-elements-for-elementor"));
188
+ $this->addParam(self::PARAM_LISTING, esc_html__("Listing", "unlimited-elements-for-elementor"));
189
+
190
  $this->addParam(self::PARAM_USERS, esc_html__("Users List", "unlimited-elements-for-elementor"));
191
  $this->addParam(self::PARAM_TEMPLATE, esc_html__("Elementor Template", "unlimited-elements-for-elementor"));
192
  $this->addParam(self::PARAM_MENU, esc_html__("Menu", "unlimited-elements-for-elementor"));
731
  <?php
732
  $this->putCheckbox("use_custom_fields", __("Use Custom Fields", "unlimited-elements-for-elementor"));
733
  ?>
734
+ <div class="vert_sap20"></div>
735
+
736
+ <?php
737
+ $this->putCheckbox("for_woocommerce", __("For WooCommerce Terms", "unlimited-elements-for-elementor"));
738
+ ?>
739
 
740
  <br><br>
741
+
742
  <hr>
743
 
744
  <?php
755
 
756
  }
757
 
758
+ /**
759
+ * put listing param
760
+ */
761
+ private function putListingParam(){
762
+
763
+ esc_html_e("Put listing attributes here", "unlimited-elements-for-elementor");
764
+
765
+ }
766
+
767
 
768
  /**
769
  * put post list param
812
  $this->putCheckbox("show_image_sizes", __("Show Image Sizes Select", "unlimited-elements-for-elementor"));
813
  ?>
814
 
815
+ <?php if(GlobalsUC::$inDev == true):?>
816
+ <div class="vert_sap10"></div>
817
+
818
+ <?php
819
+ $this->putCheckbox("is_filterable", __("Enable Filterable Options", "unlimited-elements-for-elementor"));
820
+ ?>
821
+ <?php endif?>
822
+
823
+ <div class="vert_sap10"></div>
824
  <hr>
825
+ <div class="vert_sap10"></div>
826
+
827
+ <?php
828
+ $this->putCheckbox("use_for_listing", __("Use For Listing Template", "unlimited-elements-for-elementor"));
829
+ ?>
830
+ <div class="vert_sap10"></div>
831
+ <hr>
832
+
833
+ <div class="vert_sap10"></div>
834
  <?php
835
 
836
  $this->putStyleCheckbox();
1236
  case self::PARAM_WOO_CATS:
1237
  $this->putWooCatsParam();
1238
  break;
1239
+ case self::PARAM_LISTING:
1240
+ $this->putListingParam();
1241
+ break;
1242
  case self::PARAM_FORM:
1243
  $this->putFormParam();
1244
  break;
inc_php/unitecreator_filters_process.class.php CHANGED
@@ -10,16 +10,8 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
10
  class UniteCreatorFiltersProcess{
11
 
12
  private static $filters = null;
 
13
 
14
- /**
15
- * put current widget data
16
- */
17
- public function putCurrentWidgetData(){
18
-
19
- //UniteFunctionsUC::showTrace();
20
- //dmp("put widget data");
21
-
22
- }
23
 
24
  /**
25
  * get request array
@@ -314,6 +306,78 @@ jQuery(document).ready(function(){
314
 
315
  }
316
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
  /**
318
  * init elementor ajax
319
  */
10
  class UniteCreatorFiltersProcess{
11
 
12
  private static $filters = null;
13
+ private static $isFilesAdded = false;
14
 
 
 
 
 
 
 
 
 
 
15
 
16
  /**
17
  * get request array
306
 
307
  }
308
 
309
+
310
+ /**
311
+ * include the filters js files
312
+ */
313
+ private function includeJSFiles(){
314
+
315
+ if(self::$isFilesAdded == true)
316
+ return(false);
317
+
318
+ $urlFiltersJS = GlobalsUC::$url_assets_libraries."filters/ue_filters.js";
319
+ HelperUC::addScriptAbsoluteUrl($urlFiltersJS, "ue_filters");
320
+
321
+
322
+ self::$isFilesAdded = true;
323
+ }
324
+
325
+
326
+ /**
327
+ * put checkbox filters test
328
+ */
329
+ public function putCheckboxFiltersTest($data){
330
+
331
+ $this->includeJSFiles();
332
+
333
+ $taxonomy = UniteFunctionsUC::getVal($data, "taxonomy", "category");
334
+
335
+ $terms = get_terms($taxonomy);
336
+
337
+ if(empty($terms))
338
+ return(false);
339
+
340
+ $html = "";
341
+ foreach($terms as $term){
342
+
343
+ $arrTerm = (array)$term;
344
+
345
+ $termID = UniteFunctionsUC::getVal($arrTerm, "term_id");
346
+ $name = UniteFunctionsUC::getVal($arrTerm, "name");
347
+ $slug = UniteFunctionsUC::getVal($arrTerm, "slug");
348
+ $count = UniteFunctionsUC::getVal($arrTerm, "count");
349
+
350
+ $slug = htmlspecialchars($slug);
351
+
352
+ $checkboxName = "ucfilter_term__{$taxonomy}--{$slug}";
353
+
354
+ $html .= "<label class='ucfilters-label-checkbox'>$name ($count)<input type='checkbox' class='uc-listing-filter uc-filter-checkbox' name='{$checkboxName}' data-type='term' data-taxonomy='{$taxonomy}' data-term='{$slug}'></label>";
355
+ }
356
+
357
+ echo $html;
358
+ }
359
+
360
+ /**
361
+ * add widget variables
362
+ * uc_listing_addclass, uc_listing_attributes
363
+ *
364
+ */
365
+ public function addWidgetFilterableVariables($data){
366
+
367
+ $urlBase = UniteFunctionsUC::getBaseUrl(GlobalsUC::$current_page_url);
368
+
369
+ $arrData = array();
370
+ $arrData["urlbase"] = $urlBase;
371
+
372
+
373
+ $strAttributes = UniteFunctionsUC::jsonEncodeForHtmlData($arrData,"ucfilters");
374
+
375
+ $data["uc_listing_attributes"] = $strAttributes;
376
+ $data["uc_listing_addclass"] = " uc-filterable-listing";
377
+
378
+ return($data);
379
+ }
380
+
381
  /**
382
  * init elementor ajax
383
  */
inc_php/unitecreator_helper.class.php CHANGED
@@ -1298,7 +1298,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1298
  $handle = GlobalsUC::PLUGIN_NAME."-".$scriptName;
1299
 
1300
  $url = GlobalsUC::$urlPlugin .$folder."/".$scriptName.".js";
1301
-
1302
  UniteProviderFunctionsUC::addScript($handle, $url, $inFooter);
1303
  }
1304
 
1298
  $handle = GlobalsUC::PLUGIN_NAME."-".$scriptName;
1299
 
1300
  $url = GlobalsUC::$urlPlugin .$folder."/".$scriptName.".js";
1301
+
1302
  UniteProviderFunctionsUC::addScript($handle, $url, $inFooter);
1303
  }
1304
 
inc_php/unitecreator_helperhtml.class.php CHANGED
@@ -835,6 +835,53 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
835
  return($output);
836
  }
837
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
838
 
839
 
840
  } //end class
835
  return($output);
836
  }
837
 
838
+ /**
839
+ * get rating array from rating number. used to help to draw stars
840
+ */
841
+ public static function getRatingArray($rating){
842
+
843
+ $arrRating = array();
844
+
845
+ $empty = array(
846
+ "type"=>"empty",
847
+ "class"=>"far fa-star",
848
+ );
849
+ $full = array(
850
+ "type"=>"full",
851
+ "class"=>"fas fa-star",
852
+ );
853
+ $half = array(
854
+ "type"=>"half",
855
+ "class"=>"fas fa-star-half-alt",
856
+ );
857
+
858
+
859
+ for($i=1;$i<=5;$i++){
860
+
861
+ $low = floor($rating);
862
+
863
+ if($rating == 0){
864
+ $arrRating[] = $empty;
865
+ continue;
866
+ }
867
+
868
+ if($rating < $i && $rating > ($i-1)){
869
+ $arrRating[] = $half;
870
+ continue;
871
+ }
872
+
873
+
874
+ if($i <= $low){
875
+ $arrRating[] = $full;
876
+ continue;
877
+ }
878
+
879
+ $arrRating[] = $empty;
880
+ }
881
+
882
+
883
+ return($arrRating);
884
+ }
885
 
886
 
887
  } //end class
inc_php/unitecreator_output.class.php CHANGED
@@ -190,7 +190,6 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
190
 
191
  foreach($arrIncludes as $handle => $include){
192
 
193
-
194
  $urlInclude = $include;
195
 
196
  if(is_array($include)){
@@ -209,13 +208,29 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
209
 
210
  $urlInclude = HelperUC::urlToSSLCheck($urlInclude);
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
  $arrIncludeNew = array();
213
  $arrIncludeNew["url"] = $urlInclude;
214
  $arrIncludeNew["type"] = $type;
215
-
216
  if(!empty($handle))
217
  $arrIncludeNew["handle"] = $handle;
218
 
 
 
 
219
  $arrIncludesProcessed[] = $arrIncludeNew;
220
 
221
  }
@@ -264,6 +279,7 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
264
  $arrLibJs = $arrLibraries["js"];
265
 
266
  $arrIncludesJS = $this->addon->getJSIncludes();
 
267
  $arrIncludesJS = array_merge($arrLibJs, $arrIncludesJS);
268
  $arrIncludesJS = $this->processIncludesList($arrIncludesJS, "js");
269
 
@@ -364,6 +380,8 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
364
  $type = $include["type"];
365
  $url = $include["url"];
366
  $handle = UniteFunctionsUC::getVal($include, "handle");
 
 
367
 
368
  if(empty($handle))
369
  $handle = HelperUC::getUrlHandle($url, $addonName);
@@ -373,11 +391,16 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
373
  continue;
374
  }
375
  $this->cacheInclude($url, $handle, $type);
 
 
 
 
 
376
 
377
  switch($type){
378
  case "js":
379
 
380
- UniteProviderFunctionsUC::addScript($handle, $url, false, $arrDep);
381
  break;
382
  case "css":
383
  UniteProviderFunctionsUC::addStyle($handle, $url);
@@ -1295,9 +1318,13 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
1295
 
1296
  $num = $index+1;
1297
 
1298
- $text = "{$num}. <b>$title</b> (<i style='font-size:13px;'>$alias, $id</i>)";
 
 
 
 
1299
 
1300
- dmp($text);
1301
 
1302
  if($isShowMeta == false)
1303
  continue;
@@ -1320,7 +1347,7 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
1320
  */
1321
  private function putDebugDataHtml($arrData, $arrItemData){
1322
 
1323
- echo "<div style='font-size:16px;color:black;text-decoration:none;'>";
1324
 
1325
  dmp("<b>Widget Debug Data</b> (turned on by setting in widget advanced section)<br>");
1326
 
190
 
191
  foreach($arrIncludes as $handle => $include){
192
 
 
193
  $urlInclude = $include;
194
 
195
  if(is_array($include)){
208
 
209
  $urlInclude = HelperUC::urlToSSLCheck($urlInclude);
210
 
211
+ $deps = array();
212
+
213
+ //process params
214
+ $params = UniteFunctionsUC::getVal($include, "params");
215
+ if(!empty($params)){
216
+ $includeAfterFrontend = UniteFunctionsUC::getVal($params, "include_after_elementor_frontend");
217
+ $includeAfterFrontend = UniteFunctionsUC::strToBool($includeAfterFrontend);
218
+
219
+ if($includeAfterFrontend == true)
220
+ $deps[]= "elementor-frontend";
221
+ }
222
+
223
+
224
  $arrIncludeNew = array();
225
  $arrIncludeNew["url"] = $urlInclude;
226
  $arrIncludeNew["type"] = $type;
227
+
228
  if(!empty($handle))
229
  $arrIncludeNew["handle"] = $handle;
230
 
231
+ if(!empty($deps))
232
+ $arrIncludeNew["deps"] = $deps;
233
+
234
  $arrIncludesProcessed[] = $arrIncludeNew;
235
 
236
  }
279
  $arrLibJs = $arrLibraries["js"];
280
 
281
  $arrIncludesJS = $this->addon->getJSIncludes();
282
+
283
  $arrIncludesJS = array_merge($arrLibJs, $arrIncludesJS);
284
  $arrIncludesJS = $this->processIncludesList($arrIncludesJS, "js");
285
 
380
  $type = $include["type"];
381
  $url = $include["url"];
382
  $handle = UniteFunctionsUC::getVal($include, "handle");
383
+ $deps = UniteFunctionsUC::getVal($include, "deps");
384
+
385
 
386
  if(empty($handle))
387
  $handle = HelperUC::getUrlHandle($url, $addonName);
391
  continue;
392
  }
393
  $this->cacheInclude($url, $handle, $type);
394
+
395
+ $arrIncludeDep = $arrDep;
396
+
397
+ if(!empty($deps))
398
+ $arrIncludeDep = array_merge($arrIncludeDep, $deps);
399
 
400
  switch($type){
401
  case "js":
402
 
403
+ UniteProviderFunctionsUC::addScript($handle, $url, false, $arrIncludeDep);
404
  break;
405
  case "css":
406
  UniteProviderFunctionsUC::addStyle($handle, $url);
1318
 
1319
  $num = $index+1;
1320
 
1321
+ $post = get_post($id);
1322
+ $arrTermsNames = UniteFunctionsWPUC::getPostTermsTitles($post);
1323
+ $strTerms = implode(",", $arrTermsNames);
1324
+
1325
+ $text = "{$num}. <b>$title</b> (<i style='font-size:13px;'>$alias, $id | $strTerms </i>)";
1326
 
1327
+ dmp($text);
1328
 
1329
  if($isShowMeta == false)
1330
  continue;
1347
  */
1348
  private function putDebugDataHtml($arrData, $arrItemData){
1349
 
1350
+ echo "<div style='font-size:16px;color:black;text-decoration:none;background-color:white;'>";
1351
 
1352
  dmp("<b>Widget Debug Data</b> (turned on by setting in widget advanced section)<br>");
1353
 
inc_php/unitecreator_settings.class.php CHANGED
@@ -218,7 +218,15 @@ class UniteCreatorSettingsWork extends UniteSettingsAdvancedUC{
218
  dmp("addPostsListPicker - function for override");
219
  exit();
220
  }
221
-
 
 
 
 
 
 
 
 
222
 
223
  /**
224
  * add post terms settings
@@ -484,6 +492,7 @@ class UniteCreatorSettingsWork extends UniteSettingsAdvancedUC{
484
  case UniteCreatorDialogParam::PARAM_WOO_CATS:
485
  case UniteCreatorDialogParam::PARAM_USERS:
486
  case UniteCreatorDialogParam::PARAM_TEMPLATE:
 
487
 
488
  return(true);
489
  break;
@@ -696,11 +705,22 @@ class UniteCreatorSettingsWork extends UniteSettingsAdvancedUC{
696
  $this->addPostsListPicker($name,$value,$title,$extra);
697
  break;
698
  case UniteCreatorDialogParam::PARAM_POST_TERMS:
 
 
 
699
  $this->addPostTermsPicker($name,$value,$title,$extra);
700
  break;
701
  case UniteCreatorDialogParam::PARAM_WOO_CATS:
702
  $this->addWooCatsPicker($name,$value,$title,$extra);
703
- break;
 
 
 
 
 
 
 
 
704
  case UniteCreatorDialogParam::PARAM_USERS:
705
  $this->addUsersPicker($name,$value,$title,$extra);
706
  break;
218
  dmp("addPostsListPicker - function for override");
219
  exit();
220
  }
221
+
222
+ /**
223
+ * add listing picker, function for override
224
+ */
225
+ protected function addListingPicker($name,$value,$title,$extra){
226
+
227
+ dmp("addListingPicker - function for override");
228
+ exit();
229
+ }
230
 
231
  /**
232
  * add post terms settings
492
  case UniteCreatorDialogParam::PARAM_WOO_CATS:
493
  case UniteCreatorDialogParam::PARAM_USERS:
494
  case UniteCreatorDialogParam::PARAM_TEMPLATE:
495
+ case UniteCreatorDialogParam::PARAM_LISTING:
496
 
497
  return(true);
498
  break;
705
  $this->addPostsListPicker($name,$value,$title,$extra);
706
  break;
707
  case UniteCreatorDialogParam::PARAM_POST_TERMS:
708
+
709
+ $extra["for_woocommerce"] = UniteFunctionsUC::getVal($param, "for_woocommerce");
710
+
711
  $this->addPostTermsPicker($name,$value,$title,$extra);
712
  break;
713
  case UniteCreatorDialogParam::PARAM_WOO_CATS:
714
  $this->addWooCatsPicker($name,$value,$title,$extra);
715
+ break;
716
+ case UniteCreatorDialogParam::PARAM_LISTING:
717
+
718
+ $this->addListingPicker($name,$value,$title,$extra);
719
+
720
+ break;
721
+ case UniteCreatorDialogParam::PARAM_WOO_CATS:
722
+ $this->addWooCatsPicker($name,$value,$title,$extra);
723
+ break;
724
  case UniteCreatorDialogParam::PARAM_USERS:
725
  $this->addUsersPicker($name,$value,$title,$extra);
726
  break;
inc_php/unitecreator_template_engine.class.php CHANGED
@@ -489,21 +489,6 @@ class UniteCreatorTemplateEngineWork{
489
  //function for override
490
  }
491
 
492
- /**
493
- * put woo commerce filter
494
- */
495
- public function putWooFilter($filterName = null){
496
-
497
- if(empty($filterName))
498
- UniteFunctionsUC::throwError("putWooFilter error: No Filter provided");
499
-
500
- $isActive = UniteCreatorWooIntegrate::isWooActive();
501
-
502
- $objWooIntegrate = UniteCreatorWooIntegrate::getInstance();
503
-
504
- $objWooIntegrate->putHtmlFilter($filterName);
505
-
506
- }
507
 
508
  /**
509
  * get woo child product
@@ -619,6 +604,52 @@ class UniteCreatorTemplateEngineWork{
619
  $objPagination->putPaginationWidgetHtml($args);
620
  }
621
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
  /**
623
  * number format for woocommerce
624
  */
@@ -635,6 +666,20 @@ class UniteCreatorTemplateEngineWork{
635
 
636
  return($price);
637
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
638
 
639
  /**
640
  * get listing item data
@@ -698,16 +743,19 @@ class UniteCreatorTemplateEngineWork{
698
  /**
699
  * put test html
700
  */
701
- public function putTestHTML($type = null){
702
 
703
  $objFilters = new UniteCreatorFiltersProcess();
 
704
 
705
  switch($type){
706
- case "widget_data":
707
- $objFilters->putCurrentWidgetData();
 
 
708
  break;
709
  default:
710
- $objFilters->putFiltersTabs();
711
  break;
712
  }
713
 
@@ -746,6 +794,7 @@ class UniteCreatorTemplateEngineWork{
746
  $getPostTags = new Twig_SimpleFunction('getPostTags', array($this,"getPostTags"));
747
  $getPostData = new Twig_SimpleFunction('getPostData', array($this,"getPostData"));
748
  $putPagination = new Twig_SimpleFunction('putPagination', array($this,"putPagination"));
 
749
 
750
  $putPostImageAttributes = new Twig_SimpleFunction('putPostImageAttributes', array($this,"putPostImageAttributes"));
751
 
@@ -760,9 +809,7 @@ class UniteCreatorTemplateEngineWork{
760
  $getPostTerms = new Twig_SimpleFunction('getPostTerms', array($this,"getPostTerms"));
761
  $getPostAuthor = new Twig_SimpleFunction('getPostAuthor', array($this,"getPostAuthor"));
762
  $getUserData = new Twig_SimpleFunction('getUserData', array($this,"getUserData"));
763
- $putWooFilter = new Twig_SimpleFunction('putWooFilter', array($this,"putWooFilter"));
764
  $getWooChildProducts = new Twig_SimpleFunction('getWooChildProducts', array($this,"getWooChildProducts"));
765
-
766
  $getListingItemData = new Twig_SimpleFunction('getListingItemData', array($this,"getListingItemData"));
767
 
768
  $printTermCustomFields = new Twig_SimpleFunction('printTermCustomFields', array($this,"printTermCustomFields"));
@@ -773,7 +820,8 @@ class UniteCreatorTemplateEngineWork{
773
  $filterWPAutop = new Twig_SimpleFilter("wpautop", array($this, "filterWPAutop"));
774
  $filterUCDate = new Twig_SimpleFilter("ucdate", array($this, "filterUCDate"));
775
  $filterPriceNumberFormat = new Twig_SimpleFilter("price_number_format", array($this, "filterPriceNumberFormat"));
776
-
 
777
  $putTestHtml = new Twig_SimpleFunction('putTestHTML', array($this,"putTestHTML"));
778
 
779
 
@@ -808,11 +856,11 @@ class UniteCreatorTemplateEngineWork{
808
  $this->twig->addFunction($printJsonVar);
809
  $this->twig->addFunction($printJsonHtmlData);
810
  $this->twig->addFunction($putPagination);
 
811
 
812
  $this->twig->addFunction($getPostTerms);
813
  $this->twig->addFunction($getPostAuthor);
814
  $this->twig->addFunction($getUserData);
815
- $this->twig->addFunction($putWooFilter);
816
  $this->twig->addFunction($getWooChildProducts);
817
  $this->twig->addFunction($getTermCustomFields);
818
  $this->twig->addFunction($putItemsJsonFunction);
@@ -828,6 +876,7 @@ class UniteCreatorTemplateEngineWork{
828
  $this->twig->addFilter($filterWPAutop);
829
  $this->twig->addFilter($filterUCDate);
830
  $this->twig->addFilter($filterPriceNumberFormat);
 
831
 
832
 
833
  //pro functions
489
  //function for override
490
  }
491
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492
 
493
  /**
494
  * get woo child product
604
  $objPagination->putPaginationWidgetHtml($args);
605
  }
606
 
607
+
608
+ /**
609
+ * put listing template
610
+ */
611
+ /*
612
+ public function putListingTemplate_posts($paramName, $templateID){
613
+
614
+ global $wp_query;
615
+
616
+ $originalPost = $GLOBALS['post'];
617
+
618
+ //backup the original querified object
619
+ $originalQueriedObject = $wp_query->queried_object;
620
+ $originalQueriedObjectID = $wp_query->queried_object_id;
621
+
622
+ foreach($this->arrItems as $item){
623
+
624
+ $item = UniteFunctionsUC::getVal($item, "item");
625
+
626
+ $postItem = UniteFunctionsUC::getVal($item, $paramName);
627
+ if(empty($postItem))
628
+ UniteFunctionsUC::throwError("Posts List attribute: $paramName not found. please write the correct post list attribute name.");
629
+
630
+ $postID = $postItem->ID;
631
+
632
+
633
+ //set the post qieried object
634
+ $wp_query->queried_object = $postItem;
635
+ $wp_query->queried_object_id = $postID;
636
+
637
+ $GLOBALS['post'] = $postItem;
638
+
639
+ $output = \Elementor\Plugin::instance()->frontend->get_builder_content_for_display( 1753 );
640
+
641
+ echo $output;
642
+ }
643
+
644
+ //restore the original queried object
645
+ $wp_query->queried_object = $originalQueriedObject;
646
+ $wp_query->queried_object_id = $originalQueriedObjectID;
647
+ $GLOBALS['post'] = $originalPost;
648
+
649
+ }
650
+
651
+ */
652
+
653
  /**
654
  * number format for woocommerce
655
  */
666
 
667
  return($price);
668
  }
669
+
670
+ /**
671
+ * number format for woocommerce
672
+ */
673
+ public function filterWcPrice($price){
674
+
675
+ if(function_exists("wc_price") == false)
676
+ return($price);
677
+
678
+ $newPrice = wc_price($price);
679
+
680
+ return($newPrice);
681
+ }
682
+
683
 
684
  /**
685
  * get listing item data
743
  /**
744
  * put test html
745
  */
746
+ public function putTestHTML($type = null, $data = null){
747
 
748
  $objFilters = new UniteCreatorFiltersProcess();
749
+ //$objFilters->putFiltersTabs();
750
 
751
  switch($type){
752
+ case "filter_checkbox":
753
+
754
+ $objFilters->putCheckboxFiltersTest($data);
755
+
756
  break;
757
  default:
758
+ dmp("putTestHTML - type not found: $type");
759
  break;
760
  }
761
 
794
  $getPostTags = new Twig_SimpleFunction('getPostTags', array($this,"getPostTags"));
795
  $getPostData = new Twig_SimpleFunction('getPostData', array($this,"getPostData"));
796
  $putPagination = new Twig_SimpleFunction('putPagination', array($this,"putPagination"));
797
+ //$putListingTemplate_post = new Twig_SimpleFunction('putListingTemplate_posts', array($this,"putListingTemplate_posts"));
798
 
799
  $putPostImageAttributes = new Twig_SimpleFunction('putPostImageAttributes', array($this,"putPostImageAttributes"));
800
 
809
  $getPostTerms = new Twig_SimpleFunction('getPostTerms', array($this,"getPostTerms"));
810
  $getPostAuthor = new Twig_SimpleFunction('getPostAuthor', array($this,"getPostAuthor"));
811
  $getUserData = new Twig_SimpleFunction('getUserData', array($this,"getUserData"));
 
812
  $getWooChildProducts = new Twig_SimpleFunction('getWooChildProducts', array($this,"getWooChildProducts"));
 
813
  $getListingItemData = new Twig_SimpleFunction('getListingItemData', array($this,"getListingItemData"));
814
 
815
  $printTermCustomFields = new Twig_SimpleFunction('printTermCustomFields', array($this,"printTermCustomFields"));
820
  $filterWPAutop = new Twig_SimpleFilter("wpautop", array($this, "filterWPAutop"));
821
  $filterUCDate = new Twig_SimpleFilter("ucdate", array($this, "filterUCDate"));
822
  $filterPriceNumberFormat = new Twig_SimpleFilter("price_number_format", array($this, "filterPriceNumberFormat"));
823
+ $filterWcPrice = new Twig_SimpleFilter("wc_price", array($this, "filterWcPrice"));
824
+
825
  $putTestHtml = new Twig_SimpleFunction('putTestHTML', array($this,"putTestHTML"));
826
 
827
 
856
  $this->twig->addFunction($printJsonVar);
857
  $this->twig->addFunction($printJsonHtmlData);
858
  $this->twig->addFunction($putPagination);
859
+ //$this->twig->addFunction($putListingTemplate_post);
860
 
861
  $this->twig->addFunction($getPostTerms);
862
  $this->twig->addFunction($getPostAuthor);
863
  $this->twig->addFunction($getUserData);
 
864
  $this->twig->addFunction($getWooChildProducts);
865
  $this->twig->addFunction($getTermCustomFields);
866
  $this->twig->addFunction($putItemsJsonFunction);
876
  $this->twig->addFilter($filterWPAutop);
877
  $this->twig->addFilter($filterUCDate);
878
  $this->twig->addFilter($filterPriceNumberFormat);
879
+ $this->twig->addFilter($filterWcPrice);
880
 
881
 
882
  //pro functions
includes.php CHANGED
@@ -12,7 +12,7 @@ if(!defined('UNLIMITED_ELEMENTS_INC'))
12
  defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
13
 
14
  if(!defined("UNLIMITED_ELEMENTS_VERSION"))
15
- define("UNLIMITED_ELEMENTS_VERSION", "1.4.70");
16
 
17
  $currentFile = __FILE__;
18
  $currentFolder = dirname($currentFile);
12
  defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
13
 
14
  if(!defined("UNLIMITED_ELEMENTS_VERSION"))
15
+ define("UNLIMITED_ELEMENTS_VERSION", "1.4.72");
16
 
17
  $currentFile = __FILE__;
18
  $currentFolder = dirname($currentFile);
js/unitecreator_admin.js CHANGED
@@ -573,7 +573,7 @@ function UniteCreatorAdmin(){
573
  jQuery("#uc_tab_itemattr .unite_settings_wrapper").hide();
574
 
575
  var itemTabText = param["items_panel_text"];
576
-
577
  jQuery(".uc-postsitems-related").remove();
578
  jQuery("#uc_tab_itemattr").append("<div class='uc-postsitems-related'>"+itemTabText+"</div>");
579
 
@@ -637,6 +637,11 @@ function UniteCreatorAdmin(){
637
  var param = arrParams[index];
638
 
639
  switch(param.type){
 
 
 
 
 
640
  case "uc_posts_list":
641
  param["items_param_type"] = "uc_post";
642
  param["items_panel_text"] = "Items as posts mode";
573
  jQuery("#uc_tab_itemattr .unite_settings_wrapper").hide();
574
 
575
  var itemTabText = param["items_panel_text"];
576
+
577
  jQuery(".uc-postsitems-related").remove();
578
  jQuery("#uc_tab_itemattr").append("<div class='uc-postsitems-related'>"+itemTabText+"</div>");
579
 
637
  var param = arrParams[index];
638
 
639
  switch(param.type){
640
+ case "uc_listing":
641
+ param["items_param_type"] = "uc_listing";
642
+ param["items_panel_text"] = "Items as listing mode";
643
+ return(param);
644
+ break;
645
  case "uc_posts_list":
646
  param["items_param_type"] = "uc_post";
647
  param["items_panel_text"] = "Items as posts mode";
js/unitecreator_includes.js CHANGED
@@ -166,6 +166,11 @@ function UniteCreatorIncludes(){
166
  if(objCondition)
167
  objHtml.data("condition", objCondition);
168
 
 
 
 
 
 
169
  return(objHtml)
170
  }
171
 
@@ -314,6 +319,13 @@ function UniteCreatorIncludes(){
314
  if(!data.condition && typeof data.condition != "object")
315
  data.condition = null;
316
 
 
 
 
 
 
 
 
317
  return(data);
318
  }
319
 
@@ -380,8 +392,9 @@ function UniteCreatorIncludes(){
380
  * init include list
381
  */
382
  function initIncludeList(objList){
383
- var data = objList.data("init");
384
 
 
 
385
  if(!data || typeof data != "object" || data.length == 0){
386
  addIncludesListItem(objList);
387
  return(false);
@@ -456,6 +469,26 @@ function UniteCreatorIncludes(){
456
 
457
  }
458
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
459
  }
460
 
461
 
@@ -529,12 +562,22 @@ function UniteCreatorIncludes(){
529
  function openIncludeSettingsDialog(){
530
 
531
  var objRow = jQuery(this).parents("li");
 
 
 
 
532
 
533
  var data = getIncludeData(objRow);
534
 
535
  var objDialog = jQuery("#uc_dialog_unclude_settings");
536
  objDialog.data("objRow", objRow);
537
 
 
 
 
 
 
 
538
  var buttonOpts = {};
539
 
540
  buttonOpts[g_uctext.update] = function(){
@@ -542,6 +585,20 @@ function UniteCreatorIncludes(){
542
  var paramValue = jQuery("#uc_dialog_include_values").val();
543
 
544
  updateInputCondition(objRow, paramName, paramValue);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545
  objDialog.dialog("close");
546
  }
547
 
@@ -559,7 +616,9 @@ function UniteCreatorIncludes(){
559
  minWidth:700,
560
  modal:true,
561
  open:function(){
 
562
  var arrParams = g_parent.getControlParams();
 
563
  dialogSettings_fillParams(arrParams, data);
564
  }
565
  });
166
  if(objCondition)
167
  objHtml.data("condition", objCondition);
168
 
169
+ //update params
170
+ var objParams = g_ucAdmin.getVal(item, "params");
171
+ if(objParams)
172
+ objHtml.data("params",objParams);
173
+
174
  return(objHtml)
175
  }
176
 
319
  if(!data.condition && typeof data.condition != "object")
320
  data.condition = null;
321
 
322
+ //get params
323
+ var objParams = objRow.data("params");
324
+ if(!objParams)
325
+ objParams = null;
326
+
327
+ data.params = objParams;
328
+
329
  return(data);
330
  }
331
 
392
  * init include list
393
  */
394
  function initIncludeList(objList){
 
395
 
396
+ var data = objList.data("init");
397
+
398
  if(!data || typeof data != "object" || data.length == 0){
399
  addIncludesListItem(objList);
400
  return(false);
469
 
470
  }
471
 
472
+ //checkboxes
473
+ var objCheckboxes = objDialog.find("input[type='checkbox']");
474
+
475
+ var objParams = g_ucAdmin.getVal(objData, "params");
476
+ if(!objParams)
477
+ objParams = null;
478
+
479
+ jQuery.each(objCheckboxes,function(index, checkbox){
480
+
481
+ var objCheckbox = jQuery(checkbox);
482
+
483
+ var name = objCheckbox.prop("name");
484
+
485
+ var value = g_ucAdmin.getVal(objParams, name);
486
+ value = g_ucAdmin.strToBool(value);
487
+
488
+ objCheckbox.prop("checked", value);
489
+
490
+ });
491
+
492
  }
493
 
494
 
562
  function openIncludeSettingsDialog(){
563
 
564
  var objRow = jQuery(this).parents("li");
565
+ var objList = objRow.parents("ul");
566
+
567
+ var listType = objList.data("type");
568
+
569
 
570
  var data = getIncludeData(objRow);
571
 
572
  var objDialog = jQuery("#uc_dialog_unclude_settings");
573
  objDialog.data("objRow", objRow);
574
 
575
+ if(listType == "js"){
576
+ objDialog.addClass("uc-include-type-js");
577
+ }else{
578
+ objDialog.removeClass("uc-include-type-js");
579
+ }
580
+
581
  var buttonOpts = {};
582
 
583
  buttonOpts[g_uctext.update] = function(){
585
  var paramValue = jQuery("#uc_dialog_include_values").val();
586
 
587
  updateInputCondition(objRow, paramName, paramValue);
588
+
589
+ var rowParams = {};
590
+ var objCheckboxes = objDialog.find("input[type='checkbox']");
591
+ jQuery.each(objCheckboxes,function(index, checkbox){
592
+ var objCheckbox = jQuery(checkbox);
593
+ var name = objCheckbox.prop("name");
594
+ var isChecked = objCheckbox.is(":checked");
595
+
596
+ if(isChecked == true)
597
+ rowParams[name] = true;
598
+ });
599
+
600
+ objRow.data("params", rowParams);
601
+
602
  objDialog.dialog("close");
603
  }
604
 
616
  minWidth:700,
617
  modal:true,
618
  open:function(){
619
+
620
  var arrParams = g_parent.getControlParams();
621
+
622
  dialogSettings_fillParams(arrParams, data);
623
  }
624
  });
provider/core/plugins/unlimited_elements/elementor/assets/uc_editor_admin.js CHANGED
@@ -179,6 +179,8 @@ function UniteCreatorElementorEditorAdmin(){
179
  var isCurrentTaxRelevant = objTax.hasOwnProperty(selectedTax);
180
  if(isCurrentTaxRelevant == false && firstVisibleOption){
181
 
 
 
182
  selectPostTaxonomy.val(firstVisibleOption).trigger("change");
183
  }
184
 
@@ -227,9 +229,15 @@ function UniteCreatorElementorEditorAdmin(){
227
  placeholder:placeholder
228
  });
229
 
230
- if(jQuery.isEmptyObject(selectedCatID) == false)
231
- objSelectPostCategory.val(selectedCatID).trigger("change");
232
-
 
 
 
 
 
 
233
  }
234
 
235
  /**
@@ -568,6 +576,7 @@ function UniteCreatorElementorEditorAdmin(){
568
  arrInitIDs.push(item.id);
569
  }
570
 
 
571
  objSelect.val(arrInitIDs).trigger("change");
572
 
573
  }
@@ -576,7 +585,7 @@ function UniteCreatorElementorEditorAdmin(){
576
  * init post id's selector
577
  */
578
  function initPostIDsSelect(objSelect){
579
-
580
  var widgetSettings = getLastOpenedWidgetSettings();
581
 
582
  var settingName = objSelect.data("setting");
179
  var isCurrentTaxRelevant = objTax.hasOwnProperty(selectedTax);
180
  if(isCurrentTaxRelevant == false && firstVisibleOption){
181
 
182
+ trace("trigger 1");
183
+
184
  selectPostTaxonomy.val(firstVisibleOption).trigger("change");
185
  }
186
 
229
  placeholder:placeholder
230
  });
231
 
232
+ if(jQuery.isEmptyObject(selectedCatID) == false){
233
+
234
+ objSelectPostCategory.val(selectedCatID);
235
+
236
+ //var newSelectedCatID = objSelectPostCategory.select2("val");
237
+
238
+ objSelectPostCategory.trigger("change");
239
+
240
+ }
241
  }
242
 
243
  /**
576
  arrInitIDs.push(item.id);
577
  }
578
 
579
+ trace("trigger 3");
580
  objSelect.val(arrInitIDs).trigger("change");
581
 
582
  }
585
  * init post id's selector
586
  */
587
  function initPostIDsSelect(objSelect){
588
+
589
  var widgetSettings = getLastOpenedWidgetSettings();
590
 
591
  var settingName = objSelect.data("setting");
provider/core/plugins/unlimited_elements/elementor/elementor_dynamic_visibility.class.php ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
4
+
5
+ class UniteCreatorDynamicVisibility{
6
+
7
+ const PREFIX = "uc_dynamic_visibility_";
8
+ private $arrSettings;
9
+ private $arrHiddenIDs = array();
10
+
11
+
12
+ /**
13
+ * get setting by key
14
+ */
15
+ private function getSetting($key){
16
+
17
+ $value = UniteFunctionsUC::getVal($this->arrSettings, self::PREFIX.$key);
18
+
19
+ return($value);
20
+ }
21
+
22
+ /**
23
+ * is hide by archive term ids
24
+ */
25
+ private function isHideElement_archiveTermIDs(){
26
+
27
+ $termIDs = $this->getSetting("term_ids");
28
+
29
+ if(empty($termIDs))
30
+ return(false);
31
+
32
+ $termID = $termIDs; //temporary
33
+
34
+ if(is_archive() == false)
35
+ return(true);
36
+
37
+ $objTerm = get_queried_object();
38
+
39
+ if($objTerm instanceof WP_Term == false)
40
+ return(true);
41
+
42
+ if(isset($objTerm->term_id) == false)
43
+ return(true);
44
+
45
+ //check current term
46
+
47
+ $currentTermID = $objTerm->term_id;
48
+
49
+ $arrCurrentIDs = array($currentTermID);
50
+
51
+ $parents = get_ancestors( $currentTermID, $objTerm->taxonomy, 'taxonomy' );
52
+ if(!empty($parents))
53
+ $arrCurrentIDs = array_merge($arrCurrentIDs, $parents);
54
+
55
+
56
+
57
+ dmp("check by ids, write function to get all parent ids");
58
+ dmp($arrCurrentIDs);
59
+ exit();
60
+
61
+
62
+ //show if terms match
63
+ if($currentTermID == $termID)
64
+ return(false);
65
+
66
+ //if no parent term - don't match, hide
67
+ if(isset($objTerm->parent) == false)
68
+ return(true);
69
+
70
+ dmp($objTerm);
71
+
72
+
73
+ dmp("check all parents");
74
+
75
+ //should check all in the conditions
76
+ return(false);
77
+ }
78
+
79
+
80
+ /**
81
+ * check if hide element or not
82
+ */
83
+ private function isHideElement($type){
84
+
85
+ switch($type){
86
+ case "archive_terms":
87
+
88
+ $isHide = $this->isHideElement_archiveTermIDs();
89
+
90
+ return($isHide);
91
+ break;
92
+ default:
93
+ return(false);
94
+ break;
95
+ }
96
+
97
+
98
+ return(false);
99
+ }
100
+
101
+
102
+ /**
103
+ * on before render
104
+ */
105
+ public function onBeforeRenderElement($element){
106
+
107
+ $this->arrSettings = $element->get_settings_for_display();
108
+
109
+ $type = $this->getSetting("type");
110
+
111
+ if($type == "none" || empty($type))
112
+ return(true);
113
+
114
+ $isHide = $this->isHideElement($type);
115
+
116
+ if($isHide == false)
117
+ return(false);
118
+
119
+ $elementID = $element->get_id();
120
+
121
+ $this->arrHiddenIDs[$elementID] = true;
122
+
123
+ //start hiding
124
+
125
+ ob_start();
126
+ }
127
+
128
+
129
+ /**
130
+ * on after render element
131
+ */
132
+ public function onAfterRenderElement($element){
133
+
134
+ $elementID = $element->get_id();
135
+
136
+ $isHidden = isset($this->arrHiddenIDs[$elementID]);
137
+
138
+ if($isHidden == false)
139
+ return(true);
140
+
141
+ //finish hiding
142
+
143
+ ob_end_clean();
144
+ }
145
+
146
+
147
+ /**
148
+ * add visibility controls section
149
+ */
150
+ public function addVisibilityControls($objControls){
151
+
152
+ $objControls->start_controls_section(
153
+ 'section_visibility_uc',
154
+ [
155
+ 'label' => __( 'Visibility Conditions', 'unlimited_elements' ),
156
+ 'tab' => "advanced",
157
+ ]
158
+ );
159
+
160
+ //condition type
161
+
162
+ $prefix = self::PREFIX;
163
+
164
+ $objControls->add_control(
165
+ $prefix.'type',
166
+ array(
167
+ 'label' => __( 'Visibility By', 'unlimited-elements-for-elementor' ),
168
+ 'type' => \Elementor\Controls_Manager::SELECT,
169
+ 'default' => 'none',
170
+ 'options' => array(
171
+ 'none' => __( 'None', 'unlimited-elements-for-elementor' ),
172
+ 'archive_terms' => __( 'Archive Terms', 'unlimited-elements-for-elementor' )
173
+ ),
174
+ )
175
+ );
176
+
177
+ $objControls->add_control(
178
+ $prefix.'term_ids',
179
+ [
180
+ 'label' => __( 'Term IDs', 'unlimited-elements-for-elementor' ),
181
+ 'type' => \Elementor\Controls_Manager::TEXT,
182
+ 'default' => ""
183
+ ]
184
+ );
185
+
186
+
187
+ $objControls->end_controls_section();
188
+ }
189
+
190
+
191
+
192
+ }
provider/core/plugins/unlimited_elements/elementor/elementor_integrate.class.php CHANGED
@@ -21,6 +21,7 @@ class UniteCreatorElementorIntegrate{
21
  private $enableImportTemplate = true;
22
  private $enableExportTemplate = true;
23
  private $enableBackgroundWidgets = false;
 
24
 
25
  public static $isConsolidated = false;
26
 
@@ -51,6 +52,7 @@ class UniteCreatorElementorIntegrate{
51
  public static $isOutputPage = false;
52
  private $isPluginFilesIncluded = false;
53
  private $objBackgroundWidget;
 
54
 
55
  public static $enableEditHTMLButton = true;
56
 
@@ -619,7 +621,45 @@ class UniteCreatorElementorIntegrate{
619
 
620
  }
621
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
 
 
 
 
 
 
 
 
 
 
 
 
 
 
623
  private function a____________BACKGROUND_WIDGETS___________(){}
624
 
625
 
@@ -867,6 +907,8 @@ class UniteCreatorElementorIntegrate{
867
 
868
  }
869
 
 
 
870
  /**
871
  * get editor page scripts
872
  */
@@ -1384,7 +1426,6 @@ class UniteCreatorElementorIntegrate{
1384
  */
1385
  public function initElementorIntegration(){
1386
 
1387
-
1388
  $isEnabled = HelperProviderCoreUC_EL::getGeneralSetting("el_enable");
1389
  $isEnabled = UniteFunctionsUC::strToBool($isEnabled);
1390
  if($isEnabled == false)
@@ -1414,6 +1455,13 @@ class UniteCreatorElementorIntegrate{
1414
  $enableBackgrounds = HelperProviderCoreUC_EL::getGeneralSetting("enable_backgrounds");
1415
  $enableBackgrounds = UniteFunctionsUC::strToBool($enableBackgrounds);
1416
 
 
 
 
 
 
 
 
1417
 
1418
  if($enableExportImport == false){
1419
  $this->enableExportTemplate = false;
@@ -1436,6 +1484,9 @@ class UniteCreatorElementorIntegrate{
1436
  if($enableBackgrounds == true)
1437
  $this->initBackgroundWidgets();
1438
 
 
 
 
1439
  add_action('elementor/init', array($this, 'onElementorInit'));
1440
 
1441
  //fix some frontend bug with double render
21
  private $enableImportTemplate = true;
22
  private $enableExportTemplate = true;
23
  private $enableBackgroundWidgets = false;
24
+ private $enableDynamicVisibility = false;
25
 
26
  public static $isConsolidated = false;
27
 
52
  public static $isOutputPage = false;
53
  private $isPluginFilesIncluded = false;
54
  private $objBackgroundWidget;
55
+ private $objDynamicVisibility;
56
 
57
  public static $enableEditHTMLButton = true;
58
 
621
 
622
  }
623
 
624
+ private function a____________DYNAMIC_VISIBILITY___________(){}
625
+
626
+ /**
627
+ * add dynamic visibility controls
628
+ */
629
+ public function addDynamicVisibilityControls($objControls){
630
+
631
+ $this->objDynamicVisibility->addVisibilityControls($objControls);
632
+
633
+ }
634
+
635
+
636
+ /**
637
+ * init dynamic visibility
638
+ */
639
+ private function initDynamicVisibility(){
640
+
641
+ $this->enableDynamicVisibility = true;
642
+ $this->objDynamicVisibility = new UniteCreatorDynamicVisibility();
643
+
644
+ add_action("elementor/element/section/section_advanced/after_section_end", array($this, "addDynamicVisibilityControls"));
645
+
646
+ //filtering content
647
+ if(self::$isEditMode == true)
648
+ return(false);
649
 
650
+ add_action("elementor/frontend/section/before_render", array($this->objDynamicVisibility, "onBeforeRenderElement"));
651
+ add_action("elementor/frontend/section/after_render", array($this->objDynamicVisibility, "onAfterRenderElement"));
652
+
653
+
654
+ //dmp("init filtering");
655
+ // filter sections
656
+ //$this->loader->addAction( "elementor/frontend/section/before_render", $pluginPublic, 'filterSectionContentBefore', 10, 1 );
657
+ //$this->loader->addAction( "elementor/frontend/section/after_render", $pluginPublic, 'filterSectionContentAfter', 10, 1 );
658
+
659
+
660
+ }
661
+
662
+
663
  private function a____________BACKGROUND_WIDGETS___________(){}
664
 
665
 
907
 
908
  }
909
 
910
+
911
+
912
  /**
913
  * get editor page scripts
914
  */
1426
  */
1427
  public function initElementorIntegration(){
1428
 
 
1429
  $isEnabled = HelperProviderCoreUC_EL::getGeneralSetting("el_enable");
1430
  $isEnabled = UniteFunctionsUC::strToBool($isEnabled);
1431
  if($isEnabled == false)
1455
  $enableBackgrounds = HelperProviderCoreUC_EL::getGeneralSetting("enable_backgrounds");
1456
  $enableBackgrounds = UniteFunctionsUC::strToBool($enableBackgrounds);
1457
 
1458
+ //remove me
1459
+ $enableDynamicVisibility = false;
1460
+
1461
+ if(GlobalsUC::$inDev == true){
1462
+ $enableDynamicVisibility = HelperProviderCoreUC_EL::getGeneralSetting("enable_dynamic_visibility");
1463
+ $enableDynamicVisibility = UniteFunctionsUC::strToBool($enableDynamicVisibility);
1464
+ }
1465
 
1466
  if($enableExportImport == false){
1467
  $this->enableExportTemplate = false;
1484
  if($enableBackgrounds == true)
1485
  $this->initBackgroundWidgets();
1486
 
1487
+ if($enableDynamicVisibility == true)
1488
+ $this->initDynamicVisibility();
1489
+
1490
  add_action('elementor/init', array($this, 'onElementorInit'));
1491
 
1492
  //fix some frontend bug with double render
provider/core/plugins/unlimited_elements/elementor/elementor_widget.class.php CHANGED
@@ -11,7 +11,7 @@ use Elementor\Group_Control_Background;
11
  use Elementor\Group_Control_Text_Shadow;
12
  use Elementor\Group_Control_Box_Shadow;
13
  use Elementor\Group_Control_Css_Filter;
14
- use Elementor\Scheme_Typography;
15
  use Elementor\Core\Schemes;
16
  use Elementor\Repeater;
17
  use Elementor\Utils;
@@ -1336,12 +1336,11 @@ class UniteCreatorElementorWidget extends Widget_Base {
1336
  $arrControl = array();
1337
  $arrControl["name"] = $controlName;
1338
  $arrControl["selector"] = $selector;
1339
- $arrControl["scheme"] = Scheme_Typography::TYPOGRAPHY_3;
1340
 
1341
  if(!empty($title))
1342
  $arrControl["label"] = $title;
1343
 
1344
-
1345
  $this->objControls->add_group_control(Group_Control_Typography::get_type(), $arrControl);
1346
 
1347
  }
@@ -1376,11 +1375,12 @@ class UniteCreatorElementorWidget extends Widget_Base {
1376
  case UniteCreatorDialogParam::PARAM_USERS:
1377
  case UniteCreatorDialogParam::PARAM_TEMPLATE:
1378
  case UniteCreatorDialogParam::PARAM_MENU:
 
1379
 
1380
  $settings = new UniteCreatorSettings();
1381
 
1382
  $arrChildParams = $settings->getMultipleCreatorParams($param);
1383
-
1384
  foreach($arrChildParams as $childParam)
1385
  $this->addElementorParamUC($childParam,$objControls);
1386
 
@@ -1389,9 +1389,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
1389
 
1390
  $param["all_cats_mode"] = true;
1391
 
1392
- //add current posts settings
1393
- $isArchiveLocation = UniteFunctionsWPUC::isArchiveLocation();
1394
-
1395
  $param["add_current_posts"] = true;
1396
 
1397
  $settings = new UniteCreatorSettings();
@@ -1633,10 +1631,10 @@ class UniteCreatorElementorWidget extends Widget_Base {
1633
  /**
1634
  * add pagination controls
1635
  */
1636
- protected function addPaginationControls(){
1637
-
1638
  $objPagination = new UniteCreatorElementorPagination();
1639
- $objPagination->addElementorSectionControls($this);
1640
 
1641
  }
1642
 
@@ -1769,6 +1767,17 @@ class UniteCreatorElementorWidget extends Widget_Base {
1769
  return($arrOutput);
1770
  }
1771
 
 
 
 
 
 
 
 
 
 
 
 
1772
 
1773
  /**
1774
  * register controls with not consolidated addon
@@ -1807,7 +1816,9 @@ class UniteCreatorElementorWidget extends Widget_Base {
1807
  $hasPostsList = false;
1808
  $postListParam = null;
1809
 
1810
-
 
 
1811
  //foreach the categories
1812
  foreach($arrCatsAndParams as $catID => $arrCat){
1813
 
@@ -1852,10 +1863,15 @@ class UniteCreatorElementorWidget extends Widget_Base {
1852
 
1853
  if($showImageSizes == true)
1854
  $this->addImageSizesControl($postListParam, $this->objControls);
1855
-
1856
  continue;
1857
  }
1858
 
 
 
 
 
 
1859
  $this->addElementorParamUC($param);
1860
  }
1861
 
@@ -1879,12 +1895,16 @@ class UniteCreatorElementorWidget extends Widget_Base {
1879
  'label' => $labelPosts,
1880
  )
1881
  );
1882
-
1883
  $this->addElementorParamUC($postListParam);
1884
 
1885
  $this->end_controls_section();
1886
  }
1887
-
 
 
 
 
1888
  //add no attributes section
1889
  if($isNoSettings == true){
1890
 
@@ -1915,11 +1935,13 @@ class UniteCreatorElementorWidget extends Widget_Base {
1915
  if($isFontsEnabled == true)
1916
  $this->addFontControlsUC();
1917
 
 
1918
  //add pagination section if needed
1919
-
1920
- if($hasPostsList == true)
1921
- $this->addPaginationControls();
1922
-
 
1923
  //add debug controls
1924
  $this->addAdvancedSectionControls($hasPostsList, $isItemsEnabled);
1925
 
@@ -2712,9 +2734,8 @@ class UniteCreatorElementorWidget extends Widget_Base {
2712
  return("");
2713
 
2714
  $isArchivePage = UniteFunctionsWPUC::isArchiveLocation();
2715
-
2716
- //validate post source, enable only on current
2717
 
 
2718
  if($isArchivePage == true){
2719
 
2720
  $postListName = UniteFunctionsUC::getVal($arrPostListParam, "name");
11
  use Elementor\Group_Control_Text_Shadow;
12
  use Elementor\Group_Control_Box_Shadow;
13
  use Elementor\Group_Control_Css_Filter;
14
+ use Elementor\Core\Schemes\Typography;
15
  use Elementor\Core\Schemes;
16
  use Elementor\Repeater;
17
  use Elementor\Utils;
1336
  $arrControl = array();
1337
  $arrControl["name"] = $controlName;
1338
  $arrControl["selector"] = $selector;
1339
+ $arrControl["scheme"] = Typography::TYPOGRAPHY_3;
1340
 
1341
  if(!empty($title))
1342
  $arrControl["label"] = $title;
1343
 
 
1344
  $this->objControls->add_group_control(Group_Control_Typography::get_type(), $arrControl);
1345
 
1346
  }
1375
  case UniteCreatorDialogParam::PARAM_USERS:
1376
  case UniteCreatorDialogParam::PARAM_TEMPLATE:
1377
  case UniteCreatorDialogParam::PARAM_MENU:
1378
+ case UniteCreatorDialogParam::PARAM_LISTING:
1379
 
1380
  $settings = new UniteCreatorSettings();
1381
 
1382
  $arrChildParams = $settings->getMultipleCreatorParams($param);
1383
+
1384
  foreach($arrChildParams as $childParam)
1385
  $this->addElementorParamUC($childParam,$objControls);
1386
 
1389
 
1390
  $param["all_cats_mode"] = true;
1391
 
1392
+ //add current posts settings
 
 
1393
  $param["add_current_posts"] = true;
1394
 
1395
  $settings = new UniteCreatorSettings();
1631
  /**
1632
  * add pagination controls
1633
  */
1634
+ protected function addPaginationControls($postListParam = null){
1635
+
1636
  $objPagination = new UniteCreatorElementorPagination();
1637
+ $objPagination->addElementorSectionControls($this, $postListParam);
1638
 
1639
  }
1640
 
1767
  return($arrOutput);
1768
  }
1769
 
1770
+ /**
1771
+ * put listing sections
1772
+ */
1773
+ private function putListingSections($listingParam){
1774
+
1775
+ if(GlobalsUC::$inDev == false)
1776
+ return(false);
1777
+
1778
+ //dmP("put listing sections");exit();
1779
+
1780
+ }
1781
 
1782
  /**
1783
  * register controls with not consolidated addon
1816
  $hasPostsList = false;
1817
  $postListParam = null;
1818
 
1819
+ $hasListing = false;
1820
+ $listingParam = null;
1821
+
1822
  //foreach the categories
1823
  foreach($arrCatsAndParams as $catID => $arrCat){
1824
 
1863
 
1864
  if($showImageSizes == true)
1865
  $this->addImageSizesControl($postListParam, $this->objControls);
1866
+
1867
  continue;
1868
  }
1869
 
1870
+ if($type == UniteCreatorDialogParam::PARAM_LISTING){
1871
+ $hasListing = true;
1872
+ $listingParam = $param;
1873
+ }
1874
+
1875
  $this->addElementorParamUC($param);
1876
  }
1877
 
1895
  'label' => $labelPosts,
1896
  )
1897
  );
1898
+
1899
  $this->addElementorParamUC($postListParam);
1900
 
1901
  $this->end_controls_section();
1902
  }
1903
+
1904
+ if($hasListing == true)
1905
+ $this->putListingSections($listingParam);
1906
+
1907
+
1908
  //add no attributes section
1909
  if($isNoSettings == true){
1910
 
1935
  if($isFontsEnabled == true)
1936
  $this->addFontControlsUC();
1937
 
1938
+
1939
  //add pagination section if needed
1940
+ if($hasPostsList == true){
1941
+
1942
+ $this->addPaginationControls($postListParam);
1943
+ }
1944
+
1945
  //add debug controls
1946
  $this->addAdvancedSectionControls($hasPostsList, $isItemsEnabled);
1947
 
2734
  return("");
2735
 
2736
  $isArchivePage = UniteFunctionsWPUC::isArchiveLocation();
 
 
2737
 
2738
+ //validate post source, enable only on current
2739
  if($isArchivePage == true){
2740
 
2741
  $postListName = UniteFunctionsUC::getVal($arrPostListParam, "name");
provider/core/plugins/unlimited_elements/elementor/pagination.class.php CHANGED
@@ -16,11 +16,18 @@ class UniteCreatorElementorPagination{
16
  /**
17
  * add content controls
18
  */
19
- private function addElementorControls_content($widget){
20
 
 
 
 
 
 
 
 
21
  $widget->start_controls_section(
22
  'section_pagination', array(
23
- 'label' => esc_html__("Posts Pagination", "unlimited-elements-for-elementor"),
24
  )
25
  );
26
 
@@ -48,92 +55,28 @@ class UniteCreatorElementorPagination{
48
  ]
49
  );
50
 
51
- /*
52
- $widget->add_control(
53
- 'pagination_page_limit',
54
- [
55
- 'label' => __( 'Page Limit', "unlimited-elements-for-elementor"),
56
- 'default' => '5',
57
- 'condition' => [
58
- 'pagination_type!' => '',
59
- ],
60
- ]
61
- );
62
-
63
- $widget->add_control(
64
- 'pagination_numbers_shorten',
65
- [
66
- 'label' => __( 'Shorten', "unlimited-elements-for-elementor"),
67
- 'type' => \Elementor\Controls_Manager::SWITCHER,
68
- 'default' => '',
69
- 'condition' => [
70
- 'pagination_type' => [
71
- 'numbers',
72
- 'numbers_and_prev_next',
73
- ],
74
- ],
75
- ]
76
- );
77
-
78
- $widget->add_control(
79
- 'pagination_prev_label',
80
- [
81
- 'label' => __( 'Previous Label', "unlimited-elements-for-elementor"),
82
- 'default' => __( '&laquo; Previous', "unlimited-elements-for-elementor"),
83
- 'condition' => [
84
- 'pagination_type' => [
85
- 'prev_next',
86
- 'numbers_and_prev_next',
87
- ],
88
- ],
89
- ]
90
- );
91
-
92
- $widget->add_control(
93
- 'pagination_next_label',
94
- [
95
- 'label' => __( 'Next Label', "unlimited-elements-for-elementor"),
96
- 'default' => __( 'Next &raquo;', "unlimited-elements-for-elementor"),
97
- 'condition' => [
98
- 'pagination_type' => [
99
- 'prev_next',
100
- 'numbers_and_prev_next',
101
- ],
102
- ],
103
- ]
104
- );
105
 
106
-
107
- $widget->add_control(
108
- 'pagination_align',
109
- [
110
- 'label' => __( 'Alignment', "unlimited-elements-for-elementor"),
111
- 'type' => \Elementor\Controls_Manager::CHOOSE,
112
- 'options' => [
113
- 'left' => [
114
- 'title' => __( 'Left', "unlimited-elements-for-elementor"),
115
- 'icon' => 'fa fa-align-left',
116
- ],
117
- 'center' => [
118
- 'title' => __( 'Center', "unlimited-elements-for-elementor"),
119
- 'icon' => 'fa fa-align-center',
120
- ],
121
- 'right' => [
122
- 'title' => __( 'Right', "unlimited-elements-for-elementor"),
123
- 'icon' => 'fa fa-align-right',
124
  ],
125
- ],
126
- 'default' => 'center',
127
- 'selectors' => [
128
- '{{WRAPPER}} .uc-posts-pagination' => 'text-align: {{VALUE}};',
129
- ],
130
- 'condition' => [
131
- 'pagination_type!' => '',
132
- ],
133
- ]
134
- );
135
- */
136
-
137
 
138
  $widget->end_controls_section();
139
  }
@@ -269,9 +212,9 @@ class UniteCreatorElementorPagination{
269
  /**
270
  * add elementor controls
271
  */
272
- public function addElementorSectionControls($widget){
273
 
274
- $this->addElementorControls_content($widget);
275
 
276
  //$this->addElementorControls_styles($widget);
277
 
@@ -393,6 +336,7 @@ class UniteCreatorElementorPagination{
393
  */
394
  public function putPaginationWidgetHtml($args){
395
 
 
396
  $putPrevNext = UniteFunctionsUC::getVal($args, "put_prev_next_buttons");
397
  $putPrevNext = UniteFunctionsUC::strToBool($putPrevNext);
398
 
@@ -443,14 +387,15 @@ class UniteCreatorElementorPagination{
443
  //$options["current"] = 3;
444
 
445
  //-------- put pagination html
446
-
447
- $isArchivePage = is_archive();
 
448
  if($isArchivePage == true){
449
 
450
  $options = $this->getArchivePageOptions($options);
451
-
452
  $pagination = get_the_posts_pagination($options);
453
- }else{
 
454
 
455
  //skip for home pages
456
  if(is_home() == true)
16
  /**
17
  * add content controls
18
  */
19
+ private function addElementorControls_content($widget,$postListParam){
20
 
21
+ $isFilterable = UniteFunctionsUC::getVal($postListParam, "is_filterable");
22
+ $isFilterable = UniteFunctionsUC::strToBool($isFilterable);
23
+
24
+ $textSection = esc_html__("Posts Pagination", "unlimited-elements-for-elementor");
25
+ if($isFilterable == true)
26
+ $textSection = esc_html__("Posts Pagination and Filter", "unlimited-elements-for-elementor");
27
+
28
  $widget->start_controls_section(
29
  'section_pagination', array(
30
+ 'label' => $textSection,
31
  )
32
  );
33
 
55
  ]
56
  );
57
 
58
+ //add filter enabled controls
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
+ if($isFilterable == true){
61
+
62
+ $paramName = UniteFunctionsUC::getVal($postListParam, "name");
63
+
64
+ $widget->add_control(
65
+ $paramName.'_filterable',
66
+ [
67
+ 'label' => __( 'Filterable', "unlimited-elements-for-elementor"),
68
+ 'type' => \Elementor\Controls_Manager::SELECT,
69
+ 'default' => '',
70
+ 'options' => [
71
+ '' => __( 'None', "unlimited-elements-for-elementor"),
72
+ 'using_widget' => __( 'Using Post Filters Widgets', "unlimited-elements-for-elementor"),
 
 
 
 
 
73
  ],
74
+ ]
75
+ );
76
+
77
+
78
+ }
79
+
 
 
 
 
 
 
80
 
81
  $widget->end_controls_section();
82
  }
212
  /**
213
  * add elementor controls
214
  */
215
+ public function addElementorSectionControls($widget, $postListParam = null){
216
 
217
+ $this->addElementorControls_content($widget,$postListParam);
218
 
219
  //$this->addElementorControls_styles($widget);
220
 
336
  */
337
  public function putPaginationWidgetHtml($args){
338
 
339
+
340
  $putPrevNext = UniteFunctionsUC::getVal($args, "put_prev_next_buttons");
341
  $putPrevNext = UniteFunctionsUC::strToBool($putPrevNext);
342
 
387
  //$options["current"] = 3;
388
 
389
  //-------- put pagination html
390
+
391
+ $isArchivePage = UniteFunctionsWPUC::isArchiveLocation();
392
+
393
  if($isArchivePage == true){
394
 
395
  $options = $this->getArchivePageOptions($options);
 
396
  $pagination = get_the_posts_pagination($options);
397
+
398
+ }else{ //on single
399
 
400
  //skip for home pages
401
  if(is_home() == true)
provider/core/plugins/unlimited_elements/plugin.php CHANGED
@@ -86,6 +86,7 @@ class UnlimitedElementsPluginUC extends UniteCreatorPluginBase{
86
  require_once $this->pathPlugin . 'helper_provider_core.class.php';
87
  require_once $this->pathPlugin . 'elementor/elementor_integrate.class.php';
88
  require_once $this->pathPlugin . 'elementor/pagination.class.php';
 
89
 
90
  if(is_admin()){
91
  require_once $this->pathPlugin . 'elementor/elementor_layout_exporter.class.php';
86
  require_once $this->pathPlugin . 'helper_provider_core.class.php';
87
  require_once $this->pathPlugin . 'elementor/elementor_integrate.class.php';
88
  require_once $this->pathPlugin . 'elementor/pagination.class.php';
89
+ require_once $this->pathPlugin . "elementor/elementor_dynamic_visibility.class.php";
90
 
91
  if(is_admin()){
92
  require_once $this->pathPlugin . 'elementor/elementor_layout_exporter.class.php';
provider/core/plugins/unlimited_elements/settings/general_settings_el.xml CHANGED
@@ -75,6 +75,14 @@
75
  label=" Show &quot;Edit HTML&quot; Button in Widget Settings"
76
  description="Show &quot;Edit HTML&quot; button in elementor panel widget settings">
77
  </field>
 
 
 
 
 
 
 
 
78
 
79
  <field type="bulk_control_end"/>
80
 
75
  label=" Show &quot;Edit HTML&quot; Button in Widget Settings"
76
  description="Show &quot;Edit HTML&quot; button in elementor panel widget settings">
77
  </field>
78
+
79
+ <field name="enable_dynamic_visibility"
80
+ type="boolean"
81
+ default="false"
82
+ label=" Enable Dynamic Visibility"
83
+ hidden="true"
84
+ description="">
85
+ </field>
86
 
87
  <field type="bulk_control_end"/>
88
 
provider/core/plugins/unlimited_elements/views/settingselementor.php CHANGED
@@ -42,6 +42,10 @@ class UniteCreatorViewElementorSettings extends UniteCreatorSettingsView{
42
 
43
  $objSettings = $this->modifyConsolidateAddonsSetting($objSettings);
44
 
 
 
 
 
45
  return($objSettings);
46
  }
47
 
42
 
43
  $objSettings = $this->modifyConsolidateAddonsSetting($objSettings);
44
 
45
+ //show the setting that was hidden in first place
46
+ if(GlobalsUC::$inDev == true)
47
+ $objSettings->updateSettingProperty("enable_dynamic_visibility", "hidden", "false");
48
+
49
  return($objSettings);
50
  }
51
 
provider/functions_wordpress.class.php CHANGED
@@ -602,9 +602,37 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
602
 
603
 
604
  return($arrDataOutput);
605
-
606
  }
607
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
608
 
609
 
610
  /**
@@ -1161,7 +1189,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1161
  /**
1162
  * get post meta data
1163
  */
1164
- public static function getPostMetaKeys($postID, $prefix = null){
1165
 
1166
  $postMeta = get_post_meta($postID);
1167
 
@@ -1175,7 +1203,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1175
 
1176
  $firstSign = $key[0];
1177
 
1178
- if($firstSign == "_")
1179
  continue;
1180
 
1181
  if(!empty($prefix))
@@ -1381,7 +1409,6 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1381
  else
1382
  $arrCategories = explode(",", $category);
1383
 
1384
-
1385
  foreach($arrCategories as $cat){
1386
 
1387
  //check for empty category - mean all categories
@@ -1412,10 +1439,10 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1412
  if($isExclude == true){
1413
  $arrSearchItem["operator"] = "NOT IN";
1414
  }
1415
-
1416
  $arrQuery[] = $arrSearchItem;
1417
  }
1418
-
1419
  return($arrQuery);
1420
  }
1421
 
@@ -1430,15 +1457,38 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1430
  if($category == "all" && empty($excludeCategory))
1431
  return(null);
1432
 
 
1433
  //get the query
1434
  $arrQuery = array();
 
1435
 
1436
  if(!empty($category))
1437
  $arrQuery = self::getPosts_getTaxQuery_getArrQuery($arrQuery, $category, $categoryRelation, $isIncludeChildren, false);
1438
 
 
 
1439
  if(!empty($excludeCategory))
1440
- $arrQuery = self::getPosts_getTaxQuery_getArrQuery($arrQuery, $excludeCategory, $categoryRelation, $isExcludeChildren, true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1441
 
 
1442
  if(empty($arrQuery))
1443
  return(null);
1444
 
@@ -1446,7 +1496,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1446
  return($arrQuery);
1447
 
1448
  //check and add relation
1449
- if($categoryRelation === "OR" && !empty($category))
1450
  $arrQuery["relation"] = "OR";
1451
 
1452
  return($arrQuery);
@@ -1491,7 +1541,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1491
 
1492
  $categoryExcludeChildren = UniteFunctionsUC::getVal($filters, "category_exclude_children");
1493
  $categoryExcludeChildren = UniteFunctionsUC::strToBool($categoryExcludeChildren);
1494
-
1495
  $arrTax = self::getPosts_getTaxQuery($category, $categoryRelation, $categoryIncludeChildren, $excludeCategory, $categoryExcludeChildren);
1496
 
1497
  $search = UniteFunctionsUC::getVal($filters, "search");
@@ -2598,6 +2648,9 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
2598
  */
2599
  public static function isArchiveLocation(){
2600
 
 
 
 
2601
  if(( is_archive() || is_tax() || is_home() || is_search() ))
2602
  return(true);
2603
 
602
 
603
 
604
  return($arrDataOutput);
 
605
  }
606
 
607
+ /**
608
+ * get post terms titles
609
+ */
610
+ public static function getPostTermsTitles($post){
611
+
612
+ $arrTermsWithTax = self::getPostTerms($post);
613
+
614
+ if(empty($arrTermsWithTax))
615
+ return(array());
616
+
617
+ $arrTitles = array();
618
+
619
+ foreach($arrTermsWithTax as $taxanomy=>$arrTerms){
620
+
621
+ if(empty($arrTerms))
622
+ continue;
623
+
624
+ foreach($arrTerms as $term){
625
+
626
+ $name = UniteFunctionsUC::getVal($term, "name");
627
+ if(empty($name))
628
+ continue;
629
+
630
+ $arrTitles[] = $name;
631
+ }
632
+ }
633
+
634
+ return($arrTitles);
635
+ }
636
 
637
 
638
  /**
1189
  /**
1190
  * get post meta data
1191
  */
1192
+ public static function getPostMetaKeys($postID, $prefix = null, $includeUnderscore = false){
1193
 
1194
  $postMeta = get_post_meta($postID);
1195
 
1203
 
1204
  $firstSign = $key[0];
1205
 
1206
+ if($firstSign == "_" && $includeUnderscore == false)
1207
  continue;
1208
 
1209
  if(!empty($prefix))
1409
  else
1410
  $arrCategories = explode(",", $category);
1411
 
 
1412
  foreach($arrCategories as $cat){
1413
 
1414
  //check for empty category - mean all categories
1439
  if($isExclude == true){
1440
  $arrSearchItem["operator"] = "NOT IN";
1441
  }
1442
+
1443
  $arrQuery[] = $arrSearchItem;
1444
  }
1445
+
1446
  return($arrQuery);
1447
  }
1448
 
1457
  if($category == "all" && empty($excludeCategory))
1458
  return(null);
1459
 
1460
+
1461
  //get the query
1462
  $arrQuery = array();
1463
+ $arrQueryExclude = array();
1464
 
1465
  if(!empty($category))
1466
  $arrQuery = self::getPosts_getTaxQuery_getArrQuery($arrQuery, $category, $categoryRelation, $isIncludeChildren, false);
1467
 
1468
+ $numQueryItems = count($arrQuery);
1469
+
1470
  if(!empty($excludeCategory))
1471
+ $arrQueryExclude = self::getPosts_getTaxQuery_getArrQuery($arrQueryExclude, $excludeCategory, $categoryRelation, $isExcludeChildren, true);
1472
+
1473
+ //make nested - if both filled
1474
+ if(!empty($arrQueryExclude) && !empty($arrQuery) && $numQueryItems > 1 && $categoryRelation === "OR"){
1475
+
1476
+ //check and add relation
1477
+ $arrQuery["relation"] = "OR";
1478
+
1479
+ $arrQueryCombined = array();
1480
+ $arrQueryCombined[] = $arrQuery;
1481
+ $arrQueryCombined[] = $arrQueryExclude;
1482
+
1483
+ return($arrQueryCombined);
1484
+ }
1485
+
1486
+
1487
+ //in case there is exclude only
1488
+ if(!empty($arrQueryExclude))
1489
+ $arrQuery = array_merge($arrQuery, $arrQueryExclude);
1490
 
1491
+ //for single query
1492
  if(empty($arrQuery))
1493
  return(null);
1494
 
1496
  return($arrQuery);
1497
 
1498
  //check and add relation
1499
+ if($categoryRelation === "OR" && $numQueryItems > 1)
1500
  $arrQuery["relation"] = "OR";
1501
 
1502
  return($arrQuery);
1541
 
1542
  $categoryExcludeChildren = UniteFunctionsUC::getVal($filters, "category_exclude_children");
1543
  $categoryExcludeChildren = UniteFunctionsUC::strToBool($categoryExcludeChildren);
1544
+
1545
  $arrTax = self::getPosts_getTaxQuery($category, $categoryRelation, $categoryIncludeChildren, $excludeCategory, $categoryExcludeChildren);
1546
 
1547
  $search = UniteFunctionsUC::getVal($filters, "search");
2648
  */
2649
  public static function isArchiveLocation(){
2650
 
2651
+ if(is_single())
2652
+ return(false);
2653
+
2654
  if(( is_archive() || is_tax() || is_home() || is_search() ))
2655
  return(true);
2656
 
provider/provider_dialog_param.class.php CHANGED
@@ -43,6 +43,10 @@ class UniteCreatorDialogParam extends UniteCreatorDialogParamWork{
43
  $this->arrParams[] = self::PARAM_WOO_CATS;
44
  $this->arrParams[] = self::PARAM_USERS;
45
  $this->arrParams[] = self::PARAM_TEMPLATE;
 
 
 
 
46
  $this->arrParams[] = self::PARAM_TYPOGRAPHY;
47
  $this->arrParams[] = self::PARAM_MARGINS;
48
  $this->arrParams[] = self::PARAM_PADDING;
@@ -55,7 +59,7 @@ class UniteCreatorDialogParam extends UniteCreatorDialogParamWork{
55
  $this->arrParams[] = self::PARAM_BORDER_DIMENTIONS;
56
  $this->arrParams[] = self::PARAM_CSS_FILTERS;
57
  $this->arrParams[] = self::PARAM_HOVER_ANIMATIONS;
58
-
59
  $this->arrParams = $this->filterMainParams($this->arrParams);
60
  }
61
 
43
  $this->arrParams[] = self::PARAM_WOO_CATS;
44
  $this->arrParams[] = self::PARAM_USERS;
45
  $this->arrParams[] = self::PARAM_TEMPLATE;
46
+
47
+ if(GlobalsUC::$inDev == true)
48
+ $this->arrParams[] = self::PARAM_LISTING;
49
+
50
  $this->arrParams[] = self::PARAM_TYPOGRAPHY;
51
  $this->arrParams[] = self::PARAM_MARGINS;
52
  $this->arrParams[] = self::PARAM_PADDING;
59
  $this->arrParams[] = self::PARAM_BORDER_DIMENTIONS;
60
  $this->arrParams[] = self::PARAM_CSS_FILTERS;
61
  $this->arrParams[] = self::PARAM_HOVER_ANIMATIONS;
62
+
63
  $this->arrParams = $this->filterMainParams($this->arrParams);
64
  }
65
 
provider/provider_functions.class.php CHANGED
@@ -215,7 +215,7 @@ class UniteProviderFunctionsUC{
215
  $version = UNLIMITED_ELEMENTS_VERSION;
216
  if(GlobalsUC::$inDev == true)
217
  $version = time();
218
-
219
  wp_register_script($handle , $url, $deps, $version, $inFooter);
220
  wp_enqueue_script($handle);
221
  }
215
  $version = UNLIMITED_ELEMENTS_VERSION;
216
  if(GlobalsUC::$inDev == true)
217
  $version = time();
218
+
219
  wp_register_script($handle , $url, $deps, $version, $inFooter);
220
  wp_enqueue_script($handle);
221
  }
provider/provider_helper.class.php CHANGED
@@ -181,7 +181,7 @@ class HelperProviderUC{
181
  * modify memory limit setting
182
  */
183
  public static function modifyGeneralSettings_memoryLimit($objSettings){
184
-
185
  //modify memory limit
186
 
187
  $memoryLimit = ini_get('memory_limit');
181
  * modify memory limit setting
182
  */
183
  public static function modifyGeneralSettings_memoryLimit($objSettings){
184
+
185
  //modify memory limit
186
 
187
  $memoryLimit = ini_get('memory_limit');
provider/provider_params_processor.class.php CHANGED
@@ -243,6 +243,155 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
243
 
244
  protected function z_______________POSTS____________(){}
245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
 
247
  /**
248
  * get post category taxonomy
@@ -914,6 +1063,10 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
914
  $arrIDsOnSale = array();
915
  $arrRecentProducts = array();
916
  $arrIDsPopular = array();
 
 
 
 
917
 
918
  foreach($arrIncludeBy as $includeby){
919
 
@@ -1056,6 +1209,16 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1056
  }
1057
 
1058
  break;
 
 
 
 
 
 
 
 
 
 
1059
  }
1060
 
1061
  }
@@ -1072,6 +1235,23 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1072
  }
1073
 
1074
  if(!empty($arrIDsPopular)){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1075
 
1076
  //set order
1077
  $args["orderby"] = "post__in";
@@ -1080,10 +1260,9 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1080
  if($orderDir == "ASC")
1081
  $arrIDsPopular = array_reverse($arrIDsPopular);
1082
 
1083
- unset($args["order"]);
1084
-
1085
- $arrPostInIDs = $arrIDsPopular;
1086
  }
 
1087
 
1088
  if(!empty($arrPostInIDs))
1089
  $args["post__in"] = $arrPostInIDs;
@@ -1380,7 +1559,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1380
  private function getPostListData($value, $name, $processType, $param, $data){
1381
 
1382
  if($processType != self::PROCESS_TYPE_OUTPUT && $processType != self::PROCESS_TYPE_OUTPUT_BACK)
1383
- return(null);
1384
 
1385
  HelperUC::addDebug("getPostList values", $value);
1386
  HelperUC::addDebug("getPostList param", $param);
@@ -1388,7 +1567,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1388
  $source = UniteFunctionsUC::getVal($value, "{$name}_source");
1389
 
1390
  $arrPosts = array();
1391
-
1392
  switch($source){
1393
  case "manual":
1394
 
@@ -1439,15 +1618,41 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1439
  $arrImageSizes["desktop"] = $imageSize;
1440
  }
1441
 
 
1442
 
 
 
 
 
 
 
 
 
 
 
 
1443
  $arrData = array();
1444
  foreach($arrPosts as $post){
1445
 
1446
  $arrData[] = $this->getPostDataByObj($post, $arrPostAdditions, $arrImageSizes);
1447
  }
1448
-
1449
 
1450
- return($arrData);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1451
  }
1452
 
1453
  protected function z_______________FILTERS____________(){}
@@ -2086,7 +2291,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2086
  //special params
2087
  switch($type){
2088
  case UniteCreatorDialogParam::PARAM_POSTS_LIST:
2089
- $data[$name] = $this->getPostListData($value, $name, $processType, $param, $data);
2090
  break;
2091
  case UniteCreatorDialogParam::PARAM_POST_TERMS:
2092
  $data[$name] = $this->getWPTermsData($value, $name, $processType, $param);
243
 
244
  protected function z_______________POSTS____________(){}
245
 
246
+ /**
247
+ * get post ids from post meta
248
+ */
249
+ private function getPostListData_getIDsFromPostMeta($value, $name, $showDebugQuery){
250
+
251
+ $postIDs = UniteFunctionsUC::getVal($value, $name."_includeby_postmeta_postid");
252
+
253
+ $metaName = UniteFunctionsUC::getVal($value, $name."_includeby_postmeta_metafield");
254
+
255
+ $errorMessagePrefix = "Get post ids from meta error: ";
256
+
257
+ if(empty($metaName)){
258
+
259
+ if($showDebugQuery == true)
260
+ dmp($errorMessagePrefix." no meta field selected");
261
+
262
+ return(null);
263
+ }
264
+
265
+ if(!empty($postIDs)){
266
+ if(is_array($postIDs))
267
+ $postID = $postIDs[0];
268
+ else
269
+ $postID = $postIDs;
270
+ }
271
+ else{ //current post
272
+
273
+ $post = get_post();
274
+ if(empty($post)){
275
+
276
+ if($showDebugQuery == true)
277
+ dmp($errorMessagePrefix." no post found");
278
+ return(null);
279
+ }
280
+
281
+ $postID = $post->ID;
282
+ }
283
+
284
+ if(empty($postID)){
285
+
286
+ if($showDebugQuery == true)
287
+ dmp($errorMessagePrefix." no post found");
288
+
289
+ return(null);
290
+ }
291
+
292
+ //show the post title
293
+ if($showDebugQuery == true){
294
+
295
+ $post = get_post($postID);
296
+ $title = $post->post_title;
297
+ $postType = $post->post_type;
298
+
299
+ dmp("Getting post id's from meta fields from post: <b>$postID - $title ($postType) </b>");
300
+ }
301
+
302
+ $arrPostIDs = get_post_meta($postID, $metaName, true);
303
+
304
+ if(is_array($arrPostIDs) == false){
305
+ $arrPostIDs = explode(",", $arrPostIDs);
306
+ }
307
+
308
+ $isValidIDs = UniteFunctionsUC::isValidIDsArray($arrPostIDs);
309
+
310
+ if(empty($arrPostIDs) || $isValidIDs == false){
311
+
312
+ if($showDebugQuery){
313
+
314
+ $metaKeys = UniteFunctionsWPUC::getPostMetaKeys($postID, null, true);
315
+ if(empty($metaKeys))
316
+ $metaKeys = array();
317
+
318
+ dmp($errorMessagePrefix." no post ids found");
319
+
320
+ if(array_search($metaName, $metaKeys) === false){
321
+ dmp("maybe you intent to use one of those meta keys:");
322
+ dmp($metaKeys);
323
+ }
324
+ }
325
+
326
+ return(null);
327
+ }
328
+
329
+ if($showDebugQuery == true){
330
+ $strPosts = implode(",", $arrPostIDs);
331
+ dmp("Found post ids : $strPosts");
332
+ }
333
+
334
+ return($arrPostIDs);
335
+ }
336
+
337
+
338
+ /**
339
+ * get post ids from php function
340
+ */
341
+ private function getPostListData_getIDsFromPHPFunction($value, $name, $showDebugQuery){
342
+
343
+ $functionName = UniteFunctionsUC::getVal($value, $name."_includeby_function_name");
344
+
345
+ $errorTextPrefix = "get post id's by PHP Function error: ";
346
+
347
+ if(empty($functionName)){
348
+
349
+ if($showDebugQuery)
350
+ dmp($errorTextPrefix."no functon name given");
351
+
352
+ return(null);
353
+ }
354
+
355
+ if(is_string($functionName) == false)
356
+ return(false);
357
+
358
+ if(strpos($functionName, "get") !== 0){
359
+
360
+ if($showDebugQuery)
361
+ dmp($errorTextPrefix."function <b>$functionName</b> should start with 'get'. like getMyPersonalPosts()");
362
+
363
+ return(null);
364
+ }
365
+
366
+ if(function_exists($functionName) == false){
367
+
368
+ if($showDebugQuery)
369
+ dmp($errorTextPrefix."function <b>$functionName</b> not exists.");
370
+
371
+ return(null);
372
+ }
373
+
374
+ $argument = UniteFunctionsUC::getVal($value, $name."_includeby_function_addparam");
375
+
376
+ $arrIDs = call_user_func_array($functionName, array($argument));
377
+
378
+ $isValid = UniteFunctionsUC::isValidIDsArray($arrIDs);
379
+
380
+ if($isValid == false){
381
+
382
+ if($showDebugQuery)
383
+ dmp($errorTextPrefix."function <b>$functionName</b> returns invalid id's array.");
384
+
385
+ return(null);
386
+ }
387
+
388
+ if($showDebugQuery == true){
389
+ dmp("php function <b>$functionName(\"$argument\")</b> output: ");
390
+ dmp($arrIDs);
391
+ }
392
+
393
+ return($arrIDs);
394
+ }
395
 
396
  /**
397
  * get post category taxonomy
1063
  $arrIDsOnSale = array();
1064
  $arrRecentProducts = array();
1065
  $arrIDsPopular = array();
1066
+ $arrIDsPHPFunction = array();
1067
+ $arrIDsPostMeta = array();
1068
+
1069
+ $makePostINOrder = false;
1070
 
1071
  foreach($arrIncludeBy as $includeby){
1072
 
1209
  }
1210
 
1211
  break;
1212
+ case "php_function":
1213
+
1214
+ $arrIDsPHPFunction = $this->getPostListData_getIDsFromPHPFunction($value, $name, $showDebugQuery);
1215
+
1216
+ break;
1217
+ case "ids_from_meta":
1218
+
1219
+ $arrIDsPostMeta = $this->getPostListData_getIDsFromPostMeta($value, $name, $showDebugQuery);
1220
+
1221
+ break;
1222
  }
1223
 
1224
  }
1235
  }
1236
 
1237
  if(!empty($arrIDsPopular)){
1238
+ $makePostINOrder = true;
1239
+ $arrPostInIDs = $arrIDsPopular;
1240
+ }
1241
+
1242
+ if(!empty($arrIDsPHPFunction)){
1243
+ $arrPostInIDs = $arrIDsPHPFunction;
1244
+ $makePostINOrder = true;
1245
+ }
1246
+
1247
+ if(!empty($arrIDsPostMeta)){
1248
+ $arrPostInIDs = $arrIDsPostMeta;
1249
+ $makePostINOrder = true;
1250
+ }
1251
+
1252
+ //make order as "post__id"
1253
+
1254
+ if($makePostINOrder == true){
1255
 
1256
  //set order
1257
  $args["orderby"] = "post__in";
1260
  if($orderDir == "ASC")
1261
  $arrIDsPopular = array_reverse($arrIDsPopular);
1262
 
1263
+ unset($args["order"]);
 
 
1264
  }
1265
+
1266
 
1267
  if(!empty($arrPostInIDs))
1268
  $args["post__in"] = $arrPostInIDs;
1559
  private function getPostListData($value, $name, $processType, $param, $data){
1560
 
1561
  if($processType != self::PROCESS_TYPE_OUTPUT && $processType != self::PROCESS_TYPE_OUTPUT_BACK)
1562
+ return($data);
1563
 
1564
  HelperUC::addDebug("getPostList values", $value);
1565
  HelperUC::addDebug("getPostList param", $param);
1567
  $source = UniteFunctionsUC::getVal($value, "{$name}_source");
1568
 
1569
  $arrPosts = array();
1570
+
1571
  switch($source){
1572
  case "manual":
1573
 
1618
  $arrImageSizes["desktop"] = $imageSize;
1619
  }
1620
 
1621
+ //prepare listing output. no items prepare for the listing
1622
 
1623
+ $useForListing = UniteFunctionsUC::getVal($param, "use_for_listing");
1624
+ $useForListing = UniteFunctionsUC::strToBool($useForListing);
1625
+
1626
+ if($useForListing == true){
1627
+ $arrData = $arrPosts;
1628
+
1629
+ $data[$name] = $arrData;
1630
+
1631
+ return($data);
1632
+ }
1633
+
1634
  $arrData = array();
1635
  foreach($arrPosts as $post){
1636
 
1637
  $arrData[] = $this->getPostDataByObj($post, $arrPostAdditions, $arrImageSizes);
1638
  }
 
1639
 
1640
+ $data[$name] = $arrData;
1641
+
1642
+ //add filterable params like uc_listing_addclass, uc_listing_attributes
1643
+
1644
+ $isFilterable = UniteFunctionsUC::getVal($value, $name."_filterable");
1645
+ $isFilterable = ($isFilterable == "using_widget");
1646
+
1647
+ if($isFilterable == true){
1648
+
1649
+ $objFilters = new UniteCreatorFiltersProcess();
1650
+ $data = $objFilters->addWidgetFilterableVariables($data);
1651
+ }
1652
+
1653
+
1654
+
1655
+ return($data);
1656
  }
1657
 
1658
  protected function z_______________FILTERS____________(){}
2291
  //special params
2292
  switch($type){
2293
  case UniteCreatorDialogParam::PARAM_POSTS_LIST:
2294
+ $data = $this->getPostListData($value, $name, $processType, $param, $data);
2295
  break;
2296
  case UniteCreatorDialogParam::PARAM_POST_TERMS:
2297
  $data[$name] = $this->getWPTermsData($value, $name, $processType, $param);
provider/provider_settings.class.php CHANGED
@@ -363,8 +363,15 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
363
  */
364
  protected function addPostTermsPicker($name, $value, $title, $extra){
365
 
 
 
 
 
366
  $arrPostTypesWithTax = UniteFunctionsWPUC::getPostTypesWithTaxomonies(GlobalsProviderUC::$arrFilterPostTypes, false);
367
 
 
 
 
368
  $taxData = $this->addPostTermsPicker_getArrTaxonomies($arrPostTypesWithTax);
369
 
370
  $arrPostTypesTaxonomies = $taxData["post_type_tax"];
@@ -408,14 +415,17 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
408
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
409
 
410
  $arrTax = UniteFunctionsUC::getVal($arrPostTypesTaxonomies, $postType, array());
411
-
412
  if(!empty($arrTax))
413
  $arrTax = array_flip($arrTax);
414
 
415
  $taxonomy = UniteFunctionsUC::getVal($value, $name."_taxonomy");
416
  if(empty($taxonomy))
417
  $taxonomy = UniteFunctionsUC::getArrFirstValue($arrTax);
418
-
 
 
 
419
  $this->addSelect($name."_taxonomy", $arrTaxonomiesSimple, __("Select Taxonomy", "unlimited-elements-for-elementor"), $taxonomy, $params);
420
 
421
  // --------- add include by -------------
@@ -428,6 +438,7 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
428
  $arrIncludeBy["no_parent"] = __("Not a Child of Other Term","unlimited-elements-for-elementor");
429
  $arrIncludeBy["meta"] = __("Term Meta","unlimited-elements-for-elementor");
430
 
 
431
  $arrIncludeBy = array_flip($arrIncludeBy);
432
 
433
  $params = array();
@@ -435,7 +446,8 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
435
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
436
 
437
  $this->addMultiSelect($name."_includeby", $arrIncludeBy, esc_html__("Include By", "unlimited-elements-for-elementor"), "", $params);
438
-
 
439
  // --------- include by meta key -------------
440
 
441
  $params = array();
@@ -1220,6 +1232,8 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1220
 
1221
  $arrIncludeBy["meta"] = __("Post Meta", "unlimited-elements-for-elementor");
1222
  $arrIncludeBy["most_viewed"] = __("Most Viewed", "unlimited-elements-for-elementor");
 
 
1223
 
1224
 
1225
  if($isForWooProducts == true){
@@ -1369,6 +1383,48 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1369
 
1370
  $this->addTextBox($name."_includeby_metavalue", "", esc_html__("Include by Meta Value", "unlimited-elements-for-elementor"), $params);
1371
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1372
  // --------- include by most viewed -------------
1373
 
1374
  $isWPPExists = UniteCreatorPluginIntegrations::isWPPopularPostsExists();
@@ -1743,5 +1799,19 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1743
  }
1744
 
1745
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1746
 
1747
  }
363
  */
364
  protected function addPostTermsPicker($name, $value, $title, $extra){
365
 
366
+
367
+ $isForWooCommerce = UniteFunctionsUC::getVal($extra, "for_woocommerce");
368
+ $isForWooCommerce = UniteFunctionsUC::strToBool($isForWooCommerce);
369
+
370
  $arrPostTypesWithTax = UniteFunctionsWPUC::getPostTypesWithTaxomonies(GlobalsProviderUC::$arrFilterPostTypes, false);
371
 
372
+ if($isForWooCommerce == true)
373
+ $arrPostTypesWithTax = array("product" => $arrPostTypesWithTax["product"]);
374
+
375
  $taxData = $this->addPostTermsPicker_getArrTaxonomies($arrPostTypesWithTax);
376
 
377
  $arrPostTypesTaxonomies = $taxData["post_type_tax"];
415
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
416
 
417
  $arrTax = UniteFunctionsUC::getVal($arrPostTypesTaxonomies, $postType, array());
418
+
419
  if(!empty($arrTax))
420
  $arrTax = array_flip($arrTax);
421
 
422
  $taxonomy = UniteFunctionsUC::getVal($value, $name."_taxonomy");
423
  if(empty($taxonomy))
424
  $taxonomy = UniteFunctionsUC::getArrFirstValue($arrTax);
425
+
426
+ if($isForWooCommerce)
427
+ $taxonomy = "product_cat";
428
+
429
  $this->addSelect($name."_taxonomy", $arrTaxonomiesSimple, __("Select Taxonomy", "unlimited-elements-for-elementor"), $taxonomy, $params);
430
 
431
  // --------- add include by -------------
438
  $arrIncludeBy["no_parent"] = __("Not a Child of Other Term","unlimited-elements-for-elementor");
439
  $arrIncludeBy["meta"] = __("Term Meta","unlimited-elements-for-elementor");
440
 
441
+
442
  $arrIncludeBy = array_flip($arrIncludeBy);
443
 
444
  $params = array();
446
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
447
 
448
  $this->addMultiSelect($name."_includeby", $arrIncludeBy, esc_html__("Include By", "unlimited-elements-for-elementor"), "", $params);
449
+
450
+
451
  // --------- include by meta key -------------
452
 
453
  $params = array();
1232
 
1233
  $arrIncludeBy["meta"] = __("Post Meta", "unlimited-elements-for-elementor");
1234
  $arrIncludeBy["most_viewed"] = __("Most Viewed", "unlimited-elements-for-elementor");
1235
+ $arrIncludeBy["php_function"] = __("IDs from PHP function","unlimited-elements-for-elementor");
1236
+ $arrIncludeBy["ids_from_meta"] = __("IDs from Post Meta","unlimited-elements-for-elementor");
1237
 
1238
 
1239
  if($isForWooProducts == true){
1383
 
1384
  $this->addTextBox($name."_includeby_metavalue", "", esc_html__("Include by Meta Value", "unlimited-elements-for-elementor"), $params);
1385
 
1386
+ // --------- include by PHP Function -------------
1387
+
1388
+ $arrConditionIncludeFunction = $arrConditionIncludeBy;
1389
+ $arrConditionIncludeFunction[$name."_includeby"] = "php_function";
1390
+
1391
+
1392
+ $params = array();
1393
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1394
+ $params["placeholder"] = __("getMyIDs","unlimited-elements-for-elementor");
1395
+ $params["description"] = __("Get post id's array from php function. \n For example: function getMyIDs(\$arg){return(array(\"32\",\"58\")). This function MUST begin with 'get'. }");
1396
+ $params["elementor_condition"] = $arrConditionIncludeFunction;
1397
+
1398
+ $this->addTextBox($name."_includeby_function_name", "", esc_html__("PHP Function Name", "unlimited-elements-for-elementor"), $params);
1399
+
1400
+ // --------- include by PHP Function Add Parameter-------------
1401
+
1402
+ $params = array();
1403
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1404
+ $params["placeholder"] = __("yourtext","unlimited-elements-for-elementor");
1405
+ $params["description"] = __("Optional. Some argument to be passed to this function. For some \"IF\" statement.","unlimited-elements-for-elementor");
1406
+ $params["elementor_condition"] = $arrConditionIncludeFunction;
1407
+
1408
+ $this->addTextBox($name."_includeby_function_addparam", "", esc_html__("PHP Function Argument", "unlimited-elements-for-elementor"), $params);
1409
+
1410
+ // --------- include by id's from meta -------------
1411
+
1412
+ $textIDsFromMeta = __("Select Post (leave empty for current post)","unlimited-elements-for-elementor");
1413
+ $arrConditionIncludePostMeta = $arrConditionIncludeBy;
1414
+ $arrConditionIncludePostMeta[$name."_includeby"] = "ids_from_meta";
1415
+
1416
+ $this->addPostIDSelect($name."_includeby_postmeta_postid", $textIDsFromMeta, $arrConditionIncludePostMeta, false,"data-issingle='true'");
1417
+
1418
+ // --------- include by id's from meta field name -------------
1419
+
1420
+ $params = array();
1421
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1422
+ $params["description"] = __("Choose meta field name that has the post id's on it. Good for acf relationship for example","unlimited-elements-for-elementor");
1423
+ $params["elementor_condition"] = $arrConditionIncludePostMeta;
1424
+
1425
+ $this->addTextBox($name."_includeby_postmeta_metafield", "", esc_html__("Meta Field Name", "unlimited-elements-for-elementor"), $params);
1426
+
1427
+
1428
  // --------- include by most viewed -------------
1429
 
1430
  $isWPPExists = UniteCreatorPluginIntegrations::isWPPopularPostsExists();
1799
  }
1800
 
1801
 
1802
+ /**
1803
+ * add listing picker, function for override
1804
+ */
1805
+ protected function addListingPicker($name,$value,$title,$extra){
1806
+
1807
+ $params = array();
1808
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1809
+
1810
+ $this->addTextBox($name."_type", "listing", "put listing here", $params);
1811
+
1812
+
1813
+ }
1814
+
1815
+
1816
 
1817
  }
provider/provider_template_engine.class.php CHANGED
@@ -167,7 +167,6 @@ class UniteCreatorTemplateEngine extends UniteCreatorTemplateEngineWork{
167
  echo UniteProviderFunctionsUC::escCombinedHtml($htmlTags);
168
  }
169
 
170
-
171
 
172
  /**
173
  * add extra functions to twig
167
  echo UniteProviderFunctionsUC::escCombinedHtml($htmlTags);
168
  }
169
 
 
170
 
171
  /**
172
  * add extra functions to twig
provider/woocommerce_integrate.class.php CHANGED
@@ -298,6 +298,14 @@ class UniteCreatorWooIntegrate{
298
  $arrProduct["woo_".$propertyName] = $value;
299
  }
300
 
 
 
 
 
 
 
 
 
301
  //add prices of variations
302
 
303
  if($type == self::PRODUCT_TYPE_VARIABLE){
@@ -328,7 +336,8 @@ class UniteCreatorWooIntegrate{
328
  //add currency
329
  $arrProduct["woo_currency"] = $this->currency;
330
  $arrProduct["woo_currency_symbol"] = $this->currencySymbol;
331
-
 
332
  //put add to cart link
333
  $arrProduct = $this->addAddToCartData($arrProduct, $productID, $productSku);
334
 
@@ -348,7 +357,8 @@ class UniteCreatorWooIntegrate{
348
 
349
  $arrKeys += $arrProperties;
350
 
351
- $arrKeys[] = "woo_discount_percent";
 
352
  $arrKeys[] = "woo_currency";
353
  $arrKeys[] = "woo_currency_symbol";
354
  $arrKeys[] = "woo_link_addcart_cart";
298
  $arrProduct["woo_".$propertyName] = $value;
299
  }
300
 
301
+ //make the rating stars array
302
+ $arrWooStars = array();
303
+ $rating = UniteFunctionsUC::getVal($arrData, "average_rating");
304
+ $rating = floatval($rating);
305
+
306
+ $arrWooStars = HelperHtmlUC::getRatingArray($rating);
307
+ $arrProduct["woo_rating_stars"] = $arrWooStars;
308
+
309
  //add prices of variations
310
 
311
  if($type == self::PRODUCT_TYPE_VARIABLE){
336
  //add currency
337
  $arrProduct["woo_currency"] = $this->currency;
338
  $arrProduct["woo_currency_symbol"] = $this->currencySymbol;
339
+
340
+
341
  //put add to cart link
342
  $arrProduct = $this->addAddToCartData($arrProduct, $productID, $productSku);
343
 
357
 
358
  $arrKeys += $arrProperties;
359
 
360
+ $arrKeys[] = "woo_rating_stars";
361
+ $arrKeys[] = "woo_discount_percent";
362
  $arrKeys[] = "woo_currency";
363
  $arrKeys[] = "woo_currency_symbol";
364
  $arrKeys[] = "woo_link_addcart_cart";
readme.txt CHANGED
@@ -521,6 +521,25 @@ Note : This plugin works with Elementor. Make sure you have [Elementor](https://
521
 
522
  == Changelog ==
523
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  version 1.4.70 = 2021-04-14
525
 
526
  * Feature: added show widget data debug options
521
 
522
  == Changelog ==
523
 
524
+ version 1.4.72 = 2021-05-02
525
+
526
+ * Feature: added rating stars helper placeholder for woocommerce
527
+ * Feature: added option to include js file after elementor-frontend
528
+ * Fix: fixed new typography deprecation message
529
+
530
+
531
+ version 1.4.71 = 2021-04-22
532
+
533
+ * Feature: added option to take post id's from php function in post selection
534
+ * Feature: added option for get posts by meta field that located in current or different post
535
+ * Feature: added twig filter: wc_price for native price filtering
536
+ * Feature: added post terms titles to post data debug
537
+ * Change: added option for woocommerce categories in terms selection
538
+ * Fix: fixed price issues in woocommerce related grids
539
+ * Fix: fixed include and exclude terms mismatch with nested tax query
540
+ * Fix: fixed pagination on search pages
541
+
542
+
543
  version 1.4.70 = 2021-04-14
544
 
545
  * Feature: added show widget data debug options
release_log.txt CHANGED
@@ -1,5 +1,25 @@
1
 
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  version 1.4.70
4
 
5
  -bug fix: when bulk moving attribute it now always goes to general category
1
 
2
 
3
+ version 1.4.72
4
+
5
+ -feature: added rating stars helper placeholder for woocommerce
6
+ -feature: added option to include js file after elementor-frontend
7
+ -bug fix: fixed new typography deprecation message
8
+
9
+
10
+ version 1.4.71
11
+
12
+ -change: added option for woocommerce categories in terms selection
13
+ -feature: added option to take post id's from php function in post selection
14
+ -bug fix: fixed price issues in woocommerce related grids
15
+ -feature: added option for get posts by meta field that located in current or different post
16
+ -feature: added twig filter: wc_price for native price filtering
17
+ -feature: added post terms titles to post data debug
18
+ -bug fix: fixed include and exclude terms mismatch with nested tax query
19
+ -bug fix: fixed pagination on search pages
20
+
21
+
22
+
23
  version 1.4.70
24
 
25
  -bug fix: when bulk moving attribute it now always goes to general category
unlimited_elements.php CHANGED
@@ -4,12 +4,12 @@ Plugin Name: Unlimited Elements for Elementor
4
  Plugin URI: http://unlimited-elements.com
5
  Description: Unlimited Elements - Huge Widgets Pack for Elementor Page Builder, with html/css/js widget creator and editor
6
  Author: Unlimited Elements
7
- Version: 1.4.70
8
  Author URI: http://unlimited-elements.com
9
  Text Domain: unlimited-elements-for-elementor
10
  Domain Path: /languages
11
- Elementor tested up to: 3.1.4
12
- Elementor Pro tested up to: 3.2.1
13
  */
14
 
15
  if(!defined("UNLIMITED_ELEMENTS_INC"))
4
  Plugin URI: http://unlimited-elements.com
5
  Description: Unlimited Elements - Huge Widgets Pack for Elementor Page Builder, with html/css/js widget creator and editor
6
  Author: Unlimited Elements
7
+ Version: 1.4.72
8
  Author URI: http://unlimited-elements.com
9
  Text Domain: unlimited-elements-for-elementor
10
  Domain Path: /languages
11
+ Elementor tested up to: 3.2.2
12
+ Elementor Pro tested up to: 3.2.2
13
  */
14
 
15
  if(!defined("UNLIMITED_ELEMENTS_INC"))
views/objects/addon_view.class.php CHANGED
@@ -610,6 +610,16 @@ class UniteCreatorAddonView{
610
  </span>
611
 
612
  <?php HelperHtmlUC::putDialogControlFieldsNotice() ?>
 
 
 
 
 
 
 
 
 
 
613
  </div>
614
  </div>
615
 
610
  </span>
611
 
612
  <?php HelperHtmlUC::putDialogControlFieldsNotice() ?>
613
+
614
+ <div class="vert_sap10"></div>
615
+
616
+ <label>
617
+ <input id="uc_dialog_include_after_elementor_frontend" type="checkbox" name="include_after_elementor_frontend">
618
+ &nbsp;
619
+ <?php _e("Include after elementor-frontend.js", "unlimited-elements-for-elementor")?>
620
+
621
+ </label>
622
+
623
  </div>
624
  </div>
625
 
views/objects/addon_view_childparams.class.php CHANGED
@@ -813,15 +813,30 @@ jQuery(document).ready(function(){
813
 
814
  $arrParams[] = $this->createWooPostParam_getChildProducts();
815
 
816
- //dmp($arrKeys);exit();
817
-
818
- foreach($arrKeys as $key){
819
- $arrParams[] = $this->createChildParam($key);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
820
  }
821
 
822
  return($arrParams);
823
  }
824
 
 
825
  /**
826
  * add woo commerce post param without post id
827
  */
813
 
814
  $arrParams[] = $this->createWooPostParam_getChildProducts();
815
 
816
+ foreach($arrKeys as $key){
817
+
818
+ switch($key){
819
+ case "woo_sale_price":
820
+ case "woo_regular_price":
821
+ case "woo_price":
822
+ case "woo_price_to":
823
+ case "woo_price_from":
824
+ case "woo_sale_price_to":
825
+ case "woo_sale_price_from":
826
+ case "woo_regular_price_from":
827
+ case "woo_regular_price_to":
828
+ $arrParams[] = $this->createChildParam($key,null,array("raw_insert_text"=>"{{[param_name]|wc_price|raw}}"));
829
+ break;
830
+ default:
831
+ $arrParams[] = $this->createChildParam($key);
832
+ break;
833
+ }
834
  }
835
 
836
  return($arrParams);
837
  }
838
 
839
+
840
  /**
841
  * add woo commerce post param without post id
842
  */