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

Version Description

Download this release

Release Info

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

Code changes from version 1.4.68 to 1.4.69

inc_php/unitecreator_addon.class.php CHANGED
@@ -2064,6 +2064,78 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
2064
  return($arrAddon);
2065
  }
2066
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2067
  private function a__________SETTERS________(){}
2068
 
2069
  /**
@@ -2136,71 +2208,6 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
2136
  }
2137
 
2138
 
2139
- /**
2140
- * set responsive param values from another fields if available
2141
- */
2142
- private function setResponsiveParamValues($param, $name, $arrValues){
2143
-
2144
- //dmp($arrValues);
2145
-
2146
- $isResponsive = UniteFunctionsUC::getVal($param, "is_responsive");
2147
- $isResponsive = UniteFunctionsUC::strToBool($isResponsive);
2148
-
2149
- if($isResponsive == false)
2150
- return($param);
2151
-
2152
- if(isset($arrValues[$name."_tablet"]) == false)
2153
- return($param);
2154
-
2155
- $defaultValueTablet = UniteFunctionsUC::getVal($param, "default_value_tablet");
2156
- $defaultValueMobile = UniteFunctionsUC::getVal($param, "default_value_mobile");
2157
-
2158
- $param["value_tablet"] = UniteFunctionsUC::getVal($arrValues, $name."_tablet", $defaultValueTablet);
2159
- $param["value_mobile"] = UniteFunctionsUC::getVal($arrValues, $name."_mobile", $defaultValueMobile);
2160
-
2161
- return($param);
2162
- }
2163
-
2164
- /**
2165
- * set params values work
2166
- * type: main,items
2167
- */
2168
- private function setParamsValuesWork($arrValues, $arrParams, $type){
2169
-
2170
- $this->validateInited();
2171
-
2172
- if(empty($arrValues))
2173
- return($arrParams);
2174
-
2175
- if(!is_array($arrValues))
2176
- UniteFunctionsUC::throwError("The values shoud be array");
2177
-
2178
- foreach($arrParams as $key => $param){
2179
-
2180
- $name = UniteFunctionsUC::getVal($param, "name");
2181
-
2182
- if(empty($name))
2183
- continue;
2184
-
2185
- $defaultValue = UniteFunctionsUC::getVal($param, "default_value");
2186
-
2187
- $type = UniteFunctionsUC::getVal($param, "type");
2188
-
2189
- $value = UniteFunctionsUC::getVal($arrValues, $name, $defaultValue);
2190
-
2191
- $value = $this->objProcessor->getSpecialParamValue($type, $name, $value, $arrValues);
2192
-
2193
- $param["value"] = $value;
2194
-
2195
- $param = $this->setResponsiveParamValues($param, $name, $arrValues);
2196
-
2197
- //set responsive values
2198
- $arrParams[$key] = $param;
2199
-
2200
- }
2201
-
2202
- return($arrParams);
2203
- }
2204
 
2205
 
2206
  /**
2064
  return($arrAddon);
2065
  }
2066
 
2067
+ private function a__________SET_PARAM_VALUES________(){}
2068
+
2069
+ /**
2070
+ * set responsive param values from another fields if available
2071
+ */
2072
+ private function setResponsiveParamValues($param, $name, $arrValues){
2073
+
2074
+ //dmp($arrValues);
2075
+
2076
+ $isResponsive = UniteFunctionsUC::getVal($param, "is_responsive");
2077
+ $isResponsive = UniteFunctionsUC::strToBool($isResponsive);
2078
+
2079
+ if($isResponsive == false)
2080
+ return($param);
2081
+
2082
+ if(isset($arrValues[$name."_tablet"]) == false)
2083
+ return($param);
2084
+
2085
+ $defaultValueTablet = UniteFunctionsUC::getVal($param, "default_value_tablet");
2086
+ $defaultValueMobile = UniteFunctionsUC::getVal($param, "default_value_mobile");
2087
+
2088
+ $param["value_tablet"] = UniteFunctionsUC::getVal($arrValues, $name."_tablet", $defaultValueTablet);
2089
+ $param["value_mobile"] = UniteFunctionsUC::getVal($arrValues, $name."_mobile", $defaultValueMobile);
2090
+
2091
+ return($param);
2092
+ }
2093
+
2094
+
2095
+ /**
2096
+ * set params values work
2097
+ * type: main,items
2098
+ */
2099
+ private function setParamsValuesWork($arrValues, $arrParams, $type){
2100
+
2101
+ $this->validateInited();
2102
+
2103
+ if(empty($arrValues))
2104
+ return($arrParams);
2105
+
2106
+ if(!is_array($arrValues))
2107
+ UniteFunctionsUC::throwError("The values shoud be array");
2108
+
2109
+ foreach($arrParams as $key => $param){
2110
+
2111
+ $name = UniteFunctionsUC::getVal($param, "name");
2112
+
2113
+ if(empty($name))
2114
+ continue;
2115
+
2116
+ $defaultValue = UniteFunctionsUC::getVal($param, "default_value");
2117
+
2118
+ $type = UniteFunctionsUC::getVal($param, "type");
2119
+
2120
+ $value = UniteFunctionsUC::getVal($arrValues, $name, $defaultValue);
2121
+
2122
+ $value = $this->objProcessor->getSpecialParamValue($type, $name, $value, $arrValues);
2123
+
2124
+ $param["value"] = $value;
2125
+
2126
+ $param = $this->setResponsiveParamValues($param, $name, $arrValues);
2127
+
2128
+ $param = $this->objProcessor->setExtraParamsValues($type, $param, $name, $arrValues);
2129
+
2130
+ //set responsive values
2131
+ $arrParams[$key] = $param;
2132
+
2133
+ }
2134
+
2135
+ return($arrParams);
2136
+ }
2137
+
2138
+
2139
  private function a__________SETTERS________(){}
2140
 
2141
  /**
2208
  }
2209
 
2210
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2211
 
2212
 
2213
  /**
inc_php/unitecreator_client_text.php CHANGED
@@ -103,7 +103,7 @@ GlobalsUC::$arrClientSideText = array(
103
  "uc_datetime"=>esc_html__("Date Time","unlimited-elements-for-elementor"),
104
  "uc_textshadow"=>esc_html__("Text Shadow","unlimited-elements-for-elementor"),
105
  "uc_boxshadow"=>esc_html__("Box Shadow","unlimited-elements-for-elementor"),
106
- "uc_border_dimentions"=>esc_html__("Border Dimensions","unlimited-elements-for-elementor"),
107
  "uc_css_filters"=>esc_html__("Css Filters","unlimited-elements-for-elementor"),
108
  "uc_hover_animations"=>esc_html__("Hover Animations","unlimited-elements-for-elementor"),
109
 
103
  "uc_datetime"=>esc_html__("Date Time","unlimited-elements-for-elementor"),
104
  "uc_textshadow"=>esc_html__("Text Shadow","unlimited-elements-for-elementor"),
105
  "uc_boxshadow"=>esc_html__("Box Shadow","unlimited-elements-for-elementor"),
106
+ "uc_border_dimentions"=>esc_html__("Border Radius","unlimited-elements-for-elementor"),
107
  "uc_css_filters"=>esc_html__("Css Filters","unlimited-elements-for-elementor"),
108
  "uc_hover_animations"=>esc_html__("Hover Animations","unlimited-elements-for-elementor"),
109
 
inc_php/unitecreator_dialog_param.class.php CHANGED
@@ -208,7 +208,7 @@ class UniteCreatorDialogParamWork{
208
  $this->addParam(self::PARAM_SLIDER, esc_html__("Slider", "unlimited-elements-for-elementor"));
209
  $this->addParam(self::PARAM_DATETIME, esc_html__("Date Time", "unlimited-elements-for-elementor"));
210
 
211
- $this->addParam(self::PARAM_BORDER_DIMENTIONS, esc_html__("Border Dimensions", "unlimited-elements-for-elementor"));
212
  $this->addParam(self::PARAM_CSS_FILTERS, esc_html__("Css Filters", "unlimited-elements-for-elementor"));
213
  $this->addParam(self::PARAM_HOVER_ANIMATIONS, esc_html__("Hover Animations", "unlimited-elements-for-elementor"));
214
 
@@ -551,12 +551,15 @@ class UniteCreatorDialogParamWork{
551
  private function putImageParam(){
552
 
553
  ?>
554
-
555
  <div class="unite-inputs-sap"></div>
556
 
557
  <?php $this->putImageSelectInput("default_value",esc_html__("Default Image","unlimited-elements-for-elementor")); ?>
558
 
559
- <?php
 
 
 
 
560
  }
561
 
562
 
208
  $this->addParam(self::PARAM_SLIDER, esc_html__("Slider", "unlimited-elements-for-elementor"));
209
  $this->addParam(self::PARAM_DATETIME, esc_html__("Date Time", "unlimited-elements-for-elementor"));
210
 
211
+ $this->addParam(self::PARAM_BORDER_DIMENTIONS, esc_html__("Border Radius", "unlimited-elements-for-elementor"));
212
  $this->addParam(self::PARAM_CSS_FILTERS, esc_html__("Css Filters", "unlimited-elements-for-elementor"));
213
  $this->addParam(self::PARAM_HOVER_ANIMATIONS, esc_html__("Hover Animations", "unlimited-elements-for-elementor"));
214
 
551
  private function putImageParam(){
552
 
553
  ?>
 
554
  <div class="unite-inputs-sap"></div>
555
 
556
  <?php $this->putImageSelectInput("default_value",esc_html__("Default Image","unlimited-elements-for-elementor")); ?>
557
 
558
+ <div class="unite-inputs-sap-double"></div>
559
+
560
+ <?php $this->putCheckbox("add_image_sizes", __("Add Image Size Select","unlimited-elements-for-elementor"))?>
561
+
562
+ <?php
563
  }
564
 
565
 
inc_php/unitecreator_helper.class.php CHANGED
@@ -720,6 +720,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
720
  }
721
 
722
 
 
723
  /**
724
  * get url handle
725
  */
720
  }
721
 
722
 
723
+
724
  /**
725
  * get url handle
726
  */
inc_php/unitecreator_helperhtml.class.php CHANGED
@@ -55,7 +55,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
55
  $selected = "";
56
  $default = trim($default);
57
  if(empty($default))
58
- $selected = " selected ";
59
 
60
  $itemText = $addDataText;
61
  if(empty($itemText))
@@ -69,11 +69,11 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
69
 
70
  if($assoc == false){
71
  if($item == $default)
72
- $selected = " selected ";
73
  }
74
  else{
75
  if(trim($key) == trim($default))
76
- $selected = " selected ";
77
  }
78
 
79
  $addHtml = "";
55
  $selected = "";
56
  $default = trim($default);
57
  if(empty($default))
58
+ $selected = " selected='selected' ";
59
 
60
  $itemText = $addDataText;
61
  if(empty($itemText))
69
 
70
  if($assoc == false){
71
  if($item == $default)
72
+ $selected = " selected='selected' ";
73
  }
74
  else{
75
  if(trim($key) == trim($default))
76
+ $selected = " selected='selected' ";
77
  }
78
 
79
  $addHtml = "";
inc_php/unitecreator_output.class.php CHANGED
@@ -495,7 +495,7 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
495
  /**
496
  * get width style
497
  */
498
- private function processParamCSSSelector_border_getWidthStyle($param, $device = "desktop"){
499
 
500
  $widthTop = UniteFunctionsUC::getVal($param, "width_{$device}_top");
501
  $widthRight = UniteFunctionsUC::getVal($param, "width_{$device}_right");
@@ -505,16 +505,16 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
505
  $style = "";
506
 
507
  if(trim($widthTop) !== "")
508
- $style .= "border-top-width:{$widthTop}px;";
509
 
510
  if(trim($widthBottom) !== "")
511
- $style .= "border-bottom-width:{$widthBottom}px;";
512
 
513
  if(trim($widthRight) !== "")
514
- $style .= "border-right-width:{$widthRight}px;";
515
 
516
  if(trim($widthLeft) !== "")
517
- $style .= "border-left-width:{$widthLeft}px;";
518
 
519
  return($style);
520
  }
@@ -543,12 +543,12 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
543
 
544
  $style .= "border-color:{$color};";
545
 
546
- $styleWidth = $this->processParamCSSSelector_border_getWidthStyle($param);
547
 
548
  $style .= $styleWidth;
549
  $css = "{$selector}{{$style}}";
550
 
551
- $styleTablet = $this->processParamCSSSelector_border_getWidthStyle($param, "tablet");
552
 
553
  if(!empty($styleTablet)){
554
 
@@ -558,7 +558,7 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
558
  $css .= "\n".$styleTablet;
559
  }
560
 
561
- $styleMobile = $this->processParamCSSSelector_border_getWidthStyle($param, "mobile");
562
 
563
  if(!empty($styleMobile)){
564
  $styleMobile = "{$selector}{{$styleMobile}}";
@@ -932,7 +932,7 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
932
  $style = $this->processParamCSSSelector_dimentions($param, $selector, "margin");
933
  break;
934
  case UniteCreatorDialogParam::PARAM_BORDER_DIMENTIONS:
935
- $style = $this->processParamCSSSelector_dimentions($param, $selector, "border-width");
936
  break;
937
  case UniteCreatorDialogParam::PARAM_BACKGROUND:
938
  $style = $this->processParamCSSSelector_background($param, $selector);
495
  /**
496
  * get width style
497
  */
498
+ private function processParamCSSSelector_border_getRadiusStyle($param, $device = "desktop"){
499
 
500
  $widthTop = UniteFunctionsUC::getVal($param, "width_{$device}_top");
501
  $widthRight = UniteFunctionsUC::getVal($param, "width_{$device}_right");
505
  $style = "";
506
 
507
  if(trim($widthTop) !== "")
508
+ $style .= "border-top-left-radius:{$widthTop}px;";
509
 
510
  if(trim($widthBottom) !== "")
511
+ $style .= "border-bottom-left-radius:{$widthBottom}px;";
512
 
513
  if(trim($widthRight) !== "")
514
+ $style .= "border-top-right-radius:{$widthRight}px;";
515
 
516
  if(trim($widthLeft) !== "")
517
+ $style .= "border-bottom-left-radius:{$widthLeft}px;";
518
 
519
  return($style);
520
  }
543
 
544
  $style .= "border-color:{$color};";
545
 
546
+ $styleWidth = $this->processParamCSSSelector_border_getRadiusStyle($param);
547
 
548
  $style .= $styleWidth;
549
  $css = "{$selector}{{$style}}";
550
 
551
+ $styleTablet = $this->processParamCSSSelector_border_getRadiusStyle($param, "tablet");
552
 
553
  if(!empty($styleTablet)){
554
 
558
  $css .= "\n".$styleTablet;
559
  }
560
 
561
+ $styleMobile = $this->processParamCSSSelector_border_getRadiusStyle($param, "mobile");
562
 
563
  if(!empty($styleMobile)){
564
  $styleMobile = "{$selector}{{$styleMobile}}";
932
  $style = $this->processParamCSSSelector_dimentions($param, $selector, "margin");
933
  break;
934
  case UniteCreatorDialogParam::PARAM_BORDER_DIMENTIONS:
935
+ $style = $this->processParamCSSSelector_dimentions($param, $selector, "border-radius");
936
  break;
937
  case UniteCreatorDialogParam::PARAM_BACKGROUND:
938
  $style = $this->processParamCSSSelector_background($param, $selector);
inc_php/unitecreator_params_processor.class.php CHANGED
@@ -705,7 +705,7 @@ class UniteCreatorParamsProcessorWork{
705
  * create param with full fields
706
  */
707
  protected function getImageFields($data, $name, $value){
708
-
709
  if(empty($data))
710
  $data = array();
711
 
@@ -720,13 +720,102 @@ class UniteCreatorParamsProcessorWork{
720
  return($data);
721
  }
722
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
723
 
724
  /**
725
  * process image param value, add to data
726
  * @param $param
727
  */
728
  protected function getProcessedParamsValue_image($data, $value, $param){
729
-
730
  $name = $param["name"];
731
 
732
  $urlImage = $value; //in case that the value is image id
@@ -738,25 +827,13 @@ class UniteCreatorParamsProcessorWork{
738
  $value = HelperUC::URLtoFull($value);
739
  $data[$name] = $value;
740
  }
741
-
742
- //add thumb
743
-
744
- $urlThumb = HelperUC::$operations->getThumbURLFromImageUrl($value, null, GlobalsUC::THUMB_SIZE_NORMAL);
745
- $urlThumb = HelperUC::URLtoFull($urlThumb);
746
-
747
- $data[$name."_thumb"] = $urlThumb;
748
-
749
- //add thumb large
750
-
751
- $urlThumb = HelperUC::$operations->getThumbURLFromImageUrl($value, null, GlobalsUC::THUMB_SIZE_LARGE);
752
- $urlThumb = HelperUC::URLtoFull($urlThumb);
753
-
754
- $data[$name."_thumb_large"] = $urlThumb;
755
 
756
  $data = $this->addOtherImageThumbs($data, $name, $value);
757
 
758
  $data = $this->addOtherImageData($data, $name, $value);
759
 
 
 
760
  return($data);
761
  }
762
 
@@ -1357,6 +1434,7 @@ class UniteCreatorParamsProcessorWork{
1357
  $data = $this->getProcessedParamsValue_responsive($data, $param);
1358
  break;
1359
  case UniteCreatorDialogParam::PARAM_IMAGE:
 
1360
  $data = $this->getProcessedParamsValue_image($data, $value, $param);
1361
 
1362
  break;
@@ -1425,11 +1503,11 @@ class UniteCreatorParamsProcessorWork{
1425
  public function getProcessedParamsValues($arrParams, $processType, $filterType = null){
1426
 
1427
  self::validateProcessType($processType);
1428
-
1429
  $arrParams = $this->processParamsForOutput($arrParams);
1430
 
1431
  $data = array();
1432
-
1433
  foreach($arrParams as $param){
1434
 
1435
  $type = UniteFunctionsUC::getVal($param, "type");
@@ -1457,9 +1535,10 @@ class UniteCreatorParamsProcessorWork{
1457
  if($type != "imagebase_fields")
1458
  $data[$name] = $value;
1459
 
 
1460
  $data = $this->getProcessedParamData($data, $value, $param, $processType);
1461
  }
1462
-
1463
  return($data);
1464
  }
1465
 
@@ -1510,7 +1589,7 @@ class UniteCreatorParamsProcessorWork{
1510
  $objParams = $this->sortMainParamsForOutput($objParams);
1511
 
1512
  $arrParams = $this->getProcessedParamsValues($objParams, $processType);
1513
-
1514
  $arrVars = $this->getMainVariablesProcessed($arrParams);
1515
 
1516
  if($this->isOutputProcessType($processType) == true){
705
  * create param with full fields
706
  */
707
  protected function getImageFields($data, $name, $value){
708
+
709
  if(empty($data))
710
  $data = array();
711
 
720
  return($data);
721
  }
722
 
723
+ /**
724
+ * get image key
725
+ */
726
+ private function addImageAttributes_getImageKey($paramName, $name, $param, $data){
727
+
728
+ $imageSize = null;
729
+
730
+ $chosenImageSize = UniteFunctionsUC::getVal($param, $paramName);
731
+ if(!empty($chosenImageSize))
732
+ $imageSize = $chosenImageSize;
733
+
734
+ if($imageSize == "full")
735
+ $imageSize = null;
736
+
737
+ $imageKey = $name;
738
+ switch($imageSize){
739
+ case "medium":
740
+ $imageKey = "{$name}_thumb";
741
+ break;
742
+ case "large":
743
+ $imageKey = "{$name}_thumb_large";
744
+ break;
745
+ default:
746
+ $imageKey = "{$name}_thumb_{$imageSize}";
747
+ break;
748
+ }
749
+
750
+ if(isset($data[$imageKey]) == false)
751
+ $imageKey = $name;
752
+
753
+ return($imageKey);
754
+ }
755
+
756
+ /**
757
+ * add image attributes
758
+ */
759
+ private function addImageAttributes($data, $name, $param){
760
+
761
+ $addImageSizes = UniteFunctionsUC::getVal($param, "add_image_sizes");
762
+ $addImageSizes = UniteFunctionsUC::strToBool($addImageSizes);
763
+
764
+ $imageKey = $name;
765
+
766
+ if($addImageSizes == true){
767
+ $imageKey = $this->addImageAttributes_getImageKey("value_size", $name, $param, $data);
768
+ }
769
+
770
+ $url = UniteFunctionsUC::getVal($data, $imageKey);
771
+ $width = UniteFunctionsUC::getVal($data, $imageKey."_width");
772
+ $height = UniteFunctionsUC::getVal($data, $imageKey."_height");
773
+
774
+ $attributes = "";
775
+
776
+ $attributes .= " src=\"{$url}\"";
777
+
778
+ //add alt
779
+
780
+ $alt = UniteFunctionsUC::getVal($data, "{$name}_alt");
781
+
782
+ if(!empty($alt)){
783
+
784
+ $alt = esc_attr($alt);
785
+ $attributes .= " alt=\"{$alt}\"";
786
+
787
+ }
788
+
789
+ $data[$name."_attributes_nosize"] = $attributes;
790
+
791
+ //add width and height
792
+
793
+ if(!empty($width)){
794
+ $attributes .= " width=\"$width\"";
795
+ $attributes .= " height=\"$height\"";
796
+ }
797
+
798
+ $data[$name."_attributes"] = $attributes;
799
+
800
+ //change the "image" to the given url
801
+ if($addImageSizes == true && !empty($url)){
802
+ $data[$name] = $url;
803
+ if(!empty($width)){
804
+ $data[$name."_width"] = $width;
805
+ $data[$name."_height"] = $height;
806
+ }
807
+ }
808
+
809
+
810
+ return($data);
811
+ }
812
 
813
  /**
814
  * process image param value, add to data
815
  * @param $param
816
  */
817
  protected function getProcessedParamsValue_image($data, $value, $param){
818
+
819
  $name = $param["name"];
820
 
821
  $urlImage = $value; //in case that the value is image id
827
  $value = HelperUC::URLtoFull($value);
828
  $data[$name] = $value;
829
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
830
 
831
  $data = $this->addOtherImageThumbs($data, $name, $value);
832
 
833
  $data = $this->addOtherImageData($data, $name, $value);
834
 
835
+ $data = $this->addImageAttributes($data, $name, $param);
836
+
837
  return($data);
838
  }
839
 
1434
  $data = $this->getProcessedParamsValue_responsive($data, $param);
1435
  break;
1436
  case UniteCreatorDialogParam::PARAM_IMAGE:
1437
+
1438
  $data = $this->getProcessedParamsValue_image($data, $value, $param);
1439
 
1440
  break;
1503
  public function getProcessedParamsValues($arrParams, $processType, $filterType = null){
1504
 
1505
  self::validateProcessType($processType);
1506
+
1507
  $arrParams = $this->processParamsForOutput($arrParams);
1508
 
1509
  $data = array();
1510
+
1511
  foreach($arrParams as $param){
1512
 
1513
  $type = UniteFunctionsUC::getVal($param, "type");
1535
  if($type != "imagebase_fields")
1536
  $data[$name] = $value;
1537
 
1538
+
1539
  $data = $this->getProcessedParamData($data, $value, $param, $processType);
1540
  }
1541
+
1542
  return($data);
1543
  }
1544
 
1589
  $objParams = $this->sortMainParamsForOutput($objParams);
1590
 
1591
  $arrParams = $this->getProcessedParamsValues($objParams, $processType);
1592
+
1593
  $arrVars = $this->getMainVariablesProcessed($arrParams);
1594
 
1595
  if($this->isOutputProcessType($processType) == true){
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.68");
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.69");
16
 
17
  $currentFile = __FILE__;
18
  $currentFolder = dirname($currentFile);
provider/core/plugins/unlimited_elements/dialog_param_elementor.class.php CHANGED
@@ -807,10 +807,15 @@ class UniteCreatorDialogParamElementor extends UniteCreatorDialogParam{
807
  protected function putHoverAnimations(){
808
 
809
  esc_html_e("Default Value", "unlimited-elements-for-elementor");
810
-
 
 
 
 
811
  ?>
812
  <div class="vert_sap5"></div>
813
- <input type="text" name="default_value">
 
814
 
815
  <div class="vert_sap10"></div>
816
 
807
  protected function putHoverAnimations(){
808
 
809
  esc_html_e("Default Value", "unlimited-elements-for-elementor");
810
+
811
+ $arrAnimations = HelperProviderCoreUC_EL::getHoverAnimationClasses();
812
+
813
+ $htmlSelect = HelperHtmlUC::getHTMLSelect($arrAnimations, "", "name='default_value'", true, "not_chosen");
814
+
815
  ?>
816
  <div class="vert_sap5"></div>
817
+
818
+ <?php echo $htmlSelect?>
819
 
820
  <div class="vert_sap10"></div>
821
 
provider/core/plugins/unlimited_elements/elementor/elementor_widget.class.php CHANGED
@@ -14,6 +14,7 @@ use Elementor\Group_Control_Css_Filter;
14
  use Elementor\Scheme_Typography;
15
  use Elementor\Core\Schemes;
16
  use Elementor\Repeater;
 
17
 
18
 
19
  class UniteCreatorElementorWidget extends Widget_Base {
@@ -353,6 +354,10 @@ class UniteCreatorElementorWidget extends Widget_Base {
353
 
354
  switch($type){
355
  case UniteCreatorDialogParam::PARAM_IMAGE:
 
 
 
 
356
  if(is_numeric($value))
357
  $value = array("id"=>$value);
358
  else
@@ -455,76 +460,6 @@ class UniteCreatorElementorWidget extends Widget_Base {
455
  'label' => esc_html__("Items", "unlimited-elements-for-elementor"),
456
  )
457
  );
458
-
459
-
460
- /*
461
- $repeater->add_control(
462
- 'price',
463
- [
464
- 'label' => __( 'Price', 'elementor-pro' ),
465
- 'type' => Controls_Manager::TEXT,
466
- 'dynamic' => [
467
- 'active' => true,
468
- ],
469
- ]
470
- );
471
-
472
- $repeater->add_control(
473
- 'title',
474
- [
475
- 'label' => __( 'Title', 'elementor-pro' ),
476
- 'type' => Controls_Manager::TEXT,
477
- 'default' => '',
478
- 'label_block' => 'true',
479
- 'dynamic' => [
480
- 'active' => true,
481
- ],
482
- ]
483
- );
484
-
485
- $repeater->add_control(
486
- 'item_number',
487
- [
488
- 'label' => __( 'Number', 'elementor-pro' ),
489
- 'type' => Controls_Manager::NUMBER,
490
- 'default' => '10',
491
- 'dynamic' => [
492
- 'active' => true,
493
- ],
494
- ]
495
- );
496
-
497
-
498
- $this->add_control(
499
- 'price_list',
500
- [
501
- 'label' => __( 'List Items', 'elementor-pro' ),
502
- 'type' => Controls_Manager::REPEATER,
503
- 'fields' => $repeater->get_controls(),
504
- 'default' => [
505
- [
506
- 'title' => __( 'First item on the list', 'elementor-pro' ),
507
- 'item_description' => __( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'elementor-pro' ),
508
- 'price' => '$20',
509
- 'link' => [ 'url' => '#' ],
510
- ],
511
- [
512
- 'title' => __( 'Second item on the list', 'elementor-pro' ),
513
- 'item_description' => __( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'elementor-pro' ),
514
- 'price' => '$9',
515
- 'link' => [ 'url' => '#' ],
516
- ],
517
- [
518
- 'title' => __( 'Third item on the list', 'elementor-pro' ),
519
- 'item_description' => __( 'Lorem ipsum dolor sit amet consectetur adipiscing elit dolor', 'elementor-pro' ),
520
- 'price' => '$32',
521
- 'link' => [ 'url' => '#' ],
522
- ],
523
- ],
524
- 'title_field' => '{{{ title }}}',
525
- ]
526
- );
527
- */
528
 
529
  $repeater = new Repeater();
530
 
@@ -757,9 +692,8 @@ class UniteCreatorElementorWidget extends Widget_Base {
757
  $controlType = Group_Control_Css_Filter::get_type();
758
  break;
759
  case UniteCreatorDialogParam::PARAM_HOVER_ANIMATIONS:
760
- $controlType = Controls_Manager::HOVER_ANIMATION;
761
  break;
762
-
763
  default:
764
 
765
  dmp("param not found");
@@ -772,7 +706,6 @@ class UniteCreatorElementorWidget extends Widget_Base {
772
 
773
  $value = $this->modifyValueByTypeUC($type, $value);
774
 
775
-
776
  if(empty($controlType)){
777
  dmp("empty control param type");
778
  dmp($param);
@@ -879,7 +812,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
879
  $attribute = "padding";
880
  break;
881
  case UniteCreatorDialogParam::PARAM_BORDER_DIMENTIONS:
882
- $attribute = "border-width";
883
  break;
884
  }
885
 
@@ -1173,8 +1106,15 @@ class UniteCreatorElementorWidget extends Widget_Base {
1173
  $arrControl["name"] = $name;
1174
  break;
1175
  case UniteCreatorDialogParam::PARAM_HOVER_ANIMATIONS:
 
1176
  $arrControl["name"] = $name;
1177
- $arrControl["prefix_class"] = "elementor-animation-";
 
 
 
 
 
 
1178
  break;
1179
  case UniteCreatorDialogParam::PARAM_ICON_LIBRARY:
1180
 
@@ -1212,7 +1152,6 @@ class UniteCreatorElementorWidget extends Widget_Base {
1212
  case UniteCreatorDialogParam::PARAM_BOXSHADOW:
1213
  case UniteCreatorDialogParam::PARAM_BORDER:
1214
  case UniteCreatorDialogParam::PARAM_BACKGROUND:
1215
- case UniteCreatorDialogParam::PARAM_HOVER_ANIMATIONS:
1216
  case UniteCreatorDialogParam::PARAM_CSS_FILTERS:
1217
 
1218
  $selector = UniteFunctionsUC::getVal($param, "selector");
@@ -1384,7 +1323,10 @@ class UniteCreatorElementorWidget extends Widget_Base {
1384
  /**
1385
  * add elementor param
1386
  */
1387
- protected function addElementorParamUC($param){
 
 
 
1388
 
1389
  $name = UniteFunctionsUC::getVal($param, "name");
1390
  $type = UniteFunctionsUC::getVal($param, "type");
@@ -1413,7 +1355,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
1413
  $arrChildParams = $settings->getMultipleCreatorParams($param);
1414
 
1415
  foreach($arrChildParams as $childParam)
1416
- $this->addElementorParamUC($childParam);
1417
 
1418
  break;
1419
  case UniteCreatorDialogParam::PARAM_POSTS_LIST:
@@ -1430,7 +1372,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
1430
  $arrChildParams = $settings->getMultipleCreatorParams($param);
1431
 
1432
  foreach($arrChildParams as $childParam)
1433
- $this->addElementorParamUC($childParam);
1434
 
1435
  break;
1436
  case UniteCreatorDialogParam::PARAM_TYPOGRAPHY:
@@ -1452,7 +1394,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
1452
 
1453
  $groupType = $arrControl["type"];
1454
 
1455
- $values = $this->objControls->add_group_control($groupType, $arrControl);
1456
 
1457
  break;
1458
  default:
@@ -1462,11 +1404,11 @@ class UniteCreatorElementorWidget extends Widget_Base {
1462
 
1463
  unset($arrControl["uc_responsive"]);
1464
 
1465
- $this->objControls->add_responsive_control($name, $arrControl);
1466
 
1467
  }else{
1468
 
1469
- $this->objControls->add_control($name, $arrControl);
1470
 
1471
  }
1472
 
@@ -1475,7 +1417,52 @@ class UniteCreatorElementorWidget extends Widget_Base {
1475
  break;
1476
  }
1477
 
 
 
1478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1479
 
1480
  }
1481
 
14
  use Elementor\Scheme_Typography;
15
  use Elementor\Core\Schemes;
16
  use Elementor\Repeater;
17
+ use Elementor\Utils;
18
 
19
 
20
  class UniteCreatorElementorWidget extends Widget_Base {
354
 
355
  switch($type){
356
  case UniteCreatorDialogParam::PARAM_IMAGE:
357
+
358
+ if(empty($value))
359
+ $value = Utils::get_placeholder_image_src();
360
+
361
  if(is_numeric($value))
362
  $value = array("id"=>$value);
363
  else
460
  'label' => esc_html__("Items", "unlimited-elements-for-elementor"),
461
  )
462
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
 
464
  $repeater = new Repeater();
465
 
692
  $controlType = Group_Control_Css_Filter::get_type();
693
  break;
694
  case UniteCreatorDialogParam::PARAM_HOVER_ANIMATIONS:
695
+ $controlType = Controls_Manager::SELECT;
696
  break;
 
697
  default:
698
 
699
  dmp("param not found");
706
 
707
  $value = $this->modifyValueByTypeUC($type, $value);
708
 
 
709
  if(empty($controlType)){
710
  dmp("empty control param type");
711
  dmp($param);
812
  $attribute = "padding";
813
  break;
814
  case UniteCreatorDialogParam::PARAM_BORDER_DIMENTIONS:
815
+ $attribute = "border-radius";
816
  break;
817
  }
818
 
1106
  $arrControl["name"] = $name;
1107
  break;
1108
  case UniteCreatorDialogParam::PARAM_HOVER_ANIMATIONS:
1109
+
1110
  $arrControl["name"] = $name;
1111
+
1112
+ $options = HelperProviderCoreUC_EL::getHoverAnimationClasses(true);
1113
+
1114
+ $arrControl["options"] = $options;
1115
+
1116
+ $arrControl["default"] = UniteFunctionsUC::getVal($param, "default_value");
1117
+
1118
  break;
1119
  case UniteCreatorDialogParam::PARAM_ICON_LIBRARY:
1120
 
1152
  case UniteCreatorDialogParam::PARAM_BOXSHADOW:
1153
  case UniteCreatorDialogParam::PARAM_BORDER:
1154
  case UniteCreatorDialogParam::PARAM_BACKGROUND:
 
1155
  case UniteCreatorDialogParam::PARAM_CSS_FILTERS:
1156
 
1157
  $selector = UniteFunctionsUC::getVal($param, "selector");
1323
  /**
1324
  * add elementor param
1325
  */
1326
+ protected function addElementorParamUC($param, $objControls = null){
1327
+
1328
+ if(empty($objControls))
1329
+ $objControls = $this->objControls;
1330
 
1331
  $name = UniteFunctionsUC::getVal($param, "name");
1332
  $type = UniteFunctionsUC::getVal($param, "type");
1355
  $arrChildParams = $settings->getMultipleCreatorParams($param);
1356
 
1357
  foreach($arrChildParams as $childParam)
1358
+ $this->addElementorParamUC($childParam,$objControls);
1359
 
1360
  break;
1361
  case UniteCreatorDialogParam::PARAM_POSTS_LIST:
1372
  $arrChildParams = $settings->getMultipleCreatorParams($param);
1373
 
1374
  foreach($arrChildParams as $childParam)
1375
+ $this->addElementorParamUC($childParam, $objControls);
1376
 
1377
  break;
1378
  case UniteCreatorDialogParam::PARAM_TYPOGRAPHY:
1394
 
1395
  $groupType = $arrControl["type"];
1396
 
1397
+ $values = $objControls->add_group_control($groupType, $arrControl);
1398
 
1399
  break;
1400
  default:
1404
 
1405
  unset($arrControl["uc_responsive"]);
1406
 
1407
+ $objControls->add_responsive_control($name, $arrControl);
1408
 
1409
  }else{
1410
 
1411
+ $objControls->add_control($name, $arrControl);
1412
 
1413
  }
1414
 
1417
  break;
1418
  }
1419
 
1420
+ //add some child params
1421
+ $this->checkAddRelatedControls($param, $objControls);
1422
 
1423
+ }
1424
+
1425
+ /**
1426
+ * add image sizes control
1427
+ */
1428
+ private function addImageSizesControl($paramImage, $objControls){
1429
+
1430
+ $title = UniteFunctionsUC::getVal($paramImage, "title");
1431
+ $name = UniteFunctionsUC::getVal($paramImage, "name");
1432
+
1433
+ $arrSizes = UniteFunctionsWPUC::getArrThumbSizes();
1434
+
1435
+ $arrSizes = array_flip($arrSizes);
1436
+
1437
+ $param = array();
1438
+ $param["type"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
1439
+ $param["title"] = $title .= " ".__("Size","unlimited-elements-for-elementor");
1440
+ $param["name"] = $name .= "_size";
1441
+ $param["options"] = $arrSizes;
1442
+ $param["default_value"] = "medium_large";
1443
+
1444
+ $this->addElementorParamUC($param, $objControls);
1445
+ }
1446
+
1447
+
1448
+ /**
1449
+ * add related controls for some params like image
1450
+ */
1451
+ private function checkAddRelatedControls($param, $objControls){
1452
+
1453
+ $type = UniteFunctionsUC::getVal($param, "type");
1454
+
1455
+ switch($type){
1456
+ case UniteCreatorDialogParam::PARAM_IMAGE:
1457
+
1458
+ $isAddSizes = UniteFunctionsUC::getVal($param, "add_image_sizes");
1459
+ $isAddSizes = UniteFunctionsUC::strToBool($isAddSizes);
1460
+
1461
+ if($isAddSizes == true)
1462
+ $this->addImageSizesControl($param, $objControls);
1463
+
1464
+ break;
1465
+ }
1466
 
1467
  }
1468
 
provider/core/plugins/unlimited_elements/helper_provider_core.class.php CHANGED
@@ -268,7 +268,26 @@ class HelperProviderCoreUC_EL{
268
 
269
  return(self::$arrWidgetNames);
270
  }
 
 
 
 
 
 
 
 
 
271
 
 
 
 
 
 
 
 
 
 
 
272
  /**
273
  * global init
274
  */
268
 
269
  return(self::$arrWidgetNames);
270
  }
271
+
272
+ /**
273
+ * get hover animation classes
274
+ */
275
+ public static function getHoverAnimationClasses($addNotChosen = false){
276
+
277
+ $arrAnimations = \Elementor\Control_Hover_Animation::get_animations();
278
+
279
+ $arrAnimationsNew = array();
280
 
281
+ if($addNotChosen == true)
282
+ $arrAnimationsNew[""] = __("Not Chosen","unlimited-elements-for-elementor");
283
+
284
+ foreach($arrAnimations as $key=>$value)
285
+ $arrAnimationsNew["elementor-animation-".$key] = $value;
286
+
287
+ return($arrAnimationsNew);
288
+ }
289
+
290
+
291
  /**
292
  * global init
293
  */
provider/functions_wordpress.class.php CHANGED
@@ -15,6 +15,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
15
  private static $arrUrlThumbCache = array();
16
  private static $arrUrlAttachmentDataCache = array();
17
  private static $cacheAuthorsShort = null;
 
18
  public static $arrLastTermsArgs;
19
 
20
  const SORTBY_NONE = "none";
@@ -2066,50 +2067,79 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
2066
 
2067
  /**
2068
  * get thumbnail sizes array
2069
- * mode: null, "small_only", "big_only"
2070
  */
2071
- public static function getArrThumbSizes($mode = null){
2072
- global $_wp_additional_image_sizes;
 
 
2073
 
 
 
2074
  $arrWPSizes = get_intermediate_image_sizes();
2075
-
2076
  $arrSizes = array();
2077
 
2078
- if($mode != "big_only"){
2079
- $arrSizes[self::THUMB_SMALL] = "Thumbnail (150x150)";
2080
- $arrSizes[self::THUMB_MEDIUM] = "Medium (max width 300)";
2081
- }
2082
-
2083
- if($mode == "small_only")
2084
- return($arrSizes);
2085
-
2086
  foreach($arrWPSizes as $size){
2087
- $title = ucfirst($size);
2088
- switch($size){
2089
- case self::THUMB_LARGE:
2090
- case self::THUMB_MEDIUM:
2091
- case self::THUMB_FULL:
2092
- case self::THUMB_SMALL:
2093
- continue(2);
2094
- break;
2095
- case "ug_big":
2096
- $title = esc_html__("Big", "unlimited-elements-for-elementor");
2097
- break;
2098
- }
2099
-
2100
  $arrSize = UniteFunctionsUC::getVal($_wp_additional_image_sizes, $size);
2101
- $maxWidth = UniteFunctionsUC::getVal($arrSize, "width");
2102
-
2103
- if(!empty($maxWidth))
2104
- $title .= " (max width $maxWidth)";
2105
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2106
  $arrSizes[$size] = $title;
2107
  }
2108
-
2109
- $arrSizes[self::THUMB_LARGE] = esc_html__("Large (max width 1024)", "unlimited-elements-for-elementor");
2110
- $arrSizes[self::THUMB_FULL] = esc_html__("Full", "unlimited-elements-for-elementor");
2111
-
2112
- return($arrSizes);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2113
  }
2114
 
2115
 
15
  private static $arrUrlThumbCache = array();
16
  private static $arrUrlAttachmentDataCache = array();
17
  private static $cacheAuthorsShort = null;
18
+ private static $arrThumbSizesCache = null;
19
  public static $arrLastTermsArgs;
20
 
21
  const SORTBY_NONE = "none";
2067
 
2068
  /**
2069
  * get thumbnail sizes array
 
2070
  */
2071
+ public static function getArrThumbSizes(){
2072
+
2073
+ if(!empty(self::$arrThumbSizesCache))
2074
+ return(self::$arrThumbSizesCache);
2075
 
2076
+ global $_wp_additional_image_sizes;
2077
+
2078
  $arrWPSizes = get_intermediate_image_sizes();
2079
+
2080
  $arrSizes = array();
2081
 
2082
+
 
 
 
 
 
 
 
2083
  foreach($arrWPSizes as $size){
2084
+
2085
+ $title = UniteFunctionsUC::convertHandleToTitle($size);
2086
+
2087
+ $maxWidth = null;
2088
+ $maxHeight = null;
2089
+ $isCrop = false;
2090
+
2091
+ //get max width from option or additional sizes array
 
 
 
 
 
2092
  $arrSize = UniteFunctionsUC::getVal($_wp_additional_image_sizes, $size);
2093
+ if(!empty($arrSize)){
2094
+ $maxWidth = UniteFunctionsUC::getVal($arrSize, "width");
2095
+ $maxHeight = UniteFunctionsUC::getVal($arrSize, "height");
2096
+ $crop = UniteFunctionsUC::getVal($arrSize, "crop");
2097
+ }
2098
+
2099
+ if(empty($maxWidth)){
2100
+ $maxWidth = intval(get_option("{$size}_size_w"));
2101
+ $maxHeight = intval(get_option("{$size}_size_h"));
2102
+ $crop = intval(get_option("{$size}_crop"));
2103
+ }
2104
+
2105
+ if(empty($maxWidth)){
2106
+ $arrSizes[$size] = $title;
2107
+ continue;
2108
+ }
2109
+
2110
+ //add the text addition
2111
+ $addition = "";
2112
+ if($crop == true)
2113
+ $addition = "({$maxWidth}x{$maxHeight})";
2114
+ else
2115
+ $addition = "(max width $maxWidth)";
2116
+
2117
+ $title .= " ".$addition;
2118
+
2119
  $arrSizes[$size] = $title;
2120
  }
2121
+
2122
+ $arrSizes["full"] = __("Full Size", "unlimited-elements-for-elementor");
2123
+
2124
+ //sort
2125
+ $arrNew = array();
2126
+
2127
+ $topKeys = array("medium_large", "large", "medium", "thumbnail", "full");
2128
+
2129
+ foreach($topKeys as $key){
2130
+
2131
+ if(!isset($arrSizes[$key]))
2132
+ continue;
2133
+
2134
+ $arrNew[$key] = $arrSizes[$key];
2135
+ unset($arrSizes[$key]);
2136
+ }
2137
+
2138
+ $arrNew = array_merge($arrNew, $arrSizes);
2139
+
2140
+ self::$arrThumbSizesCache = $arrNew;
2141
+
2142
+ return($arrNew);
2143
  }
2144
 
2145
 
provider/provider_params_processor.class.php CHANGED
@@ -628,6 +628,10 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
628
  $showDebugQuery = UniteFunctionsUC::getVal($value, "{$name}_show_query_debug");
629
  $showDebugQuery = UniteFunctionsUC::strToBool($showDebugQuery);
630
 
 
 
 
 
631
  $source = UniteFunctionsUC::getVal($value, "{$name}_source");
632
 
633
  $isForWoo = UniteFunctionsUC::getVal($param, "for_woocommerce_products");
@@ -1066,15 +1070,21 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1066
  dmp("The Query Is:");
1067
  dmp($args);
1068
  }
1069
-
1070
- //$arrPosts = get_posts($args);
1071
-
1072
  $query = new WP_Query($args);
1073
 
 
 
 
 
 
 
1074
  /*
1075
- dmp($query->query);
1076
- dmp($query->post_count);
1077
- dmp($query->found_posts);
 
 
1078
  */
1079
 
1080
  $arrPosts = $query->posts;
@@ -1992,6 +2002,28 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1992
  return($data);
1993
  }
1994
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1995
 
1996
  /**
1997
  * get param value, function for override, by type
628
  $showDebugQuery = UniteFunctionsUC::getVal($value, "{$name}_show_query_debug");
629
  $showDebugQuery = UniteFunctionsUC::strToBool($showDebugQuery);
630
 
631
+ $debugType = null;
632
+ if($showDebugQuery == true)
633
+ $debugType = UniteFunctionsUC::getVal($value, "{$name}_query_debug_type");
634
+
635
  $source = UniteFunctionsUC::getVal($value, "{$name}_source");
636
 
637
  $isForWoo = UniteFunctionsUC::getVal($param, "for_woocommerce_products");
1070
  dmp("The Query Is:");
1071
  dmp($args);
1072
  }
1073
+
 
 
1074
  $query = new WP_Query($args);
1075
 
1076
+ if($showDebugQuery == true && $debugType == "show_query"){
1077
+
1078
+ dmp("The Query Request Is:");
1079
+ dmp($query->request);
1080
+ }
1081
+
1082
  /*
1083
+ dmp($query->request);
1084
+ dmp("the query");
1085
+ dmp($query->query);
1086
+ dmp($query->post_count);
1087
+ dmp($query->found_posts);
1088
  */
1089
 
1090
  $arrPosts = $query->posts;
2002
  return($data);
2003
  }
2004
 
2005
+ /**
2006
+ * set extra params value, add it to the param values fields
2007
+ * like value_extra = something
2008
+ */
2009
+ public function setExtraParamsValues($paramType, $param, $name, $arrValues){
2010
+
2011
+ switch($paramType){
2012
+ //add size param for image
2013
+ case UniteCreatorDialogParam::PARAM_IMAGE:
2014
+
2015
+ $isAddSizes = UniteFunctionsUC::getVal($param, "add_image_sizes");
2016
+ $isAddSizes = UniteFunctionsUC::strToBool($isAddSizes);
2017
+
2018
+ if($isAddSizes == true)
2019
+ $param["value_size"] = UniteFunctionsUC::getVal($arrValues, $name."_size");
2020
+
2021
+ break;
2022
+ }
2023
+
2024
+ return($param);
2025
+ }
2026
+
2027
 
2028
  /**
2029
  * get param value, function for override, by type
provider/provider_settings.class.php CHANGED
@@ -1649,6 +1649,21 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1649
 
1650
  $this->addRadioBoolean($name."_show_query_debug", __("Show Query Debug", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
1651
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1652
  }
1653
 
1654
 
1649
 
1650
  $this->addRadioBoolean($name."_show_query_debug", __("Show Query Debug", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
1651
 
1652
+ //--------- debug type ---------
1653
+
1654
+ $params = array();
1655
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
1656
+ $params["elementor_condition"] = array($name."_show_query_debug"=>"true");
1657
+
1658
+ $arrType = array();
1659
+ $arrType["basic"] = __("Basic", "unlimited-elements-for-elementor");
1660
+ $arrType["show_query"] = __("Show Raw DB Query", "unlimited-elements-for-elementor");
1661
+
1662
+ $arrType = array_flip($arrType);
1663
+
1664
+ $this->addSelect($name."_query_debug_type", $arrType, __("Debug Options", "unlimited-elements-for-elementor"), "basic", $params);
1665
+
1666
+
1667
  }
1668
 
1669
 
provider/woocommerce_integrate.class.php CHANGED
@@ -14,7 +14,7 @@ class UniteCreatorWooIntegrate{
14
 
15
  const POST_TYPE_PRODUCT = "product";
16
  const PRODUCT_TYPE_VARIABLE = "variable";
17
-
18
  private $currency;
19
  private $currencySymbol;
20
  private $urlCheckout;
@@ -127,12 +127,20 @@ class UniteCreatorWooIntegrate{
127
  $params = "add-to-cart={$productID}";
128
 
129
  $urlAddCart = UniteFunctionsUC::addUrlParams($this->urlCurrentPage, $params);
 
130
 
131
  $arrProduct["woo_link_addcart_cart"] = UniteFunctionsUC::addUrlParams($this->urlCart, $params);
132
  $arrProduct["woo_link_addcart_checkout"] = UniteFunctionsUC::addUrlParams($this->urlCheckout, $params);
133
 
134
  //add html ajax add to cart
135
  $addCartAttributes = "href=\"{$urlAddCart}\" data-quantity=\"1\" class=\"uc-button-addcart product_type_simple add_to_cart_button ajax_add_to_cart\" data-product_id=\"{$productID}\" data-product_sku=\"{$productSku}\" rel=\"nofollow\"";
 
 
 
 
 
 
 
136
 
137
  $arrProduct["woo_addcart_ajax_attributes"] = $addCartAttributes;
138
 
14
 
15
  const POST_TYPE_PRODUCT = "product";
16
  const PRODUCT_TYPE_VARIABLE = "variable";
17
+
18
  private $currency;
19
  private $currencySymbol;
20
  private $urlCheckout;
127
  $params = "add-to-cart={$productID}";
128
 
129
  $urlAddCart = UniteFunctionsUC::addUrlParams($this->urlCurrentPage, $params);
130
+ $type = UniteFunctionsUC::getVal($arrProduct, "woo_type");
131
 
132
  $arrProduct["woo_link_addcart_cart"] = UniteFunctionsUC::addUrlParams($this->urlCart, $params);
133
  $arrProduct["woo_link_addcart_checkout"] = UniteFunctionsUC::addUrlParams($this->urlCheckout, $params);
134
 
135
  //add html ajax add to cart
136
  $addCartAttributes = "href=\"{$urlAddCart}\" data-quantity=\"1\" class=\"uc-button-addcart product_type_simple add_to_cart_button ajax_add_to_cart\" data-product_id=\"{$productID}\" data-product_sku=\"{$productSku}\" rel=\"nofollow\"";
137
+
138
+ if($type == self::PRODUCT_TYPE_VARIABLE){
139
+
140
+ $urlProduct = get_permalink($productID);
141
+
142
+ $addCartAttributes = "href=\"{$urlProduct}\" class=\"uc-button-addcart\" ";
143
+ }
144
 
145
  $arrProduct["woo_addcart_ajax_attributes"] = $addCartAttributes;
146
 
readme.txt CHANGED
@@ -521,6 +521,17 @@ Note : This plugin works with Elementor. Make sure you have [Elementor](https://
521
 
522
  == Changelog ==
523
 
 
 
 
 
 
 
 
 
 
 
 
524
  version 1.4.68 = 2021-03-22
525
 
526
  * Feature: added include recently viewed products in woocommerce
521
 
522
  == Changelog ==
523
 
524
+ version 1.4.69 = 2021-04-04
525
+
526
+ * Feature: added extra query debug options for custom post types selector
527
+ * Feature: added choose image size select option to image attribute
528
+ * Feature: added "image_attributes" placeholder for image output in widget editor
529
+ * Change: added default values select to hover animations attribute
530
+ * Change: changed button "add to cart" to "select options" for variable products in woocommerce list widgets
531
+ * Fix: fixed border radius attribute from width to radius
532
+ * Fix: added missing thumb sizes for image select
533
+
534
+
535
  version 1.4.68 = 2021-03-22
536
 
537
  * Feature: added include recently viewed products in woocommerce
release_log.txt CHANGED
@@ -1,5 +1,17 @@
1
 
2
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  version 1.4.68
4
 
5
  -feature: added include recently viewed products in woocommerce
1
 
2
 
3
+ version 1.4.69
4
+
5
+ -Bug fix: fixed border radius attribute from width to radius
6
+ -Change: added default values select to hover animations attribute
7
+ -feature: added extra query debug options for custom post types selector
8
+ -feature: added choose image size select option to image attribute
9
+ -bug fix: added missing thumb sizes for image select
10
+ -feature: added "image_attributes" placeholder for image output in widget editor
11
+ -change: changed button "add to cart" to "select options" for variable products in woocommerce list widgets
12
+
13
+
14
+
15
  version 1.4.68
16
 
17
  -feature: added include recently viewed products in woocommerce
unlimited_elements.php CHANGED
@@ -4,7 +4,7 @@ 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.68
8
  Author URI: http://unlimited-elements.com
9
  Text Domain: unlimited-elements-for-elementor
10
  Domain Path: /languages
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.69
8
  Author URI: http://unlimited-elements.com
9
  Text Domain: unlimited-elements-for-elementor
10
  Domain Path: /languages
views/objects/addon_view_childparams.class.php CHANGED
@@ -888,6 +888,14 @@ jQuery(document).ready(function(){
888
  else
889
  $arrParams[] = $this->createChildParam_underscore(null);
890
 
 
 
 
 
 
 
 
 
891
  $arrSizes = $this->getArrImageThumbSizes();
892
 
893
  foreach($arrSizes as $size=>$desc){
@@ -910,11 +918,7 @@ jQuery(document).ready(function(){
910
  $arrParams[] = $this->createChildParam_code("{{".self::PARAM_PREFIX."_".$key."}}", $thumbCode, false, true);
911
  }
912
 
913
-
914
- $prefix = "image_";
915
- if($isSingle == true)
916
- $prefix = "";
917
-
918
  $arrParams[] = $this->createChildParam_image("{$prefix}title", $isSingle);
919
  $arrParams[] = $this->createChildParam_image("{$prefix}alt", $isSingle);
920
  $arrParams[] = $this->createChildParam_image("{$prefix}description", $isSingle);
888
  else
889
  $arrParams[] = $this->createChildParam_underscore(null);
890
 
891
+ $prefix = "image_";
892
+ if($isSingle == true)
893
+ $prefix = "";
894
+
895
+ $arrParams[] = $this->createChildParam_image("{$prefix}attributes|raw", $isSingle);
896
+ $arrParams[] = $this->createChildParam_image("{$prefix}attributes_nosize|raw", $isSingle);
897
+
898
+
899
  $arrSizes = $this->getArrImageThumbSizes();
900
 
901
  foreach($arrSizes as $size=>$desc){
918
  $arrParams[] = $this->createChildParam_code("{{".self::PARAM_PREFIX."_".$key."}}", $thumbCode, false, true);
919
  }
920
 
921
+
 
 
 
 
922
  $arrParams[] = $this->createChildParam_image("{$prefix}title", $isSingle);
923
  $arrParams[] = $this->createChildParam_image("{$prefix}alt", $isSingle);
924
  $arrParams[] = $this->createChildParam_image("{$prefix}description", $isSingle);