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

Version Description

Download this release

Release Info

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

Code changes from version 1.5.31 to 1.5.35

Files changed (37) hide show
  1. assets_libraries/filters/ue_filters.js +272 -114
  2. assets_libraries/owl-carousel-new/owl.carousel.js +12 -7
  3. assets_libraries/owl-carousel-new/owl.carousel.min.js +2 -2
  4. assets_libraries/remote/ue-remote-controls.js +47 -11
  5. css/admin.css +16 -16
  6. inc_php/framework/functions.class.php +16 -1
  7. inc_php/framework/include_framework.php +5 -3
  8. inc_php/plugins/unitecreator_plugin_base.class.php +0 -1
  9. inc_php/unitecreator_dialog_param.class.php +20 -0
  10. inc_php/unitecreator_filters_process.class.php +200 -36
  11. inc_php/unitecreator_operations.class.php +14 -3
  12. inc_php/unitecreator_output.class.php +1 -1
  13. inc_php/unitecreator_params_processor.class.php +79 -25
  14. inc_php/unitecreator_settings.class.php +27 -0
  15. inc_php/unitecreator_template_engine.class.php +34 -1
  16. includes.php +2 -1
  17. js/unitecreator_params_dialog.js +1 -3
  18. provider/admin_notices.class.php +24 -4
  19. provider/assets/provider_admin.js +3 -3
  20. provider/core/plugins/unlimited_elements/dialog_param_elementor.class.php +3 -1
  21. provider/core/plugins/unlimited_elements/elementor/assets/uc_editor_admin.js +58 -33
  22. provider/core/plugins/unlimited_elements/elementor/elementor_layout_exporter.class.php +19 -12
  23. provider/core/plugins/unlimited_elements/elementor/elementor_widget.class.php +11 -8
  24. provider/core/plugins/unlimited_elements/elementor/pagination.class.php +28 -4
  25. provider/core/plugins/unlimited_elements/globals.class.php +41 -5
  26. provider/functions_wordpress.class.php +74 -17
  27. provider/provider_functions.class.php +1 -1
  28. provider/provider_params_processor.class.php +124 -234
  29. provider/provider_params_processor_multisource.class.php +450 -0
  30. provider/provider_settings.class.php +38 -9
  31. provider/provider_settings_multisource.class.php +182 -15
  32. provider/woocommerce_integrate.class.php +76 -2
  33. readme.txt +40 -0
  34. release_log.txt +37 -0
  35. unlimited_elements.php +3 -3
  36. vendor/twig/twig/src/Loader/ArrayLoader.php +2 -0
  37. views/objects/addon_view_childparams.class.php +42 -0
assets_libraries/filters/ue_filters.js CHANGED
@@ -567,7 +567,7 @@ function UEDynamicFilters(){
567
 
568
  if(!objFilters)
569
  return(false);
570
-
571
  if(objFilters.length == 0)
572
  return(false);
573
 
@@ -900,7 +900,7 @@ function UEDynamicFilters(){
900
  * get terms list term id
901
  */
902
  function getTermsListSelectedTerm(objFilter){
903
-
904
  if(!objFilter)
905
  return(null);
906
 
@@ -917,9 +917,33 @@ function UEDynamicFilters(){
917
  var objSelected = objFilter.find(".uc-selected");
918
  }
919
 
920
- if(objSelected.length == 0)
 
 
 
 
 
921
  return(null);
 
 
 
 
 
 
 
922
 
 
 
 
 
 
 
 
 
 
 
 
 
923
  var id = objSelected.data("id");
924
  var slug = objSelected.data("slug");
925
  var taxonomy = objSelected.data("taxonomy");
@@ -936,6 +960,32 @@ function UEDynamicFilters(){
936
  return(objTerm);
937
  }
938
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
939
  function ________GENERAL_FILTER_______________(){}
940
 
941
 
@@ -953,6 +1003,44 @@ function UEDynamicFilters(){
953
  return(false);
954
  }
955
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
956
 
957
  function ________INIT_FILTERS_______________(){}
958
 
@@ -1011,45 +1099,6 @@ function UEDynamicFilters(){
1011
  function ________DATA_______________(){}
1012
 
1013
 
1014
- /**
1015
- * consolidate filters data
1016
- */
1017
- function consolidateFiltersData(arrData){
1018
-
1019
- if(arrData.length == 0)
1020
- return([]);
1021
-
1022
- //consolidate by taxonomies
1023
-
1024
- var objTax = {};
1025
-
1026
- jQuery.each(arrData, function(index, item){
1027
-
1028
- switch(item.type){
1029
- case "term":
1030
-
1031
- var taxonomy = item.taxonomy;
1032
- var term = item.term;
1033
-
1034
- if(objTax.hasOwnProperty(taxonomy) == false)
1035
- objTax[taxonomy] = [];
1036
-
1037
- objTax[taxonomy].push(term);
1038
-
1039
- break;
1040
- default:
1041
- throw new Error("consolidateFiltersData error: wrong type: "+item.type);
1042
- break;
1043
- }
1044
-
1045
- });
1046
-
1047
- var arrConsolidated = {};
1048
- arrConsolidated["terms"] = objTax;
1049
-
1050
- return(arrConsolidated);
1051
- }
1052
-
1053
  /**
1054
  * build terms query
1055
  * ucterms=product_cat~shoes.dress;cat~123.43;
@@ -1548,6 +1597,12 @@ function UEDynamicFilters(){
1548
  */
1549
  function ajaxRequest(ajaxUrl, action, objData, onSuccess){
1550
 
 
 
 
 
 
 
1551
  if(!objData)
1552
  var objData = {};
1553
 
@@ -1757,6 +1812,7 @@ function UEDynamicFilters(){
1757
 
1758
  var ajaxUrl = objAjaxOptions["ajax_url"];
1759
  var urlReplace = objAjaxOptions["url_replace"];
 
1760
 
1761
  if(g_vars.DEBUG_AJAX_OPTIONS == true){
1762
 
@@ -1780,22 +1836,25 @@ function UEDynamicFilters(){
1780
 
1781
  //save initial state
1782
  var isStateEmpty = jQuery.isEmptyObject(history.state);
 
 
1783
 
1784
  if(isStateEmpty){
1785
 
1786
  var ajaxUrlInitial = objGrid.data("initajaxurl");
1787
 
1788
- history.replaceState({"ucaction":"change", "ajaxurl":ajaxUrlInitial, "gridid":gridID}, null, urlReplace);
 
 
1789
  }
1790
 
1791
- history.pushState({"ucaction":"change", "ajaxurl":ajaxUrl, "gridid":gridID}, null, urlReplace); //with back
1792
-
1793
  }
1794
  else
1795
  history.replaceState({}, null, urlReplace); //without back
1796
  }
1797
 
1798
-
1799
  doGridAjaxRequest(ajaxUrl, objGrid, objFilters, isLoadMore, isFiltersInit);
1800
 
1801
  }
@@ -1856,6 +1915,86 @@ function UEDynamicFilters(){
1856
 
1857
  }
1858
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1859
  function ________RUN_______________(){}
1860
 
1861
 
@@ -1869,7 +2008,7 @@ function UEDynamicFilters(){
1869
 
1870
  if(g_showDebug){
1871
  trace("getGridAjaxOptions");
1872
-
1873
  trace("Filters:");
1874
  trace(objFilters);
1875
 
@@ -1878,9 +2017,30 @@ function UEDynamicFilters(){
1878
  trace("is init: " + isFiltersInitMode);
1879
  }
1880
 
1881
- if(!objFilters)
1882
- return(null);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1883
 
 
 
 
1884
  var urlReplace = g_urlBase;
1885
 
1886
  var urlAjax = g_urlBase;
@@ -1903,6 +2063,12 @@ function UEDynamicFilters(){
1903
 
1904
  var type = getFilterType(objFilter);
1905
 
 
 
 
 
 
 
1906
  switch(type){
1907
  case g_types.PAGINATION:
1908
 
@@ -1954,7 +2120,7 @@ function UEDynamicFilters(){
1954
 
1955
  //if not init mode - take first item
1956
  var objTerm = getTermsListSelectedTerm(objFilter);
1957
-
1958
  if(objTerm){
1959
 
1960
  if(isFiltersInitMode == false)
@@ -1977,6 +2143,13 @@ function UEDynamicFilters(){
1977
  if(isLoadMoreMode == true)
1978
  isNoRefresh = true;
1979
 
 
 
 
 
 
 
 
1980
  break;
1981
  default:
1982
  throw new Error("Unknown filter type: "+type);
@@ -2092,7 +2265,7 @@ function UEDynamicFilters(){
2092
 
2093
  if(numItems)
2094
  urlAjax += "&uccount="+numItems;
2095
-
2096
  if(arrTerms.length){
2097
 
2098
  var strTerms = buildTermsQuery(arrTerms);
@@ -2114,14 +2287,55 @@ function UEDynamicFilters(){
2114
  if(isReplaceMode == true)
2115
  urlAjax += "&ucreplace=1";
2116
 
 
 
 
 
 
 
 
 
 
 
2117
  var output = {};
2118
  output["ajax_url"] = urlAjax;
2119
  output["url_replace"] = urlReplace;
 
2120
 
2121
  return(output);
2122
  }
2123
 
2124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2125
 
2126
  function ________INIT_______________(){}
2127
 
@@ -2167,6 +2381,13 @@ function UEDynamicFilters(){
2167
  g_urlBase = getVal(g_filtersData, "urlbase");
2168
  g_urlAjax = getVal(g_filtersData, "urlajax");
2169
 
 
 
 
 
 
 
 
2170
  if(!g_urlBase){
2171
  trace("ue filters error - base url not inited");
2172
  return(false);
@@ -2323,71 +2544,8 @@ function UEDynamicFilters(){
2323
 
2324
  }
2325
 
2326
- /**
2327
- * do history
2328
- */
2329
- function changeToHistoryState(state){
2330
-
2331
- var ajaxUrl = getVal(state, "ajaxurl");
2332
-
2333
- var gridID = getVal(state, "gridid");
2334
-
2335
- if(!gridID)
2336
- return(false);
2337
-
2338
- if(!ajaxUrl)
2339
- return(false);
2340
-
2341
- var objGrid = jQuery("#"+gridID);
2342
-
2343
- var objFilters = objGrid.data("filters");
2344
-
2345
- if(!objFilters)
2346
- return(false);
2347
-
2348
- var responseFromCache = getResponseFromAjaxCache(ajaxUrl);
2349
-
2350
- if(!responseFromCache){
2351
-
2352
- //do ajax request
2353
-
2354
- doGridAjaxRequest(ajaxUrl, objGrid, objFilters);
2355
-
2356
- return(false);
2357
- }
2358
-
2359
- //get data from cache
2360
-
2361
- operateAjaxRefreshResponse(responseFromCache, objGrid, objFilters, false, true);
2362
-
2363
- }
2364
 
2365
 
2366
- /**
2367
- * on pop state, if it's a grid state, set the grid
2368
- */
2369
- function onPopState(){
2370
-
2371
- if(!history.state)
2372
- return(true);
2373
-
2374
- var action = getVal(history.state, "ucaction");
2375
-
2376
- if(!action)
2377
- return(true);
2378
-
2379
- switch(action){
2380
- case "change":
2381
-
2382
- changeToHistoryState(history.state);
2383
-
2384
- break;
2385
- default:
2386
- throw new Error("Wrong history action: " + action);
2387
- break;
2388
- }
2389
-
2390
- }
2391
 
2392
  /**
2393
  * init events
567
 
568
  if(!objFilters)
569
  return(false);
570
+
571
  if(objFilters.length == 0)
572
  return(false);
573
 
900
  * get terms list term id
901
  */
902
  function getTermsListSelectedTerm(objFilter){
903
+
904
  if(!objFilter)
905
  return(null);
906
 
917
  var objSelected = objFilter.find(".uc-selected");
918
  }
919
 
920
+ if(objSelected.length == 0){
921
+
922
+ if(g_showDebug == true){
923
+ trace("no selected found, skipping...");
924
+ }
925
+
926
  return(null);
927
+ }
928
+
929
+ //check for hidden
930
+
931
+ if(filterType == g_types.TERMS_LIST && objSelected.is(":hidden")){
932
+
933
+ if(g_showDebug == true){
934
 
935
+ trace("the selected object");
936
+ trace(objSelected);
937
+ trace("the term is hidden, skipping...");
938
+
939
+ }
940
+
941
+ return(null);
942
+ }
943
+
944
+ if(objSelected.length > 1)
945
+ objSelected = jQuery(objSelected[0]);
946
+
947
  var id = objSelected.data("id");
948
  var slug = objSelected.data("slug");
949
  var taxonomy = objSelected.data("taxonomy");
960
  return(objTerm);
961
  }
962
 
963
+ /**
964
+ * select items in terms list by terms
965
+ */
966
+ function termListSelectItems(objFilter, arrTerms){
967
+
968
+ //deselect
969
+ var objSelected = objFilter.find(".uc-selected");
970
+
971
+ objSelected.removeClass("uc-selected");
972
+
973
+ //select by term
974
+
975
+ jQuery.each(arrTerms, function(index, term){
976
+
977
+ var termID = getVal(term,"id");
978
+ var objItem = objFilter.find("a.ue_taxonomy_item[data-id='"+termID+"']");
979
+
980
+ if(objItem.length == 0)
981
+ return(true);
982
+
983
+ objItem.addClass("uc-selected");
984
+ });
985
+
986
+
987
+ }
988
+
989
  function ________GENERAL_FILTER_______________(){}
990
 
991
 
1003
  return(false);
1004
  }
1005
 
1006
+ /**
1007
+ * select filter items by terms, without refresh, just set selected
1008
+ */
1009
+ function selectFilterItemsByTerms(objFilters, arrTerms){
1010
+
1011
+ if(!objFilters || objFilters.length == 0)
1012
+ return(false);
1013
+
1014
+ if(!arrTerms || arrTerms.length == 0)
1015
+ return(false);
1016
+
1017
+ jQuery.each(objFilters,function(index, filter){
1018
+
1019
+ var objFilter = jQuery(filter);
1020
+
1021
+ selectFilterItems(objFilter, arrTerms);
1022
+
1023
+ });
1024
+
1025
+ }
1026
+
1027
+ /**
1028
+ * select filter items
1029
+ */
1030
+ function selectFilterItems(objFilter, arrTerms){
1031
+
1032
+ var type = getFilterType(objFilter);
1033
+
1034
+ switch(type){
1035
+ //case g_types.SELECT:
1036
+ case g_types.TERMS_LIST:
1037
+
1038
+ termListSelectItems(objFilter, arrTerms);
1039
+
1040
+ break;
1041
+ }
1042
+
1043
+ }
1044
 
1045
  function ________INIT_FILTERS_______________(){}
1046
 
1099
  function ________DATA_______________(){}
1100
 
1101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1102
  /**
1103
  * build terms query
1104
  * ucterms=product_cat~shoes.dress;cat~123.43;
1597
  */
1598
  function ajaxRequest(ajaxUrl, action, objData, onSuccess){
1599
 
1600
+
1601
+ if(g_showDebug == true){
1602
+ trace("ajax request");
1603
+ trace(ajaxUrl);
1604
+ }
1605
+
1606
  if(!objData)
1607
  var objData = {};
1608
 
1812
 
1813
  var ajaxUrl = objAjaxOptions["ajax_url"];
1814
  var urlReplace = objAjaxOptions["url_replace"];
1815
+ var arrTerms = objAjaxOptions["terms"];
1816
 
1817
  if(g_vars.DEBUG_AJAX_OPTIONS == true){
1818
 
1836
 
1837
  //save initial state
1838
  var isStateEmpty = jQuery.isEmptyObject(history.state);
1839
+
1840
+ var objState = {"ucaction":"change", "ajaxurl":ajaxUrl, "gridid":gridID, selected_terms:arrTerms};
1841
 
1842
  if(isStateEmpty){
1843
 
1844
  var ajaxUrlInitial = objGrid.data("initajaxurl");
1845
 
1846
+ objState["ajaxurl"] = ajaxUrlInitial;
1847
+
1848
+ history.replaceState(objState, null, urlReplace);
1849
  }
1850
 
1851
+ history.pushState(objState, null, urlReplace); //with back
1852
+
1853
  }
1854
  else
1855
  history.replaceState({}, null, urlReplace); //without back
1856
  }
1857
 
 
1858
  doGridAjaxRequest(ajaxUrl, objGrid, objFilters, isLoadMore, isFiltersInit);
1859
 
1860
  }
1915
 
1916
  }
1917
 
1918
+ function ________STATE_RELATED_______________(){}
1919
+
1920
+
1921
+ /**
1922
+ * do history
1923
+ */
1924
+ function changeToHistoryState(state){
1925
+
1926
+ if(g_showDebug == true){
1927
+ trace("change to history");
1928
+ trace(state);
1929
+ }
1930
+
1931
+ var ajaxUrl = getVal(state, "ajaxurl");
1932
+
1933
+ var gridID = getVal(state, "gridid");
1934
+
1935
+ var arrTerms = getVal(state, "selected_terms");
1936
+
1937
+ if(!gridID)
1938
+ return(false);
1939
+
1940
+ if(!ajaxUrl)
1941
+ return(false);
1942
+
1943
+ var objGrid = jQuery("#"+gridID);
1944
+
1945
+ var objFilters = objGrid.data("filters");
1946
+
1947
+ if(!objFilters)
1948
+ return(false);
1949
+
1950
+ //select by terms
1951
+
1952
+ selectFilterItemsByTerms(objFilters, arrTerms);
1953
+
1954
+ var responseFromCache = getResponseFromAjaxCache(ajaxUrl);
1955
+
1956
+ if(!responseFromCache){
1957
+
1958
+ //do ajax request
1959
+
1960
+ doGridAjaxRequest(ajaxUrl, objGrid, objFilters);
1961
+
1962
+ return(false);
1963
+ }
1964
+
1965
+ //get data from cache
1966
+
1967
+ operateAjaxRefreshResponse(responseFromCache, objGrid, objFilters, false, true);
1968
+
1969
+ }
1970
+
1971
+ /**
1972
+ * on pop state, if it's a grid state, set the grid
1973
+ */
1974
+ function onPopState(){
1975
+
1976
+ if(!history.state)
1977
+ return(true);
1978
+
1979
+ var action = getVal(history.state, "ucaction");
1980
+
1981
+ if(!action)
1982
+ return(true);
1983
+
1984
+ switch(action){
1985
+ case "change":
1986
+
1987
+ changeToHistoryState(history.state);
1988
+
1989
+ break;
1990
+ default:
1991
+ throw new Error("Wrong history action: " + action);
1992
+ break;
1993
+ }
1994
+
1995
+ }
1996
+
1997
+
1998
  function ________RUN_______________(){}
1999
 
2000
 
2008
 
2009
  if(g_showDebug){
2010
  trace("getGridAjaxOptions");
2011
+
2012
  trace("Filters:");
2013
  trace(objFilters);
2014
 
2017
  trace("is init: " + isFiltersInitMode);
2018
  }
2019
 
2020
+ //filter only visible elements (by it's parents)
2021
+
2022
+ var objVisibleFilters = objFilters.filter(function(objFilter){
2023
+
2024
+ var objParent = objFilter.parent();
2025
+
2026
+ return(!objParent.is(":hidden"));
2027
+ });
2028
+
2029
+
2030
+ if(objVisibleFilters.length < objFilters.length){
2031
+
2032
+ var objFilters = objVisibleFilters;
2033
+
2034
+ if(g_showDebug){
2035
+ trace("Visible Filters: ");
2036
+ trace(objFilters);
2037
+
2038
+ }
2039
+ }
2040
 
2041
+ if(!objFilters || objFilters.length == 0)
2042
+ return(null);
2043
+
2044
  var urlReplace = g_urlBase;
2045
 
2046
  var urlAjax = g_urlBase;
2063
 
2064
  var type = getFilterType(objFilter);
2065
 
2066
+ if(g_showDebug == true){
2067
+
2068
+ trace("filter: "+type);
2069
+ trace(objFilter);
2070
+ }
2071
+
2072
  switch(type){
2073
  case g_types.PAGINATION:
2074
 
2120
 
2121
  //if not init mode - take first item
2122
  var objTerm = getTermsListSelectedTerm(objFilter);
2123
+
2124
  if(objTerm){
2125
 
2126
  if(isFiltersInitMode == false)
2143
  if(isLoadMoreMode == true)
2144
  isNoRefresh = true;
2145
 
2146
+ //debug
2147
+ if(g_showDebug == true){
2148
+
2149
+ trace("Selected Term: ");
2150
+ trace(objTerm);
2151
+ }
2152
+
2153
  break;
2154
  default:
2155
  throw new Error("Unknown filter type: "+type);
2265
 
2266
  if(numItems)
2267
  urlAjax += "&uccount="+numItems;
2268
+
2269
  if(arrTerms.length){
2270
 
2271
  var strTerms = buildTermsQuery(arrTerms);
2287
  if(isReplaceMode == true)
2288
  urlAjax += "&ucreplace=1";
2289
 
2290
+ //avoid duplicates - exclude
2291
+ if(objGrid.hasClass("uc-avoid-duplicates")){
2292
+
2293
+ var strExcludePostIDs = getExcludePostIDs(objGrid);
2294
+
2295
+ if(strExcludePostIDs)
2296
+ urlAjax += "&ucexclude="+strExcludePostIDs;
2297
+ }
2298
+
2299
+
2300
  var output = {};
2301
  output["ajax_url"] = urlAjax;
2302
  output["url_replace"] = urlReplace;
2303
+ output["terms"] = arrTerms;
2304
 
2305
  return(output);
2306
  }
2307
 
2308
 
2309
+ /**
2310
+ * get all exclude post ids from all avoid duplicates grids
2311
+ */
2312
+ function getExcludePostIDs(objGrid){
2313
+
2314
+ var objGrids = jQuery(".uc-avoid-duplicates").not(objGrid);
2315
+
2316
+ if(objGrids.length == 0)
2317
+ return("");
2318
+
2319
+ var strIDs = "";
2320
+
2321
+ jQuery.each(objGrids, function(index, grid){
2322
+ var objGrid = jQuery(grid);
2323
+
2324
+ var postIDs = objGrid.data("postids");
2325
+
2326
+ if(!postIDs)
2327
+ return(true);
2328
+
2329
+ if(strIDs)
2330
+ strIDs += ",";
2331
+
2332
+ strIDs += postIDs;
2333
+ });
2334
+
2335
+
2336
+ return(strIDs);
2337
+ }
2338
+
2339
 
2340
  function ________INIT_______________(){}
2341
 
2381
  g_urlBase = getVal(g_filtersData, "urlbase");
2382
  g_urlAjax = getVal(g_filtersData, "urlajax");
2383
 
2384
+ var isShowDebug = getVal(g_filtersData, "debug");
2385
+
2386
+ if(isShowDebug == true){
2387
+ g_showDebug = true;
2388
+ trace("Show Filters Debug");
2389
+ }
2390
+
2391
  if(!g_urlBase){
2392
  trace("ue filters error - base url not inited");
2393
  return(false);
2544
 
2545
  }
2546
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2547
 
2548
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2549
 
2550
  /**
2551
  * init events
assets_libraries/owl-carousel-new/owl.carousel.js CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * Owl Carousel v2.3.7 - UE8
3
  * Copyright 2013-2018 David Deutsch
4
  * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5
  */
@@ -3004,7 +3004,7 @@
3004
  * @author Bartosz Wojciechowski
3005
  * @author Artus Kolanowski
3006
  * @author David Deutsch
3007
- * @author Tom De CaluwГ©
3008
  * @license The MIT License (MIT)
3009
  */
3010
  ;(function($, window, document, undefined) {
@@ -3394,7 +3394,7 @@
3394
 
3395
  // create DOM structure for relative navigation
3396
  this._controls.$relative = (settings.navContainer ? $(settings.navContainer)
3397
- : $('<div>').addClass(settings.navContainerClass).appendTo(this.$element)).addClass('disabled');
3398
 
3399
  this._controls.$previous = $('<' + settings.navElement + ' value="previous item" title="previous item">')
3400
  .addClass(settings.navClass[0])
@@ -3433,7 +3433,7 @@
3433
  }
3434
 
3435
  this._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer)
3436
- : $('<div>').addClass(settings.dotsClass).appendTo(this.$element)).addClass('disabled');
3437
 
3438
  this._controls.$absolute.on('click', 'button', $.proxy(function(e) {
3439
  var index = $(e.target).parent().is(this._controls.$absolute)
@@ -3537,14 +3537,19 @@
3537
  index = this._core.relative(this._core.current()),
3538
  loop = settings.loop || settings.rewind;
3539
 
3540
- this._controls.$relative.toggleClass('disabled', !settings.nav || disabled);
 
 
3541
 
3542
- if (settings.nav) {
3543
  this._controls.$previous.toggleClass('disabled', !loop && index <= this._core.minimum(true));
3544
  this._controls.$next.toggleClass('disabled', !loop && index >= this._core.maximum(true));
3545
  }
3546
 
3547
- this._controls.$absolute.toggleClass('disabled', !settings.dots || disabled);
 
 
 
3548
 
3549
  if (settings.dots) {
3550
  difference = this._pages.length - this._controls.$absolute.children().length;
1
  /**
2
+ * Owl Carousel v2.3.8 - UE8
3
  * Copyright 2013-2018 David Deutsch
4
  * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5
  */
3004
  * @author Bartosz Wojciechowski
3005
  * @author Artus Kolanowski
3006
  * @author David Deutsch
3007
+ * @author Tom De CaluwГ©
3008
  * @license The MIT License (MIT)
3009
  */
3010
  ;(function($, window, document, undefined) {
3394
 
3395
  // create DOM structure for relative navigation
3396
  this._controls.$relative = (settings.navContainer ? $(settings.navContainer)
3397
+ : $('<div>').addClass(settings.navContainerClass).appendTo(this.$element));
3398
 
3399
  this._controls.$previous = $('<' + settings.navElement + ' value="previous item" title="previous item">')
3400
  .addClass(settings.navClass[0])
3433
  }
3434
 
3435
  this._controls.$absolute = (settings.dotsContainer ? $(settings.dotsContainer)
3436
+ : $('<div>').addClass(settings.dotsClass).appendTo(this.$element));
3437
 
3438
  this._controls.$absolute.on('click', 'button', $.proxy(function(e) {
3439
  var index = $(e.target).parent().is(this._controls.$absolute)
3537
  index = this._core.relative(this._core.current()),
3538
  loop = settings.loop || settings.rewind;
3539
 
3540
+ //remove arrows from DOM when they are disabled
3541
+ if(settings.nav == false)
3542
+ this._controls.$relative.remove();
3543
 
3544
+ if (settings.nav == true) {
3545
  this._controls.$previous.toggleClass('disabled', !loop && index <= this._core.minimum(true));
3546
  this._controls.$next.toggleClass('disabled', !loop && index >= this._core.maximum(true));
3547
  }
3548
 
3549
+ //remove dots from DOM when they are disabled
3550
+ if(settings.dots == false){
3551
+ this._controls.$absolute.remove();
3552
+ }
3553
 
3554
  if (settings.dots) {
3555
  difference = this._pages.length - this._controls.$absolute.children().length;
assets_libraries/owl-carousel-new/owl.carousel.min.js CHANGED
@@ -1,5 +1,5 @@
1
  /**
2
- * Owl Carousel v2.3.7 - UE8
3
  * Copyright 2013-2018 David Deutsch
4
  * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5
  */
@@ -16,4 +16,4 @@
16
  * @todo stagePadding calculate wrong active classes
17
  */
18
 
19
- !function(h,n,s,a){function e(t){console.log(t)}var o=!1;function l(t){0!=o&&e(t)}function c(t,e){this.settings=null,this.options=h.extend({},c.Defaults,e),this.$element=h(t),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this.getItemWidth=function(){switch(this.settings.paddingType){case"left":case"right":case"both":default:var t=(this.width()/this.settings.items).toFixed(3)-this.settings.margin}return this.settings.item_size_gap&&(t+=this.settings.item_size_gap),t},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},h.each(["onResize","onThrottledResize"],h.proxy(function(t,e){this._handlers[e]=h.proxy(this[e],this)},this)),h.each(c.Plugins,h.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),h.each(c.Workers,h.proxy(function(t,e){this._pipe.push({filter:e.filter,run:h.proxy(e.run,this)})},this)),this.setup(),this.initialize()}c.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,setActiveClass:!0,setActiveClassOnMobile:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,paddingType:"none",stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:n,fallbackEasing:"swing",slideTransition:"",info:!1,scrollToHead:!1,scrollToHeadOffset:0,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab",shuffle:!1,item_size_gap:0,pixel_gap_fix:!1,debug:!1},c.Width={Default:"default",Inner:"inner",Outer:"outer"},c.Type={Event:"event",State:"state"},c.Plugins={},c.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width(),l("set total width this._width: "+this._width)}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,e={width:"auto","margin-left":s?e:"","margin-right":s?"":e};i||this.$stage.children().css(e),t.css=e}},{filter:["width","items","settings"],run:function(t){!0===this.settings.debug&&(o=!0),l("run!"),1==this.settings.items&&1==this.settings.pixel_gap_fix&&(this.settings.item_size_gap=1,l("set items size gap: 1")),l("settings - stage padding type: "+this.settings.paddingType),l("settings - stage padding: "+this.settings.stagePadding),this.settings.paddingType&&"none"!=this.settings.paddingType||!this.settings.stagePadding||(this.settings.paddingType="both",l("set stage padding type - both"));var e,i=this.getItemWidth();for(l("Item width: "+i),this.settings.stagePadding>i&&(this.settings.stagePadding=0,e=this.getItemWidth(),this.settings.stagePadding=Math.floor(.5*e),i=this.getItemWidth(),l("set new stagePadding: "+this.settings.stagePadding+" and item width: "+i)),merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[],t.items={merge:!1,width:i};iterator--;)merge=this._mergers[iterator],merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge,t.items.merge=1<merge||t.items.merge,widths[iterator]=grid?i*merge:this._items[iterator].width();this._widths=widths}},{filter:["items","settings"],run:function(){var t=[],e=this._items,i=this.settings,s=Math.max(2*i.items,4),n=2*Math.ceil(e.length/2),o=i.loop&&e.length?i.rewind?s:Math.max(s,n):0,r="",a="";for(o/=2;0<o;)t.push(this.normalize(t.length/2,!0)),r+=e[t[t.length-1]][0].outerHTML,t.push(this.normalize(e.length-1-(t.length-1)/2,!0)),a=e[t[t.length-1]][0].outerHTML+a,--o;this._clones=t,h(r).addClass("cloned").appendTo(this.$stage),h(a).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=[];++i<e;){var n=(s[i-1]||0)+(this._widths[this.relative(i)]+this.settings.margin)*t;s.push(n)}if(this.settings.item_size_gap)for(var o in s)s[o]-=this.settings.item_size_gap;l("Set coordinates"),l(s),this._coordinates=s}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i=this.settings.paddingType,s=this.$stage.parent(),n=s.width();l("parent Outer Stage Width: "+s.width()),l("element width this.$element.width(): "+this.$element.width());var o={width:Math.ceil(Math.abs(e[e.length-1])),"padding-left":"","padding-right":""},r={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""},a={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":t||"","padding-right":""},t={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":"","padding-right":t||""},n={width:n};l("set outer stage css"),l(n),"none"==i?(this.$stage.css(o),s.width(n)):"both"==i?(this.$stage.css(r),s.css(n),l("Set stage width css (both)"),l(r)):"left"==i?(this.$stage.css(a),s.css(n),l("Set stage width css (left)"),l(a)):"right"==i&&(this.$stage.css(t),s.css(n),l("Set stage width css (right)"),l(t))}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,r=this.coordinates(this.current())+o,a=r+this.width()*n,h=[];for("left"!=this.settings.paddingType&&"right"!=this.settings.paddingType||(o=this.settings.stagePadding),i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*n,(this.op(t,"<=",r)&&this.op(t,">",a)||this.op(e,"<",r)&&this.op(e,">",a))&&h.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+h.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}},{filter:["width","position","items","settings"],run:function(){var t;this.settings.setActiveClass&&this.settings.setActiveClass&&(t=!0,this.settings.setActiveClassOnMobile?1==this.$stage.children(".active").length&&(t=!0):this.settings.setActiveClassOnMobile||1==this.$stage.children(".active").length&&(t=!1),1==t?this.$stage.children().eq(this.current()).addClass("uc-active-item").siblings().removeClass("uc-active-item"):0==t&&this.$stage.children().removeClass("uc-active-item"))}}],c.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=h("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(h("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},c.prototype.initializeItems=function(){var t=this.$element.find(".owl-item");if(t.length)return this._items=t.get().map(function(t){return h(t)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},c.prototype.initialize=function(){var t,e,i;this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.shuffle&&(t=this.$element).children().sort(function(){return Math.round(Math.random())-.5}).each(function(){t.append(this)}),this.settings.autoWidth&&!this.is("pre-loading")&&(e=this.$element.find("img"),i=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:a,i=this.$element.children(i).width(),e.length&&i<=0&&this.preloadAutoWidthImages(e)),this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},c.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},c.prototype.setup=function(){var e=this.viewport(),t=this.options.responsive,i=-1,s=null;t?(h.each(t,function(t){t<=e&&i<t&&(i=Number(t))}),"function"==typeof(s=h.extend({},this.options,t[i])).stagePadding&&(s.stagePadding=s.stagePadding()),delete s.responsive,s.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+i))):s=h.extend({},this.options),this.trigger("change",{property:{name:"settings",value:s}}),this._breakpoint=i,this.settings=s,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},c.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},c.prototype.prepare=function(t){var e=this.trigger("prepare",{content:t});return e.data||(e.data=h("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(t)),this.trigger("prepared",{content:e.data}),e.data},c.prototype.update=function(){for(var t=0,e=this._pipe.length,i=h.proxy(function(t){return this[t]},this._invalidated),s={};t<e;)(this._invalidated.all||0<h.grep(this._pipe[t].filter,i).length)&&this._pipe[t].run(s),t++;this._invalidated={},this.is("valid")||this.enter("valid")},c.prototype.width=function(t){var e;switch(t=t||c.Width.Default){case c.Width.Inner:case c.Width.Outer:e=this._width,l("calc width for dimention: "+t);default:switch(this.settings.paddingType){case"left":case"right":l("calc width with stagePadding: "+this.settings.paddingType),e=this._width-this.settings.stagePadding+this.settings.margin;break;case"both":l("calc width with stagePadding: "+this.settings.paddingType),e=this._width-2*this.settings.stagePadding+this.settings.margin;break;default:e=this._width+this.settings.margin,l("calc width without stagePadding for dimention: "+t)}}return l("carousel width (no stagepadding and margins): "+e),e},c.prototype.refresh=function(){l("---------------------refresh carousel-----------------------"),l("window width: "+n.innerWidth),l("element width: "+this.$element.width()),l("stage width: "+this.$stage.width()),this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},c.prototype.onThrottledResize=function(){n.clearTimeout(this.resizeTimer),this.resizeTimer=n.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},c.prototype.onResize=function(){return l("---------------------resize carousel-----------------------"),this._items.length?this.isVisible()?(l("resizing"),this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.$stage.parent().css({width:""}),this.refresh(),this.update(),this.leave("resizing"),void this.trigger("resized"))):(l("not visible"),!1):(l("same length"),!1)},c.prototype.registerEventHandlers=function(){h.support.transition&&this.$stage.on(h.support.transition.end+".owl.core",h.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(n,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",h.proxy(this.onDragEnd,this)))},c.prototype.onDragStart=function(t){var e=null;3!==t.which&&(e=h.support.transform?{x:(e=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===e.length?12:4],y:e[16===e.length?13:5]}:(e=this.$stage.position(),{x:this.settings.rtl?e.left+this.$stage.width()-this.width()+this.settings.margin:e.left,y:e.top}),this.is("animating")&&(h.support.transform?this.animate(e.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===t.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=h(t.target),this._drag.stage.start=e,this._drag.stage.current=e,this._drag.pointer=this.pointer(t),h(s).on("mouseup.owl.core touchend.owl.core",h.proxy(this.onDragEnd,this)),h(s).one("mousemove.owl.core touchmove.owl.core",h.proxy(function(t){var e=this.difference(this._drag.pointer,this.pointer(t));h(s).on("mousemove.owl.core touchmove.owl.core",h.proxy(this.onDragMove,this)),Math.abs(e.x)<Math.abs(e.y)&&this.is("valid")||(t.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},c.prototype.onDragMove=function(t){var e,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(i=this.coordinates(this.minimum()),s=this.coordinates(this.maximum()+1)-i,o.x=((o.x-i)%s+s)%s+i):(i=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),s=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),e=this.settings.pullDrag?-1*n.x/5:0,o.x=Math.max(Math.min(o.x,i+e),s+e)),this._drag.stage.current=o,this.animate(o.x))},c.prototype.onDragEnd=function(t){var e=this.difference(this._drag.pointer,this.pointer(t)),i=this._drag.stage.current,t=0<e.x^this.settings.rtl?"left":"right";h(s).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==e.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(i.x,0!==e.x?t:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=t,(3<Math.abs(e.x)||300<(new Date).getTime()-this._drag.time)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},c.prototype.closest=function(i,s){var n=-1,o=this.width(),r=this.coordinates();return this.settings.freeDrag||h.each(r,h.proxy(function(t,e){return"left"===s&&e-30<i&&i<e+30?n=t:"right"===s&&e-o-30<i&&i<e-o+30?n=t+1:this.op(i,"<",e)&&this.op(i,">",r[t+1]!==a?r[t+1]:e-o)&&(n="left"===s?t+1:t),-1===n},this)),this.settings.loop||(this.op(i,">",r[this.minimum()])?n=i=this.minimum():this.op(i,"<",r[this.maximum()])&&(n=i=this.maximum())),n},c.prototype.animate=function(t){var e=0<this.speed();this.is("animating")&&this.onTransitionEnd(),e&&(this.enter("animating"),this.trigger("translate")),h.support.transition?(l("Go to coordinate: "+t),this.$stage.css({transform:"translateX("+t+"px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")})):e?this.$stage.animate({left:t+"px"},this.speed(),this.settings.fallbackEasing,h.proxy(this.onTransitionEnd,this)):this.$stage.css({left:t+"px"}),this.scrollToHead()},c.prototype.is=function(t){return this._states.current[t]&&0<this._states.current[t]},c.prototype.current=function(t){return t===a?this._current:0===this._items.length?a:(t=this.normalize(t),this._current!==t&&((e=this.trigger("change",{property:{name:"position",value:t}})).data!==a&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})),this._current);var e},c.prototype.invalidate=function(t){return"string"===h.type(t)&&(this._invalidated[t]=!0,this.is("valid")&&this.leave("valid")),h.map(this._invalidated,function(t,e){return e})},c.prototype.reset=function(t){(t=this.normalize(t))!==a&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},c.prototype.normalize=function(t,e){var i=this._items.length,e=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=a:(t<0||i+e<=t)&&(t=((t-e/2)%i+i)%i+e/2),t},c.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},c.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=this.$element.width();e--&&!(s<(i+=this._items[e].width()+this.settings.margin)););o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},c.prototype.minimum=function(t){return t?0:this._clones.length/2},c.prototype.items=function(t){return t===a?this._items.slice():(t=this.normalize(t,!0),this._items[t])},c.prototype.mergers=function(t){return t===a?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},c.prototype.clones=function(i){function s(t){return t%2==0?n+t/2:e-(t+1)/2}var e=this._clones.length/2,n=e+this._items.length;return i===a?h.map(this._clones,function(t,e){return s(e)}):h.map(this._clones,function(t,e){return t===i?s(e):null})},c.prototype.speed=function(t){return t!==a&&(this._speed=t),this._speed},c.prototype.coordinates=function(t){var e,i=1,s=t-1;return t===a?h.map(this._coordinates,h.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(i=-1,s=t+1),e=this._coordinates[t],e+=(this.width()-e+(this._coordinates[s]||0))/2*i):e=this._coordinates[s]||0,e=Math.ceil(e))},c.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},c.prototype.to=function(t,e){var i,s=this.current(),n=t-this.relative(s),o=(0<n)-(n<0),r=this._items.length,a=this.minimum(),h=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>r/2&&(n+=-1*o*r),(i=(((t=s+n)-a)%r+r)%r+a)!==t&&i-n<=h&&0<i-n&&(s=i-n,t=i,this.reset(s))):t=this.settings.rewind?(t%(h+=1)+h)%h:Math.max(a,Math.min(h,t)),this.speed(this.duration(s,t,e)),this.current(t),this.isVisible()&&this.update()},c.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},c.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},c.prototype.onTransitionEnd=function(t){if(t!==a&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},c.prototype.viewport=function(){var t;return this.options.responsiveBaseElement!==n?t=h(this.options.responsiveBaseElement).width():n.innerWidth?t=n.innerWidth:s.documentElement&&s.documentElement.clientWidth?t=s.documentElement.clientWidth:console.warn("Can not detect viewport width."),t},c.prototype.replace=function(t){this.$stage.empty(),this._items=[],t=t&&(t instanceof jQuery?t:h(t)),this.settings.nestedItemSelector&&(t=t.find("."+this.settings.nestedItemSelector)),t&&t.length&&t.filter(function(){return 1===this.nodeType}).each(h.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(+e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},c.prototype.add=function(t,e){var i=this.relative(this._current);e=e===a?this._items.length:this.normalize(e,!0),t=t instanceof jQuery?t:h(t),this.trigger("add",{content:t,position:e}),t=this.prepare(t),0===this._items.length||e===this._items.length?(0===this._items.length&&this.$stage.append(t),0!==this._items.length&&this._items[e-1].after(t),this._items.push(t),this._mergers.push(+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[e].before(t),this._items.splice(e,0,t),this._mergers.splice(e,0,+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[i]&&this.reset(this._items[i].index()),this.invalidate("items"),this.trigger("added",{content:t,position:e})},c.prototype.remove=function(t){(t=this.normalize(t,!0))!==a&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},c.prototype.preloadAutoWidthImages=function(t){t.each(h.proxy(function(t,e){this.enter("pre-loading"),e=h(e),h(new Image).one("load",h.proxy(function(t){e.attr("src",t.target.src),e.css("opacity",1),this.leave("pre-loading"),this.is("pre-loading")||this.is("initializing")||this.refresh()},this)).attr("src",e.attr("src")||e.attr("data-src")||e.attr("data-src-retina"))},this))},c.prototype.isElementInViewport=function(t){var e=t.offset().top,i=e+t.outerHeight(),s=jQuery(n).scrollTop(),t=s+jQuery(n).height();return s<i&&e<t},c.prototype.scrollToTop=function(t,e){jQuery("html, body").animate({scrollTop:t+e},400)},c.prototype.scrollToHead=function(){if(0==this.settings.scrollToHead)return!1;if(1==this.settings.autoplay)return!1;if(this.is("initializing"))return!1;if(this.is("resizing"))return!1;var t=this.$element;if(1==this.isElementInViewport(t))return!1;var e=this.$element.offset().top,t=this.settings.scrollToHeadOffset;this.scrollToTop(e,t)},c.prototype.destroy=function(){for(var t in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),h(s).off(".owl.core"),!1!==this.settings.responsive&&(n.clearTimeout(this.resizeTimer),this.off(n,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[t].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},c.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?i<t:t<i;case">":return s?t<i:i<t;case">=":return s?t<=i:i<=t;case"<=":return s?i<=t:t<=i}},c.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},c.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},c.prototype.trigger=function(t,e,i,s,n){var o={item:{count:this._items.length,index:this.current()}},r=h.camelCase(h.grep(["on",t,i],function(t){return t}).join("-").toLowerCase()),a=h.Event([t,"owl",i||"carousel"].join(".").toLowerCase(),h.extend({relatedTarget:this},o,e));return this._supress[t]||(h.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(a)}),this.register({type:c.Type.Event,name:t}),this.$element.trigger(a),this.settings&&"function"==typeof this.settings[r]&&this.settings[r].call(this,a)),a},c.prototype.enter=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){this._states.current[e]===a&&(this._states.current[e]=0),this._states.current[e]++},this))},c.prototype.leave=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){this._states.current[e]--},this))},c.prototype.register=function(i){var e;i.type===c.Type.Event?(h.event.special[i.name]||(h.event.special[i.name]={}),h.event.special[i.name].owl||(e=h.event.special[i.name]._default,h.event.special[i.name]._default=function(t){return!e||!e.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&-1<t.namespace.indexOf("owl"):e.apply(this,arguments)},h.event.special[i.name].owl=!0)):i.type===c.Type.State&&(this._states.tags[i.name]?this._states.tags[i.name]=this._states.tags[i.name].concat(i.tags):this._states.tags[i.name]=i.tags,this._states.tags[i.name]=h.grep(this._states.tags[i.name],h.proxy(function(t,e){return h.inArray(t,this._states.tags[i.name])===e},this)))},c.prototype.suppress=function(t){h.each(t,h.proxy(function(t,e){this._supress[e]=!0},this))},c.prototype.release=function(t){h.each(t,h.proxy(function(t,e){delete this._supress[e]},this))},c.prototype.pointer=function(t){var e={x:null,y:null};return(t=(t=t.originalEvent||t||n.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(e.x=t.pageX,e.y=t.pageY):(e.x=t.clientX,e.y=t.clientY),e},c.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},c.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},h.fn.owlCarousel=function(e){var s=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=h(this),i=t.data("owl.carousel");i||(i=new c(this,"object"==typeof e&&e),t.data("owl.carousel",i),h.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(t,e){i.register({type:c.Type.Event,name:e}),i.$element.on(e+".owl.carousel.core",h.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([e]),i[e].apply(this,[].slice.call(arguments,1)),this.release([e]))},i))})),"string"==typeof e&&"_"!==e.charAt(0)&&i[e].apply(i,s)})},h.fn.owlCarousel.Constructor=c}(window.Zepto||window.jQuery,window,document),function(e,i){var s=function(t){this._core=t,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":e.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=e.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers)};s.Defaults={autoRefresh:!0,autoRefreshInterval:500},s.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=i.setInterval(e.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},s.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},s.prototype.destroy=function(){var t,e;for(t in i.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},e.fn.owlCarousel.Constructor.Plugins.AutoRefresh=s}(window.Zepto||window.jQuery,window,document),function(a,n){var e=function(t){this._core=t,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(t){if(t.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(t.property&&"position"==t.property.name||"initialized"==t.type)){var e=this._core.settings,i=e.center&&Math.ceil(e.items/2)||e.items,s=e.center&&-1*i||0,n=(t.property&&void 0!==t.property.value?t.property.value:this._core.current())+s,o=this._core.clones().length,r=a.proxy(function(t,e){this.load(e)},this);for(0<e.lazyLoadEager&&(i+=e.lazyLoadEager,e.loop&&(n-=e.lazyLoadEager,i++));s++<i;)this.load(o/2+this._core.relative(n)),o&&a.each(this._core.clones(this._core.relative(n)),r),n++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(t){var e=this._core.$stage.children().eq(t),t=e&&e.find(".owl-lazy");!t||-1<a.inArray(e.get(0),this._loaded)||(t.each(a.proxy(function(t,e){var i=a(e),s=1<n.devicePixelRatio&&i.attr("data-src-retina")||i.attr("data-src")||i.attr("data-srcset");this._core.trigger("load",{element:i,url:s},"lazy"),i.is("img")?i.one("load.owl.lazy",a.proxy(function(){i.css("opacity",1),this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("src",s):i.is("source")?i.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("srcset",s):((e=new Image).onload=a.proxy(function(){i.css({"background-image":'url("'+s+'")',opacity:"1"}),this._core.trigger("loaded",{element:i,url:s},"lazy")},this),e.src=s)},this)),this._loaded.push(e.get(0)))},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(n,i){var s=function(t){this._core=t,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=n.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var e=this;n(i).on("load",function(){e._core.settings.autoHeight&&e.update()}),n(i).resize(function(){e._core.settings.autoHeight&&(null!=e._intervalId&&clearTimeout(e._intervalId),e._intervalId=setTimeout(function(){e.update()},250))})};s.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},s.prototype.update=function(){var t=this._core._current,e=t+this._core.settings.items,i=this._core.settings.lazyLoad,t=this._core.$stage.children().toArray().slice(t,e),s=[],e=0;n.each(t,function(t,e){s.push(n(e).height())}),(e=Math.max.apply(null,s))<=1&&i&&this._previousHeight&&(e=this._previousHeight),this._previousHeight=e,this._core.$stage.parent().height(e).addClass(this._core.settings.autoHeightClass)},s.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},n.fn.owlCarousel.Constructor.Plugins.AutoHeight=s}(window.Zepto||window.jQuery,window,document),function(c,e){var i=function(t){this._core=t,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":c.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":c.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":c.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":c.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":c.proxy(function(t){var e;!t.namespace||(e=c(t.content).find(".owl-video")).length&&(e.css("display","none"),this.fetch(e,c(t.content)))},this)},this._core.options=c.extend({},i.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",c.proxy(function(t){this.play(t)},this))};i.Defaults={video:!1,videoHeight:!1,videoWidth:!1},i.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if(-1<(s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu"))i="youtube";else if(-1<s[3].indexOf("vimeo"))i="vimeo";else{if(!(-1<s[3].indexOf("vzaar")))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},i.prototype.thumbnail=function(e,t){function i(t){s=l.lazyLoad?c("<div/>",{class:"owl-video-tn "+h,srcType:t}):c("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+t+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')}var s,n,o=t.width&&t.height?"width:"+t.width+"px;height:"+t.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings;if(e.wrap(c("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return i(r.attr(a)),r.remove(),!1;"youtube"===t.type?(n="//img.youtube.com/vi/"+t.id+"/hqdefault.jpg",i(n)):"vimeo"===t.type?c.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,i(n)}}):"vzaar"===t.type&&c.ajax({type:"GET",url:"//vzaar.com/api/videos/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,i(n)}})},i.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},i.prototype.play=function(t){var e=c(t.target).closest("."+this._core.settings.itemClass),i=this._videos[e.attr("data-video")],s=i.width||"100%",n=i.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),(t=c('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",n),t.attr("width",s),"youtube"===i.type?t.attr("src","//www.youtube.com/embed/"+i.id+"?autoplay=1&rel=0&v="+i.id):"vimeo"===i.type?t.attr("src","//player.vimeo.com/video/"+i.id+"?autoplay=1"):"vzaar"===i.type&&t.attr("src","//view.vzaar.com/"+i.id+"/player?autoplay=true"),c(t).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},i.prototype.isInFullScreen=function(){var t=e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement;return t&&c(t).parent().hasClass("owl-video-frame")},i.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},c.fn.owlCarousel.Constructor.Plugins.Video=i}(window.Zepto||window.jQuery,(window,document)),function(r){var e=function(t){this.core=t,this.core.options=r.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":r.proxy(function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":r.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":r.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&r.support.animation&&r.support.transition){var t=this.core._speed;this.core.speed(0),t=t||1e3;var e=r.proxy(this.clear,this),i=this.core.$stage.children().eq(this.previous),s=this.core.$stage.children().eq(this.next),n=this.core.settings.animateIn,o=this.core.settings.animateOut;if(this.core.current()!==this.previous){if(o){if(i.one(r.support.animation.end,e).addClass("animated owl-animated-out").addClass(o),"none"==jQuery("."+o).css("animation-name"))return void this.core.speed(t);t=this.core.coordinates(this.previous)-this.core.coordinates(this.next),i.css({left:t+"px"})}n&&s.one(r.support.animation.end,e).addClass("animated owl-animated-in").addClass(n)}}},e.prototype.clear=function(t){r(t.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},r.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,(window,document)),function(s,n,e){var i=function(t){this._core=t,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":s.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":s.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":s.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":s.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=s.extend({},i.Defaults,this._core.options)};i.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},i.prototype._next=function(t){this._call=n.setTimeout(s.proxy(this._next,this,t),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||e.hidden||this._core.next(t||this._core.settings.autoplaySpeed)},i.prototype.read=function(){return(new Date).getTime()-this._time},i.prototype.play=function(t,e){var i;this._core.is("rotating")||this._core.enter("rotating"),t=t||this._core.settings.autoplayTimeout,i=Math.min(this._time%(this._timeout||t),t),this._paused?(this._time=this.read(),this._paused=!1):n.clearTimeout(this._call),this._time+=this.read()%t-i,this._timeout=t,this._call=n.setTimeout(s.proxy(this._next,this,e),t-i)},i.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,n.clearTimeout(this._call),this._core.leave("rotating"))},i.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,n.clearTimeout(this._call))},i.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.autoplay=i}(window.Zepto||window.jQuery,window,document),function(n){"use strict";var e=function(t){this._core=t,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+n(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":n.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=n.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,changeItemOnClick:!1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var t,e,i,s=this._core.settings;for(t in this._controls.$relative=(s.navContainer?n(s.navContainer):n("<div>").addClass(s.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=n("<"+s.navElement+' value="previous item" title="previous item">').addClass(s.navClass[0]).html(s.navText[0]).prependTo(this._controls.$relative).on("click",n.proxy(function(t){this.prev(s.navSpeed)},this)),this._controls.$next=n("<"+s.navElement+' value="next item" title="next item">').addClass(s.navClass[1]).html(s.navText[1]).appendTo(this._controls.$relative).on("click",n.proxy(function(t){this.next(s.navSpeed)},this)),s.changeItemOnClick&&(e=this._core.$stage.children(),i=this._core.clones().length/2,e.on("click",n.proxy(function(t){t=n(t.currentTarget).index();this.to(t-i,s.navSpeed,!0)},this))),s.dotsData||(this._templates=[n('<button role="button">').addClass(s.dotClass).append(n("<span>")).prop("outerHTML")]),this._controls.$absolute=(s.dotsContainer?n(s.dotsContainer):n("<div>").addClass(s.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",n.proxy(function(t){var e=(n(t.target).parent().is(this._controls.$absolute)?n(t.target):n(t.target).parent()).index();t.preventDefault(),this.to(e,s.dotsSpeed)},this)),this._overrides)this._core[t]=n.proxy(this[t],this)},e.prototype.destroy=function(){var t,e,i,s,n=this._core.settings;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},e.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0;t<s;t++){if(r<=e||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},e.prototype.draw=function(){var t=this._core.settings,e=this._core.items().length<=t.items,i=this._core.relative(this._core.current()),s=t.loop||t.rewind;this._controls.$relative.toggleClass("disabled",!t.nav||e),t.nav&&(this._controls.$previous.toggleClass("disabled",!s&&i<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!s&&i>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!t.dots||e),t.dots&&(e=this._pages.length-this._controls.$absolute.children().length,t.dotsData&&0!=e?this._controls.$absolute.html(this._templates.join("")):0<e?this._controls.$absolute.append(new Array(1+e).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(n.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(t){var e=this._core.settings;t.page={index:n.inArray(this.current(),this._pages),count:this._pages.length,size:e&&(e.center||e.autoWidth||e.dotsData?1:e.dotsEach||e.items)}},e.prototype.current=function(){var i=this._core.relative(this._core.current());return n.grep(this._pages,n.proxy(function(t,e){return t.start<=i&&t.end>=i},this)).pop()},e.prototype.getPosition=function(t){var e,i,s=this._core.settings;return"page"==s.slideBy?(e=n.inArray(this.current(),this._pages),i=this._pages.length,t?++e:--e,e=this._pages[(e%i+i)%i].start):(e=this._core.relative(this._core.current()),i=this._core.items().length,t?e+=s.slideBy:e-=s.slideBy),e},e.prototype.next=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!0),t)},e.prototype.prev=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!1),t)},e.prototype.to=function(t,e,i){!i&&this._pages.length?(i=this._pages.length,n.proxy(this._overrides.to,this._core)(this._pages[(t%i+i)%i].start,e)):n.proxy(this._overrides.to,this._core)(t,e)},n.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,(window,document)),function(s,n){"use strict";var e=function(t){this._core=t,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":s.proxy(function(t){t.namespace&&"URLHash"===this._core.settings.startPosition&&s(n).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":s.proxy(function(t){var e;!t.namespace||(e=s(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"))&&(this._hashes[e]=t.content)},this),"changed.owl.carousel":s.proxy(function(t){var i;t.namespace&&"position"===t.property.name&&(i=this._core.items(this._core.relative(this._core.current())),(t=s.map(this._hashes,function(t,e){return t===i?e:null}).join())&&n.location.hash.slice(1)!==t&&(n.location.hash=t))},this)},this._core.options=s.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),s(n).on("hashchange.owl.navigation",s.proxy(function(t){var e=n.location.hash.substring(1),i=this._core.$stage.children(),e=this._hashes[e]&&i.index(this._hashes[e]);void 0!==e&&e!==this._core.current()&&this._core.to(this._core.relative(e),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var t,e;for(t in s(n).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(n,o){var r=n("<support>").get(0).style,a="Webkit Moz O ms".split(" "),t={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},e=function(){return!!h("transform")},i=function(){return!!h("perspective")},s=function(){return!!h("animation")};function h(t,i){var s=!1,e=t.charAt(0).toUpperCase()+t.slice(1);return n.each((t+" "+a.join(e+" ")+e).split(" "),function(t,e){if(r[e]!==o)return s=!i||e,!1}),s}function l(t){return h(t,!0)}!function(){return!!h("transition")}()||(n.support.transition=new String(l("transition")),n.support.transition.end=t.transition.end[n.support.transition]),s()&&(n.support.animation=new String(l("animation")),n.support.animation.end=t.animation.end[n.support.animation]),e()&&(n.support.transform=new String(l("transform")),n.support.transform3d=i())}(window.Zepto||window.jQuery,(window,void document));
1
  /**
2
+ * Owl Carousel v2.3.8 - UE8
3
  * Copyright 2013-2018 David Deutsch
4
  * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
5
  */
16
  * @todo stagePadding calculate wrong active classes
17
  */
18
 
19
+ !function(h,n,s,a){function e(t){console.log(t)}var o=!1;function l(t){0!=o&&e(t)}function c(t,e){this.settings=null,this.options=h.extend({},c.Defaults,e),this.$element=h(t),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this.getItemWidth=function(){switch(this.settings.paddingType){case"left":case"right":case"both":default:var t=(this.width()/this.settings.items).toFixed(3)-this.settings.margin}return this.settings.item_size_gap&&(t+=this.settings.item_size_gap),t},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},h.each(["onResize","onThrottledResize"],h.proxy(function(t,e){this._handlers[e]=h.proxy(this[e],this)},this)),h.each(c.Plugins,h.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),h.each(c.Workers,h.proxy(function(t,e){this._pipe.push({filter:e.filter,run:h.proxy(e.run,this)})},this)),this.setup(),this.initialize()}c.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,setActiveClass:!0,setActiveClassOnMobile:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,paddingType:"none",stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:n,fallbackEasing:"swing",slideTransition:"",info:!1,scrollToHead:!1,scrollToHeadOffset:0,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab",shuffle:!1,item_size_gap:0,pixel_gap_fix:!1,debug:!1},c.Width={Default:"default",Inner:"inner",Outer:"outer"},c.Type={Event:"event",State:"state"},c.Plugins={},c.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width(),l("set total width this._width: "+this._width)}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,e={width:"auto","margin-left":s?e:"","margin-right":s?"":e};i||this.$stage.children().css(e),t.css=e}},{filter:["width","items","settings"],run:function(t){!0===this.settings.debug&&(o=!0),l("run!"),1==this.settings.items&&1==this.settings.pixel_gap_fix&&(this.settings.item_size_gap=1,l("set items size gap: 1")),l("settings - stage padding type: "+this.settings.paddingType),l("settings - stage padding: "+this.settings.stagePadding),this.settings.paddingType&&"none"!=this.settings.paddingType||!this.settings.stagePadding||(this.settings.paddingType="both",l("set stage padding type - both"));var e,i=this.getItemWidth();for(l("Item width: "+i),this.settings.stagePadding>i&&(this.settings.stagePadding=0,e=this.getItemWidth(),this.settings.stagePadding=Math.floor(.5*e),i=this.getItemWidth(),l("set new stagePadding: "+this.settings.stagePadding+" and item width: "+i)),merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[],t.items={merge:!1,width:i};iterator--;)merge=this._mergers[iterator],merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge,t.items.merge=1<merge||t.items.merge,widths[iterator]=grid?i*merge:this._items[iterator].width();this._widths=widths}},{filter:["items","settings"],run:function(){var t=[],e=this._items,i=this.settings,s=Math.max(2*i.items,4),n=2*Math.ceil(e.length/2),o=i.loop&&e.length?i.rewind?s:Math.max(s,n):0,r="",a="";for(o/=2;0<o;)t.push(this.normalize(t.length/2,!0)),r+=e[t[t.length-1]][0].outerHTML,t.push(this.normalize(e.length-1-(t.length-1)/2,!0)),a=e[t[t.length-1]][0].outerHTML+a,--o;this._clones=t,h(r).addClass("cloned").appendTo(this.$stage),h(a).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=[];++i<e;){var n=(s[i-1]||0)+(this._widths[this.relative(i)]+this.settings.margin)*t;s.push(n)}if(this.settings.item_size_gap)for(var o in s)s[o]-=this.settings.item_size_gap;l("Set coordinates"),l(s),this._coordinates=s}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i=this.settings.paddingType,s=this.$stage.parent(),n=s.width();l("parent Outer Stage Width: "+s.width()),l("element width this.$element.width(): "+this.$element.width());var o={width:Math.ceil(Math.abs(e[e.length-1])),"padding-left":"","padding-right":""},r={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""},a={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":t||"","padding-right":""},t={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":"","padding-right":t||""},n={width:n};l("set outer stage css"),l(n),"none"==i?(this.$stage.css(o),s.width(n)):"both"==i?(this.$stage.css(r),s.css(n),l("Set stage width css (both)"),l(r)):"left"==i?(this.$stage.css(a),s.css(n),l("Set stage width css (left)"),l(a)):"right"==i&&(this.$stage.css(t),s.css(n),l("Set stage width css (right)"),l(t))}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,r=this.coordinates(this.current())+o,a=r+this.width()*n,h=[];for("left"!=this.settings.paddingType&&"right"!=this.settings.paddingType||(o=this.settings.stagePadding),i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*n,(this.op(t,"<=",r)&&this.op(t,">",a)||this.op(e,"<",r)&&this.op(e,">",a))&&h.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+h.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}},{filter:["width","position","items","settings"],run:function(){var t;this.settings.setActiveClass&&this.settings.setActiveClass&&(t=!0,this.settings.setActiveClassOnMobile?1==this.$stage.children(".active").length&&(t=!0):this.settings.setActiveClassOnMobile||1==this.$stage.children(".active").length&&(t=!1),1==t?this.$stage.children().eq(this.current()).addClass("uc-active-item").siblings().removeClass("uc-active-item"):0==t&&this.$stage.children().removeClass("uc-active-item"))}}],c.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=h("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(h("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},c.prototype.initializeItems=function(){var t=this.$element.find(".owl-item");if(t.length)return this._items=t.get().map(function(t){return h(t)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},c.prototype.initialize=function(){var t,e,i;this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.shuffle&&(t=this.$element).children().sort(function(){return Math.round(Math.random())-.5}).each(function(){t.append(this)}),this.settings.autoWidth&&!this.is("pre-loading")&&(e=this.$element.find("img"),i=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:a,i=this.$element.children(i).width(),e.length&&i<=0&&this.preloadAutoWidthImages(e)),this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},c.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},c.prototype.setup=function(){var e=this.viewport(),t=this.options.responsive,i=-1,s=null;t?(h.each(t,function(t){t<=e&&i<t&&(i=Number(t))}),"function"==typeof(s=h.extend({},this.options,t[i])).stagePadding&&(s.stagePadding=s.stagePadding()),delete s.responsive,s.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+i))):s=h.extend({},this.options),this.trigger("change",{property:{name:"settings",value:s}}),this._breakpoint=i,this.settings=s,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},c.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},c.prototype.prepare=function(t){var e=this.trigger("prepare",{content:t});return e.data||(e.data=h("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(t)),this.trigger("prepared",{content:e.data}),e.data},c.prototype.update=function(){for(var t=0,e=this._pipe.length,i=h.proxy(function(t){return this[t]},this._invalidated),s={};t<e;)(this._invalidated.all||0<h.grep(this._pipe[t].filter,i).length)&&this._pipe[t].run(s),t++;this._invalidated={},this.is("valid")||this.enter("valid")},c.prototype.width=function(t){var e;switch(t=t||c.Width.Default){case c.Width.Inner:case c.Width.Outer:e=this._width,l("calc width for dimention: "+t);default:switch(this.settings.paddingType){case"left":case"right":l("calc width with stagePadding: "+this.settings.paddingType),e=this._width-this.settings.stagePadding+this.settings.margin;break;case"both":l("calc width with stagePadding: "+this.settings.paddingType),e=this._width-2*this.settings.stagePadding+this.settings.margin;break;default:e=this._width+this.settings.margin,l("calc width without stagePadding for dimention: "+t)}}return l("carousel width (no stagepadding and margins): "+e),e},c.prototype.refresh=function(){l("---------------------refresh carousel-----------------------"),l("window width: "+n.innerWidth),l("element width: "+this.$element.width()),l("stage width: "+this.$stage.width()),this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},c.prototype.onThrottledResize=function(){n.clearTimeout(this.resizeTimer),this.resizeTimer=n.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},c.prototype.onResize=function(){return l("---------------------resize carousel-----------------------"),this._items.length?this.isVisible()?(l("resizing"),this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.$stage.parent().css({width:""}),this.refresh(),this.update(),this.leave("resizing"),void this.trigger("resized"))):(l("not visible"),!1):(l("same length"),!1)},c.prototype.registerEventHandlers=function(){h.support.transition&&this.$stage.on(h.support.transition.end+".owl.core",h.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(n,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",h.proxy(this.onDragEnd,this)))},c.prototype.onDragStart=function(t){var e=null;3!==t.which&&(e=h.support.transform?{x:(e=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===e.length?12:4],y:e[16===e.length?13:5]}:(e=this.$stage.position(),{x:this.settings.rtl?e.left+this.$stage.width()-this.width()+this.settings.margin:e.left,y:e.top}),this.is("animating")&&(h.support.transform?this.animate(e.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===t.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=h(t.target),this._drag.stage.start=e,this._drag.stage.current=e,this._drag.pointer=this.pointer(t),h(s).on("mouseup.owl.core touchend.owl.core",h.proxy(this.onDragEnd,this)),h(s).one("mousemove.owl.core touchmove.owl.core",h.proxy(function(t){var e=this.difference(this._drag.pointer,this.pointer(t));h(s).on("mousemove.owl.core touchmove.owl.core",h.proxy(this.onDragMove,this)),Math.abs(e.x)<Math.abs(e.y)&&this.is("valid")||(t.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},c.prototype.onDragMove=function(t){var e,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(i=this.coordinates(this.minimum()),s=this.coordinates(this.maximum()+1)-i,o.x=((o.x-i)%s+s)%s+i):(i=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),s=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),e=this.settings.pullDrag?-1*n.x/5:0,o.x=Math.max(Math.min(o.x,i+e),s+e)),this._drag.stage.current=o,this.animate(o.x))},c.prototype.onDragEnd=function(t){var e=this.difference(this._drag.pointer,this.pointer(t)),i=this._drag.stage.current,t=0<e.x^this.settings.rtl?"left":"right";h(s).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==e.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(i.x,0!==e.x?t:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=t,(3<Math.abs(e.x)||300<(new Date).getTime()-this._drag.time)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},c.prototype.closest=function(i,s){var n=-1,o=this.width(),r=this.coordinates();return this.settings.freeDrag||h.each(r,h.proxy(function(t,e){return"left"===s&&e-30<i&&i<e+30?n=t:"right"===s&&e-o-30<i&&i<e-o+30?n=t+1:this.op(i,"<",e)&&this.op(i,">",r[t+1]!==a?r[t+1]:e-o)&&(n="left"===s?t+1:t),-1===n},this)),this.settings.loop||(this.op(i,">",r[this.minimum()])?n=i=this.minimum():this.op(i,"<",r[this.maximum()])&&(n=i=this.maximum())),n},c.prototype.animate=function(t){var e=0<this.speed();this.is("animating")&&this.onTransitionEnd(),e&&(this.enter("animating"),this.trigger("translate")),h.support.transition?(l("Go to coordinate: "+t),this.$stage.css({transform:"translateX("+t+"px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")})):e?this.$stage.animate({left:t+"px"},this.speed(),this.settings.fallbackEasing,h.proxy(this.onTransitionEnd,this)):this.$stage.css({left:t+"px"}),this.scrollToHead()},c.prototype.is=function(t){return this._states.current[t]&&0<this._states.current[t]},c.prototype.current=function(t){return t===a?this._current:0===this._items.length?a:(t=this.normalize(t),this._current!==t&&((e=this.trigger("change",{property:{name:"position",value:t}})).data!==a&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})),this._current);var e},c.prototype.invalidate=function(t){return"string"===h.type(t)&&(this._invalidated[t]=!0,this.is("valid")&&this.leave("valid")),h.map(this._invalidated,function(t,e){return e})},c.prototype.reset=function(t){(t=this.normalize(t))!==a&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},c.prototype.normalize=function(t,e){var i=this._items.length,e=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=a:(t<0||i+e<=t)&&(t=((t-e/2)%i+i)%i+e/2),t},c.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},c.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=this.$element.width();e--&&!(s<(i+=this._items[e].width()+this.settings.margin)););o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},c.prototype.minimum=function(t){return t?0:this._clones.length/2},c.prototype.items=function(t){return t===a?this._items.slice():(t=this.normalize(t,!0),this._items[t])},c.prototype.mergers=function(t){return t===a?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},c.prototype.clones=function(i){function s(t){return t%2==0?n+t/2:e-(t+1)/2}var e=this._clones.length/2,n=e+this._items.length;return i===a?h.map(this._clones,function(t,e){return s(e)}):h.map(this._clones,function(t,e){return t===i?s(e):null})},c.prototype.speed=function(t){return t!==a&&(this._speed=t),this._speed},c.prototype.coordinates=function(t){var e,i=1,s=t-1;return t===a?h.map(this._coordinates,h.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(i=-1,s=t+1),e=this._coordinates[t],e+=(this.width()-e+(this._coordinates[s]||0))/2*i):e=this._coordinates[s]||0,e=Math.ceil(e))},c.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},c.prototype.to=function(t,e){var i,s=this.current(),n=t-this.relative(s),o=(0<n)-(n<0),r=this._items.length,a=this.minimum(),h=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>r/2&&(n+=-1*o*r),(i=(((t=s+n)-a)%r+r)%r+a)!==t&&i-n<=h&&0<i-n&&(s=i-n,t=i,this.reset(s))):t=this.settings.rewind?(t%(h+=1)+h)%h:Math.max(a,Math.min(h,t)),this.speed(this.duration(s,t,e)),this.current(t),this.isVisible()&&this.update()},c.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},c.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},c.prototype.onTransitionEnd=function(t){if(t!==a&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},c.prototype.viewport=function(){var t;return this.options.responsiveBaseElement!==n?t=h(this.options.responsiveBaseElement).width():n.innerWidth?t=n.innerWidth:s.documentElement&&s.documentElement.clientWidth?t=s.documentElement.clientWidth:console.warn("Can not detect viewport width."),t},c.prototype.replace=function(t){this.$stage.empty(),this._items=[],t=t&&(t instanceof jQuery?t:h(t)),this.settings.nestedItemSelector&&(t=t.find("."+this.settings.nestedItemSelector)),t&&t.length&&t.filter(function(){return 1===this.nodeType}).each(h.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(+e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},c.prototype.add=function(t,e){var i=this.relative(this._current);e=e===a?this._items.length:this.normalize(e,!0),t=t instanceof jQuery?t:h(t),this.trigger("add",{content:t,position:e}),t=this.prepare(t),0===this._items.length||e===this._items.length?(0===this._items.length&&this.$stage.append(t),0!==this._items.length&&this._items[e-1].after(t),this._items.push(t),this._mergers.push(+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[e].before(t),this._items.splice(e,0,t),this._mergers.splice(e,0,+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[i]&&this.reset(this._items[i].index()),this.invalidate("items"),this.trigger("added",{content:t,position:e})},c.prototype.remove=function(t){(t=this.normalize(t,!0))!==a&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},c.prototype.preloadAutoWidthImages=function(t){t.each(h.proxy(function(t,e){this.enter("pre-loading"),e=h(e),h(new Image).one("load",h.proxy(function(t){e.attr("src",t.target.src),e.css("opacity",1),this.leave("pre-loading"),this.is("pre-loading")||this.is("initializing")||this.refresh()},this)).attr("src",e.attr("src")||e.attr("data-src")||e.attr("data-src-retina"))},this))},c.prototype.isElementInViewport=function(t){var e=t.offset().top,i=e+t.outerHeight(),s=jQuery(n).scrollTop(),t=s+jQuery(n).height();return s<i&&e<t},c.prototype.scrollToTop=function(t,e){jQuery("html, body").animate({scrollTop:t+e},400)},c.prototype.scrollToHead=function(){if(0==this.settings.scrollToHead)return!1;if(1==this.settings.autoplay)return!1;if(this.is("initializing"))return!1;if(this.is("resizing"))return!1;var t=this.$element;if(1==this.isElementInViewport(t))return!1;var e=this.$element.offset().top,t=this.settings.scrollToHeadOffset;this.scrollToTop(e,t)},c.prototype.destroy=function(){for(var t in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),h(s).off(".owl.core"),!1!==this.settings.responsive&&(n.clearTimeout(this.resizeTimer),this.off(n,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[t].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},c.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?i<t:t<i;case">":return s?t<i:i<t;case">=":return s?t<=i:i<=t;case"<=":return s?i<=t:t<=i}},c.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},c.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},c.prototype.trigger=function(t,e,i,s,n){var o={item:{count:this._items.length,index:this.current()}},r=h.camelCase(h.grep(["on",t,i],function(t){return t}).join("-").toLowerCase()),a=h.Event([t,"owl",i||"carousel"].join(".").toLowerCase(),h.extend({relatedTarget:this},o,e));return this._supress[t]||(h.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(a)}),this.register({type:c.Type.Event,name:t}),this.$element.trigger(a),this.settings&&"function"==typeof this.settings[r]&&this.settings[r].call(this,a)),a},c.prototype.enter=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){this._states.current[e]===a&&(this._states.current[e]=0),this._states.current[e]++},this))},c.prototype.leave=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){this._states.current[e]--},this))},c.prototype.register=function(i){var e;i.type===c.Type.Event?(h.event.special[i.name]||(h.event.special[i.name]={}),h.event.special[i.name].owl||(e=h.event.special[i.name]._default,h.event.special[i.name]._default=function(t){return!e||!e.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&-1<t.namespace.indexOf("owl"):e.apply(this,arguments)},h.event.special[i.name].owl=!0)):i.type===c.Type.State&&(this._states.tags[i.name]?this._states.tags[i.name]=this._states.tags[i.name].concat(i.tags):this._states.tags[i.name]=i.tags,this._states.tags[i.name]=h.grep(this._states.tags[i.name],h.proxy(function(t,e){return h.inArray(t,this._states.tags[i.name])===e},this)))},c.prototype.suppress=function(t){h.each(t,h.proxy(function(t,e){this._supress[e]=!0},this))},c.prototype.release=function(t){h.each(t,h.proxy(function(t,e){delete this._supress[e]},this))},c.prototype.pointer=function(t){var e={x:null,y:null};return(t=(t=t.originalEvent||t||n.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(e.x=t.pageX,e.y=t.pageY):(e.x=t.clientX,e.y=t.clientY),e},c.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},c.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},h.fn.owlCarousel=function(e){var s=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=h(this),i=t.data("owl.carousel");i||(i=new c(this,"object"==typeof e&&e),t.data("owl.carousel",i),h.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(t,e){i.register({type:c.Type.Event,name:e}),i.$element.on(e+".owl.carousel.core",h.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([e]),i[e].apply(this,[].slice.call(arguments,1)),this.release([e]))},i))})),"string"==typeof e&&"_"!==e.charAt(0)&&i[e].apply(i,s)})},h.fn.owlCarousel.Constructor=c}(window.Zepto||window.jQuery,window,document),function(e,i){var s=function(t){this._core=t,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":e.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=e.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers)};s.Defaults={autoRefresh:!0,autoRefreshInterval:500},s.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=i.setInterval(e.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},s.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},s.prototype.destroy=function(){var t,e;for(t in i.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},e.fn.owlCarousel.Constructor.Plugins.AutoRefresh=s}(window.Zepto||window.jQuery,window,document),function(a,n){var e=function(t){this._core=t,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(t){if(t.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(t.property&&"position"==t.property.name||"initialized"==t.type)){var e=this._core.settings,i=e.center&&Math.ceil(e.items/2)||e.items,s=e.center&&-1*i||0,n=(t.property&&void 0!==t.property.value?t.property.value:this._core.current())+s,o=this._core.clones().length,r=a.proxy(function(t,e){this.load(e)},this);for(0<e.lazyLoadEager&&(i+=e.lazyLoadEager,e.loop&&(n-=e.lazyLoadEager,i++));s++<i;)this.load(o/2+this._core.relative(n)),o&&a.each(this._core.clones(this._core.relative(n)),r),n++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(t){var e=this._core.$stage.children().eq(t),t=e&&e.find(".owl-lazy");!t||-1<a.inArray(e.get(0),this._loaded)||(t.each(a.proxy(function(t,e){var i=a(e),s=1<n.devicePixelRatio&&i.attr("data-src-retina")||i.attr("data-src")||i.attr("data-srcset");this._core.trigger("load",{element:i,url:s},"lazy"),i.is("img")?i.one("load.owl.lazy",a.proxy(function(){i.css("opacity",1),this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("src",s):i.is("source")?i.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("srcset",s):((e=new Image).onload=a.proxy(function(){i.css({"background-image":'url("'+s+'")',opacity:"1"}),this._core.trigger("loaded",{element:i,url:s},"lazy")},this),e.src=s)},this)),this._loaded.push(e.get(0)))},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(n,i){var s=function(t){this._core=t,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=n.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var e=this;n(i).on("load",function(){e._core.settings.autoHeight&&e.update()}),n(i).resize(function(){e._core.settings.autoHeight&&(null!=e._intervalId&&clearTimeout(e._intervalId),e._intervalId=setTimeout(function(){e.update()},250))})};s.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},s.prototype.update=function(){var t=this._core._current,e=t+this._core.settings.items,i=this._core.settings.lazyLoad,t=this._core.$stage.children().toArray().slice(t,e),s=[],e=0;n.each(t,function(t,e){s.push(n(e).height())}),(e=Math.max.apply(null,s))<=1&&i&&this._previousHeight&&(e=this._previousHeight),this._previousHeight=e,this._core.$stage.parent().height(e).addClass(this._core.settings.autoHeightClass)},s.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},n.fn.owlCarousel.Constructor.Plugins.AutoHeight=s}(window.Zepto||window.jQuery,window,document),function(c,e){var i=function(t){this._core=t,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":c.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":c.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":c.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":c.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":c.proxy(function(t){var e;!t.namespace||(e=c(t.content).find(".owl-video")).length&&(e.css("display","none"),this.fetch(e,c(t.content)))},this)},this._core.options=c.extend({},i.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",c.proxy(function(t){this.play(t)},this))};i.Defaults={video:!1,videoHeight:!1,videoWidth:!1},i.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if(-1<(s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu"))i="youtube";else if(-1<s[3].indexOf("vimeo"))i="vimeo";else{if(!(-1<s[3].indexOf("vzaar")))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},i.prototype.thumbnail=function(e,t){function i(t){s=l.lazyLoad?c("<div/>",{class:"owl-video-tn "+h,srcType:t}):c("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+t+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')}var s,n,o=t.width&&t.height?"width:"+t.width+"px;height:"+t.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings;if(e.wrap(c("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return i(r.attr(a)),r.remove(),!1;"youtube"===t.type?(n="//img.youtube.com/vi/"+t.id+"/hqdefault.jpg",i(n)):"vimeo"===t.type?c.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,i(n)}}):"vzaar"===t.type&&c.ajax({type:"GET",url:"//vzaar.com/api/videos/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,i(n)}})},i.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},i.prototype.play=function(t){var e=c(t.target).closest("."+this._core.settings.itemClass),i=this._videos[e.attr("data-video")],s=i.width||"100%",n=i.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),(t=c('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",n),t.attr("width",s),"youtube"===i.type?t.attr("src","//www.youtube.com/embed/"+i.id+"?autoplay=1&rel=0&v="+i.id):"vimeo"===i.type?t.attr("src","//player.vimeo.com/video/"+i.id+"?autoplay=1"):"vzaar"===i.type&&t.attr("src","//view.vzaar.com/"+i.id+"/player?autoplay=true"),c(t).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},i.prototype.isInFullScreen=function(){var t=e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement;return t&&c(t).parent().hasClass("owl-video-frame")},i.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},c.fn.owlCarousel.Constructor.Plugins.Video=i}(window.Zepto||window.jQuery,(window,document)),function(r){var e=function(t){this.core=t,this.core.options=r.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":r.proxy(function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":r.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":r.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&r.support.animation&&r.support.transition){var t=this.core._speed;this.core.speed(0),t=t||1e3;var e=r.proxy(this.clear,this),i=this.core.$stage.children().eq(this.previous),s=this.core.$stage.children().eq(this.next),n=this.core.settings.animateIn,o=this.core.settings.animateOut;if(this.core.current()!==this.previous){if(o){if(i.one(r.support.animation.end,e).addClass("animated owl-animated-out").addClass(o),"none"==jQuery("."+o).css("animation-name"))return void this.core.speed(t);t=this.core.coordinates(this.previous)-this.core.coordinates(this.next),i.css({left:t+"px"})}n&&s.one(r.support.animation.end,e).addClass("animated owl-animated-in").addClass(n)}}},e.prototype.clear=function(t){r(t.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},r.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,(window,document)),function(s,n,e){var i=function(t){this._core=t,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":s.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":s.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":s.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":s.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=s.extend({},i.Defaults,this._core.options)};i.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},i.prototype._next=function(t){this._call=n.setTimeout(s.proxy(this._next,this,t),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||e.hidden||this._core.next(t||this._core.settings.autoplaySpeed)},i.prototype.read=function(){return(new Date).getTime()-this._time},i.prototype.play=function(t,e){var i;this._core.is("rotating")||this._core.enter("rotating"),t=t||this._core.settings.autoplayTimeout,i=Math.min(this._time%(this._timeout||t),t),this._paused?(this._time=this.read(),this._paused=!1):n.clearTimeout(this._call),this._time+=this.read()%t-i,this._timeout=t,this._call=n.setTimeout(s.proxy(this._next,this,e),t-i)},i.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,n.clearTimeout(this._call),this._core.leave("rotating"))},i.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,n.clearTimeout(this._call))},i.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.autoplay=i}(window.Zepto||window.jQuery,window,document),function(n){"use strict";var e=function(t){this._core=t,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+n(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":n.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=n.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,changeItemOnClick:!1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var t,e,i,s=this._core.settings;for(t in this._controls.$relative=s.navContainer?n(s.navContainer):n("<div>").addClass(s.navContainerClass).appendTo(this.$element),this._controls.$previous=n("<"+s.navElement+' value="previous item" title="previous item">').addClass(s.navClass[0]).html(s.navText[0]).prependTo(this._controls.$relative).on("click",n.proxy(function(t){this.prev(s.navSpeed)},this)),this._controls.$next=n("<"+s.navElement+' value="next item" title="next item">').addClass(s.navClass[1]).html(s.navText[1]).appendTo(this._controls.$relative).on("click",n.proxy(function(t){this.next(s.navSpeed)},this)),s.changeItemOnClick&&(e=this._core.$stage.children(),i=this._core.clones().length/2,e.on("click",n.proxy(function(t){t=n(t.currentTarget).index();this.to(t-i,s.navSpeed,!0)},this))),s.dotsData||(this._templates=[n('<button role="button">').addClass(s.dotClass).append(n("<span>")).prop("outerHTML")]),this._controls.$absolute=s.dotsContainer?n(s.dotsContainer):n("<div>").addClass(s.dotsClass).appendTo(this.$element),this._controls.$absolute.on("click","button",n.proxy(function(t){var e=(n(t.target).parent().is(this._controls.$absolute)?n(t.target):n(t.target).parent()).index();t.preventDefault(),this.to(e,s.dotsSpeed)},this)),this._overrides)this._core[t]=n.proxy(this[t],this)},e.prototype.destroy=function(){var t,e,i,s,n=this._core.settings;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},e.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0;t<s;t++){if(r<=e||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},e.prototype.draw=function(){var t=this._core.settings,e=(this._core.items().length,t.items,this._core.relative(this._core.current())),i=t.loop||t.rewind;0==t.nav&&this._controls.$relative.remove(),1==t.nav&&(this._controls.$previous.toggleClass("disabled",!i&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!i&&e>=this._core.maximum(!0))),0==t.dots&&this._controls.$absolute.remove(),t.dots&&(e=this._pages.length-this._controls.$absolute.children().length,t.dotsData&&0!=e?this._controls.$absolute.html(this._templates.join("")):0<e?this._controls.$absolute.append(new Array(1+e).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(n.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(t){var e=this._core.settings;t.page={index:n.inArray(this.current(),this._pages),count:this._pages.length,size:e&&(e.center||e.autoWidth||e.dotsData?1:e.dotsEach||e.items)}},e.prototype.current=function(){var i=this._core.relative(this._core.current());return n.grep(this._pages,n.proxy(function(t,e){return t.start<=i&&t.end>=i},this)).pop()},e.prototype.getPosition=function(t){var e,i,s=this._core.settings;return"page"==s.slideBy?(e=n.inArray(this.current(),this._pages),i=this._pages.length,t?++e:--e,e=this._pages[(e%i+i)%i].start):(e=this._core.relative(this._core.current()),i=this._core.items().length,t?e+=s.slideBy:e-=s.slideBy),e},e.prototype.next=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!0),t)},e.prototype.prev=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!1),t)},e.prototype.to=function(t,e,i){!i&&this._pages.length?(i=this._pages.length,n.proxy(this._overrides.to,this._core)(this._pages[(t%i+i)%i].start,e)):n.proxy(this._overrides.to,this._core)(t,e)},n.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,(window,document)),function(s,n){"use strict";var e=function(t){this._core=t,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":s.proxy(function(t){t.namespace&&"URLHash"===this._core.settings.startPosition&&s(n).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":s.proxy(function(t){var e;!t.namespace||(e=s(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"))&&(this._hashes[e]=t.content)},this),"changed.owl.carousel":s.proxy(function(t){var i;t.namespace&&"position"===t.property.name&&(i=this._core.items(this._core.relative(this._core.current())),(t=s.map(this._hashes,function(t,e){return t===i?e:null}).join())&&n.location.hash.slice(1)!==t&&(n.location.hash=t))},this)},this._core.options=s.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),s(n).on("hashchange.owl.navigation",s.proxy(function(t){var e=n.location.hash.substring(1),i=this._core.$stage.children(),e=this._hashes[e]&&i.index(this._hashes[e]);void 0!==e&&e!==this._core.current()&&this._core.to(this._core.relative(e),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var t,e;for(t in s(n).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(n,o){var r=n("<support>").get(0).style,a="Webkit Moz O ms".split(" "),t={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},e=function(){return!!h("transform")},i=function(){return!!h("perspective")},s=function(){return!!h("animation")};function h(t,i){var s=!1,e=t.charAt(0).toUpperCase()+t.slice(1);return n.each((t+" "+a.join(e+" ")+e).split(" "),function(t,e){if(r[e]!==o)return s=!i||e,!1}),s}function l(t){return h(t,!0)}!function(){return!!h("transition")}()||(n.support.transition=new String(l("transition")),n.support.transition.end=t.transition.end[n.support.transition]),s()&&(n.support.animation=new String(l("animation")),n.support.animation.end=t.animation.end[n.support.animation]),e()&&(n.support.transform=new String(l("transform")),n.support.transform3d=i())}(window.Zepto||window.jQuery,(window,void document));
assets_libraries/remote/ue-remote-controls.js CHANGED
@@ -1140,11 +1140,10 @@ function UERemoteWidgets(){
1140
  is_debug: false,
1141
  syncid:null,
1142
  options_api:null,
1143
- debug_connect:false,
1144
  show_connection_debug:false,
1145
  debug_show_ids:false,
1146
  debug_show_widget: "",
1147
- trace_debug:false,
1148
  show_trace_when_debug_on: false
1149
  };
1150
 
@@ -1438,7 +1437,7 @@ function UERemoteWidgets(){
1438
  g_objParent = jQuery(g_objParent[0]);
1439
  }
1440
 
1441
- if(g_vars.debug_connect == true){
1442
 
1443
  var parentID = g_objParent.attr("id");
1444
  var widgetID = g_objWidget.attr("id");
@@ -1457,16 +1456,24 @@ function UERemoteWidgets(){
1457
  * init api variable
1458
  */
1459
  function initAPI(){
1460
-
 
1461
  //set type and related objects
1462
  if(!g_api){
1463
 
1464
  var parentType = getParentType();
 
1465
 
1466
  if(!parentType){
1467
  trace(g_objParent);
1468
  throw new Error("No parent type found");
1469
  }
 
 
 
 
 
 
1470
 
1471
  //init the api
1472
  switch(parentType){
@@ -1502,9 +1509,17 @@ function UERemoteWidgets(){
1502
 
1503
  if(optionsFromData)
1504
  g_vars.options_api = optionsFromData;
1505
-
 
 
 
 
1506
  var isInited = g_api.init(g_objParent, g_vars.options_api, isEditor);
1507
 
 
 
 
 
1508
  return(isInited);
1509
  }
1510
 
@@ -1545,8 +1560,14 @@ function UERemoteWidgets(){
1545
 
1546
  if(g_vars.is_inited == false){
1547
 
 
 
 
 
 
 
1548
  g_objParent.on("uc-object-ready", func);
1549
-
1550
  }
1551
  }
1552
 
@@ -1557,6 +1578,10 @@ function UERemoteWidgets(){
1557
  */
1558
  this.setAction = function(action, objElement, allowMultiple){
1559
 
 
 
 
 
1560
  if(g_vars.is_inited == false)
1561
  throw new Error("Widget not inited");
1562
 
@@ -1986,7 +2011,7 @@ function UERemoteWidgets(){
1986
  * do api action
1987
  */
1988
  this.doAction = function(action, arg1, arg2){
1989
-
1990
  switch(action){
1991
  case "prev":
1992
  case "next":
@@ -2177,6 +2202,10 @@ function UERemoteWidgets(){
2177
  this.onWidgetInit = function(widgetID, func, options){
2178
 
2179
  try{
 
 
 
 
2180
 
2181
  if(!g_vars.funcOnInit){
2182
 
@@ -2193,9 +2222,15 @@ function UERemoteWidgets(){
2193
  g_vars.trace_debug = true;
2194
 
2195
  initGlobal(widgetID, t.onWidgetInit);
2196
-
2197
- if(g_vars.is_inited == false)
 
 
 
 
 
2198
  return(false);
 
2199
 
2200
  //show id's on the widgets
2201
  if(g_vars.debug_show_ids == true){
@@ -2205,7 +2240,7 @@ function UERemoteWidgets(){
2205
  displayTextOnWidget(g_objWidget, g_objWidget.attr("id"), "debug");
2206
  }
2207
 
2208
- if(g_vars.debug_connect == true)
2209
  trace("start debug - show connect");
2210
 
2211
  if(g_objParent.length > 1){
@@ -2219,11 +2254,12 @@ function UERemoteWidgets(){
2219
  //widget is inited
2220
 
2221
  onWidgetReady();
2222
-
2223
  g_vars.funcOnInit(g_objWidget);
2224
 
2225
  }catch(message){
2226
 
 
2227
  displayErrorMessage(message);
2228
 
2229
  var isEditorMode = isInsideEditor();
1140
  is_debug: false,
1141
  syncid:null,
1142
  options_api:null,
 
1143
  show_connection_debug:false,
1144
  debug_show_ids:false,
1145
  debug_show_widget: "",
1146
+ trace_debug:false, //debug
1147
  show_trace_when_debug_on: false
1148
  };
1149
 
1437
  g_objParent = jQuery(g_objParent[0]);
1438
  }
1439
 
1440
+ if(g_vars.trace_debug == true){
1441
 
1442
  var parentID = g_objParent.attr("id");
1443
  var widgetID = g_objWidget.attr("id");
1456
  * init api variable
1457
  */
1458
  function initAPI(){
1459
+
1460
+
1461
  //set type and related objects
1462
  if(!g_api){
1463
 
1464
  var parentType = getParentType();
1465
+
1466
 
1467
  if(!parentType){
1468
  trace(g_objParent);
1469
  throw new Error("No parent type found");
1470
  }
1471
+
1472
+ if(g_vars.trace_debug == true){
1473
+
1474
+ trace("init api: " + parentType);
1475
+ trace(g_objParent);
1476
+ }
1477
 
1478
  //init the api
1479
  switch(parentType){
1509
 
1510
  if(optionsFromData)
1511
  g_vars.options_api = optionsFromData;
1512
+
1513
+ if(g_vars.trace_debug == true){
1514
+ trace(g_vars.options_api);
1515
+ }
1516
+
1517
  var isInited = g_api.init(g_objParent, g_vars.options_api, isEditor);
1518
 
1519
+ if(g_vars.trace_debug == true){
1520
+ trace("inited: " + isInited);
1521
+ }
1522
+
1523
  return(isInited);
1524
  }
1525
 
1560
 
1561
  if(g_vars.is_inited == false){
1562
 
1563
+ if(g_vars.trace_debug == true){
1564
+
1565
+ trace(g_objParent);
1566
+ trace("set object ready event"); //onWidgetInit
1567
+ }
1568
+
1569
  g_objParent.on("uc-object-ready", func);
1570
+
1571
  }
1572
  }
1573
 
1578
  */
1579
  this.setAction = function(action, objElement, allowMultiple){
1580
 
1581
+ if(g_vars.trace_debug == true){
1582
+ trace("set action: "+action);
1583
+ }
1584
+
1585
  if(g_vars.is_inited == false)
1586
  throw new Error("Widget not inited");
1587
 
2011
  * do api action
2012
  */
2013
  this.doAction = function(action, arg1, arg2){
2014
+
2015
  switch(action){
2016
  case "prev":
2017
  case "next":
2202
  this.onWidgetInit = function(widgetID, func, options){
2203
 
2204
  try{
2205
+
2206
+ if(g_vars.trace_debug == true){
2207
+ trace("on widget init");
2208
+ }
2209
 
2210
  if(!g_vars.funcOnInit){
2211
 
2222
  g_vars.trace_debug = true;
2223
 
2224
  initGlobal(widgetID, t.onWidgetInit);
2225
+
2226
+ if(g_vars.is_inited == false){
2227
+
2228
+ if(g_vars.trace_debug == true){
2229
+ trace(widgetID+" not inited yet, waiting for parent init");
2230
+ }
2231
+
2232
  return(false);
2233
+ }
2234
 
2235
  //show id's on the widgets
2236
  if(g_vars.debug_show_ids == true){
2240
  displayTextOnWidget(g_objWidget, g_objWidget.attr("id"), "debug");
2241
  }
2242
 
2243
+ if(g_vars.trace_debug == true)
2244
  trace("start debug - show connect");
2245
 
2246
  if(g_objParent.length > 1){
2254
  //widget is inited
2255
 
2256
  onWidgetReady();
2257
+
2258
  g_vars.funcOnInit(g_objWidget);
2259
 
2260
  }catch(message){
2261
 
2262
+
2263
  displayErrorMessage(message);
2264
 
2265
  var isEditorMode = isInsideEditor();
css/admin.css CHANGED
@@ -1289,36 +1289,36 @@ noimage:
1289
  max-width: 260px;
1290
  }
1291
  .unite-input-long {
1292
- width: 300px;
1293
- max-width: 300px;
1294
  }
1295
  .unite-input-alias {
1296
- width: 150px;
1297
- max-width: 150px;
1298
  }
1299
  .unite-input-number {
1300
- width: 100px;
1301
- max-width: 100px;
1302
  }
1303
  .unite-input-medium {
1304
- width: 150px;
1305
- max-width: 150px;
1306
  }
1307
  .unite-input-shortcode {
1308
- width: 180px;
1309
- max-width: 180px;
1310
  }
1311
  .unite-input-image {
1312
- width: 260px;
1313
- max-width: 260px;
1314
  }
1315
  .unite-input-path {
1316
- width: 500px;
1317
- max-width: 500px;
1318
  }
1319
  .unite-input-link {
1320
- width: 400px;
1321
- max-width: 400px;
1322
  }
1323
 
1324
  .unite-input-small {
1289
  max-width: 260px;
1290
  }
1291
  .unite-input-long {
1292
+ width: 300px !important;
1293
+ max-width: 300px !important;
1294
  }
1295
  .unite-input-alias {
1296
+ width: 150px !important;
1297
+ max-width: 150px !important;
1298
  }
1299
  .unite-input-number {
1300
+ width: 100px !important;
1301
+ max-width: 100px !important;
1302
  }
1303
  .unite-input-medium {
1304
+ width: 150px !important;
1305
+ max-width: 150px !important;
1306
  }
1307
  .unite-input-shortcode {
1308
+ width: 180px !important;
1309
+ max-width: 180px !important;
1310
  }
1311
  .unite-input-image {
1312
+ width: 260px !important;
1313
+ max-width: 260px !important;
1314
  }
1315
  .unite-input-path {
1316
+ width: 500px !important;
1317
+ max-width: 500px !important;
1318
  }
1319
  .unite-input-link {
1320
+ width: 400px !important;
1321
+ max-width: 400px !important;
1322
  }
1323
 
1324
  .unite-input-small {
inc_php/framework/functions.class.php CHANGED
@@ -1739,14 +1739,29 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1739
  */
1740
  public static function validateIDsList($val, $fieldName=""){
1741
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1742
  if(empty($val))
1743
  return(true);
1744
 
1745
  $match = preg_match('/^[0-9,]+$/', $val);
1746
 
1747
  if($match == 0)
1748
- self::throwError("Field <b>$fieldName</b> allow only numbers and comas.");
1749
 
 
1750
  }
1751
 
1752
 
1739
  */
1740
  public static function validateIDsList($val, $fieldName=""){
1741
 
1742
+ $isValid = self::isValidIDsList($val);
1743
+
1744
+ if($isValid == false)
1745
+ self::throwError("Field <b>$fieldName</b> allow only numbers and comas.");
1746
+
1747
+ }
1748
+
1749
+
1750
+ /**
1751
+ * validate id's list, allowed only numbers and commas
1752
+ * @param $val
1753
+ */
1754
+ public static function isValidIDsList($val, $fieldName=""){
1755
+
1756
  if(empty($val))
1757
  return(true);
1758
 
1759
  $match = preg_match('/^[0-9,]+$/', $val);
1760
 
1761
  if($match == 0)
1762
+ return(false);
1763
 
1764
+ return(true);
1765
  }
1766
 
1767
 
inc_php/framework/include_framework.php CHANGED
@@ -47,8 +47,10 @@ $folderProvider = $folderIncludes."../../provider/";
47
 
48
  //include composer - twig
49
  $isTwigExists = interface_exists("Twig_LoaderInterface");
50
-
51
- if($isTwigExists == false)
52
  require $folderIncludes."../../vendor/autoload.php";
53
-
 
 
54
 
47
 
48
  //include composer - twig
49
  $isTwigExists = interface_exists("Twig_LoaderInterface");
50
+
51
+ if($isTwigExists == false){
52
  require $folderIncludes."../../vendor/autoload.php";
53
+
54
+ }
55
+
56
 
inc_php/plugins/unitecreator_plugin_base.class.php CHANGED
@@ -52,7 +52,6 @@ class UniteCreatorPluginBase extends UniteCreatorFilters{
52
  UniteProviderFunctionsUC::addAction(GlobalsProviderUC::ACTION_RUN_ADMIN, array($this,"runAdmin"));
53
  UniteProviderFunctionsUC::addAction(GlobalsProviderUC::ACTION_RUN_FRONT, array($this,"runFront"));
54
 
55
-
56
  }
57
 
58
 
52
  UniteProviderFunctionsUC::addAction(GlobalsProviderUC::ACTION_RUN_ADMIN, array($this,"runAdmin"));
53
  UniteProviderFunctionsUC::addAction(GlobalsProviderUC::ACTION_RUN_FRONT, array($this,"runFront"));
54
 
 
55
  }
56
 
57
 
inc_php/unitecreator_dialog_param.class.php CHANGED
@@ -891,6 +891,26 @@ class UniteCreatorDialogParamWork{
891
 
892
  </div>
893
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
894
  <!-- Remote -->
895
 
896
  <div class="uc-listing-param-options" data-control="remote">
891
 
892
  </div>
893
 
894
+ <!-- Items -->
895
+ <div class="uc-listing-param-options" data-control="items">
896
+
897
+ <div class="unite-inputs-sap-double"></div>
898
+
899
+ <label class="unite-inputs-label">
900
+ <?php _e("Included Attributes", "unlimited-elements-for-elementor")?>:
901
+ </label>
902
+
903
+ <div class="unite-inputs-sap"></div>
904
+
905
+ <input type="text" name="multisource_included_attributes" value="" class="unite-input-link">
906
+
907
+ <br><br>
908
+
909
+ * <?php esc_html_e("list here all the fields that will be included in the multisource comma saparated like ","unlimited-elements-for-elementor")?>
910
+ <b>title,image,other</b>
911
+ </div>
912
+
913
+
914
  <!-- Remote -->
915
 
916
  <div class="uc-listing-param-options" data-control="remote">
inc_php/unitecreator_filters_process.class.php CHANGED
@@ -12,6 +12,8 @@ class UniteCreatorFiltersProcess{
12
  const DEBUG_MAIN_QUERY = false;
13
 
14
  const DEBUG_FILTER = false;
 
 
15
 
16
  private static $filters = null;
17
  private static $arrInputFiltersCache = null;
@@ -26,7 +28,6 @@ class UniteCreatorFiltersProcess{
26
  private static $isModeReplace = false;
27
  private static $numTotalPosts;
28
 
29
- private static $showDebug = false;
30
  private static $originalQueryVars = null;
31
  private $contentWidgetsDebug = array();
32
  private static $lastArgs = null;
@@ -337,7 +338,18 @@ class UniteCreatorFiltersProcess{
337
 
338
  if(!empty($search))
339
  $arrOutput["search"] = $search;
 
 
 
340
 
 
 
 
 
 
 
 
 
341
  self::$arrInputFiltersCache = $arrOutput;
342
 
343
  return($arrOutput);
@@ -426,6 +438,12 @@ class UniteCreatorFiltersProcess{
426
  if(!empty($search))
427
  self::$filters["search"] = $search;
428
 
 
 
 
 
 
 
429
 
430
  return(self::$filters);
431
  }
@@ -562,12 +580,14 @@ class UniteCreatorFiltersProcess{
562
 
563
  $arrFilters = $this->getRequestFilters();
564
 
 
565
  //---- set offset and count ----
566
 
567
  $page = UniteFunctionsUC::getVal($arrFilters, "page");
568
  $numItems = UniteFunctionsUC::getVal($arrFilters, "num_items");
569
  $offset = UniteFunctionsUC::getVal($arrFilters, "offset");
570
  $search = UniteFunctionsUC::getVal($arrFilters, "search");
 
571
 
572
 
573
  if(!empty($page))
@@ -586,7 +606,6 @@ class UniteCreatorFiltersProcess{
586
  if(!empty($search))
587
  $args["s"] = $search;
588
 
589
-
590
  $arrTerms = UniteFunctionsUC::getVal($arrFilters, "terms");
591
  if(!empty($arrTerms)){
592
 
@@ -595,15 +614,34 @@ class UniteCreatorFiltersProcess{
595
 
596
  if(!empty($arrTaxQuery))
597
  $args = $this->setArgsTaxQuery($args, $arrTaxQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
598
 
599
  }
600
 
601
 
602
- if(self::DEBUG_FILTER == true){
603
- dmp("debug!!!");
 
604
  dmp($args);
 
 
605
  dmp($arrFilters);
606
- exit();
607
  }
608
 
609
 
@@ -742,13 +780,16 @@ class UniteCreatorFiltersProcess{
742
  //------ get the html output
743
 
744
  //collect the debug html
745
- ob_start();
746
-
 
747
  $objOutput = new UniteCreatorOutput();
748
  $objOutput->initByAddon($addon);
749
 
750
- $htmlDebug = ob_get_contents();
751
- ob_end_clean();
 
 
752
 
753
  $output = array();
754
 
@@ -772,7 +813,7 @@ class UniteCreatorFiltersProcess{
772
 
773
  if(!empty($htmlDebug))
774
  $output["html_debug"] = $htmlDebug;
775
-
776
  return($output);
777
  }
778
 
@@ -969,19 +1010,39 @@ class UniteCreatorFiltersProcess{
969
  //find the term id's for test (find or not in the current posts query)
970
  if(!empty($testTermIDs)){
971
 
 
 
 
972
  $args = GlobalsProviderUC::$lastQueryArgs;
973
 
 
 
 
 
 
974
  $query = new WP_Query($args);
975
 
976
  $request = $query->request;
977
 
978
  $taxRequest = $this->getInitFiltersTaxRequest($request, $testTermIDs);
979
-
 
 
 
 
 
 
980
  $db = HelperUC::getDB();
981
  $arrFoundTermIDs = $db->fetchSql($taxRequest);
982
 
983
  $arrFoundTermIDs = $this->modifyFoundTermsIDs($arrFoundTermIDs);
984
 
 
 
 
 
 
 
985
  //set the test term id's for the output
986
  GlobalsProviderUC::$arrTestTermIDs = $arrFoundTermIDs;
987
  }
@@ -1182,20 +1243,43 @@ class UniteCreatorFiltersProcess{
1182
 
1183
  /**
1184
  * add values to settings from data
 
1185
  */
1186
- public function addWidgetFilterableVarsFromData($data, $dataPosts, $postListName){
1187
 
1188
  //check if ajax related
1189
  $isAjax = UniteFunctionsUC::getVal($dataPosts, $postListName."_isajax");
1190
  $isAjax = UniteFunctionsUC::strToBool($isAjax);
1191
-
1192
- if($isAjax == false)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1193
  return($data);
1194
-
 
 
 
 
 
 
1195
  $filterBehavoiur = UniteFunctionsUC::getVal($dataPosts, $postListName."_ajax_seturl");
1196
 
1197
- //check if ajax
1198
- $strAttributes = "";
1199
 
1200
  $strAttributes .= " data-ajax='true' ";
1201
 
@@ -1212,7 +1296,8 @@ class UniteCreatorFiltersProcess{
1212
  $this->includeClientSideScripts();
1213
 
1214
  $data["uc_filtering_attributes"] = $strAttributes;
1215
- $data["uc_filtering_addclass"] = " uc-filterable-grid";
 
1216
 
1217
  return($data);
1218
 
@@ -1223,8 +1308,8 @@ class UniteCreatorFiltersProcess{
1223
  * add widget variables
1224
  * uc_listing_addclass, uc_listing_attributes
1225
  */
1226
- public function addWidgetFilterableVariables($data, $addon){
1227
-
1228
  $param = $addon->getParamByType(UniteCreatorDialogParam::PARAM_POSTS_LIST);
1229
 
1230
  if(empty($param))
@@ -1233,8 +1318,8 @@ class UniteCreatorFiltersProcess{
1233
  $postListName = UniteFunctionsUC::getVal($param, "name");
1234
 
1235
  $dataPosts = UniteFunctionsUC::getVal($data, $postListName);
1236
-
1237
- $data = $this->addWidgetFilterableVarsFromData($data, $dataPosts, $postListName);
1238
 
1239
  return($data);
1240
  }
@@ -1242,10 +1327,12 @@ class UniteCreatorFiltersProcess{
1242
 
1243
  /**
1244
  * get filters attributes
 
1245
  */
1246
  private function getFiltersJSData(){
1247
 
1248
- $urlBase = UniteFunctionsUC::getBaseUrl(GlobalsUC::$current_page_url);
 
1249
 
1250
  //include some common url filters
1251
  $orderby = UniteFunctionsUC::getGetVar("orderby","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
@@ -1271,13 +1358,21 @@ class UniteCreatorFiltersProcess{
1271
  $urlBase = UniteFunctionsUC::addUrlParams($urlBase, "s=$search");
1272
  }
1273
 
 
 
 
 
 
 
1274
  //get current filters
1275
 
1276
  $arrData = array();
1277
  $arrData["urlbase"] = $urlBase;
1278
  $arrData["urlajax"] = GlobalsUC::$url_ajax_full;
1279
 
1280
- //$arrData["querybase"] = self::$originalQueryVars;
 
 
1281
 
1282
  return($arrData);
1283
  }
@@ -1428,7 +1523,7 @@ class UniteCreatorFiltersProcess{
1428
 
1429
 
1430
  /**
1431
- * modify the selected and add first term if needed
1432
  */
1433
  private function modifyOutputTerms_modifySelected($arrTerms, $data, $filterType){
1434
 
@@ -1441,6 +1536,18 @@ class UniteCreatorFiltersProcess{
1441
  if($filterType == self::TYPE_SELECT)
1442
  $isSelectFirst = true;
1443
 
 
 
 
 
 
 
 
 
 
 
 
 
1444
  $numSelectedTab = UniteFunctionsUC::getVal($data, "selected_tab_number");
1445
  if(empty($numSelectedTab))
1446
  $numSelectedTab = 1;
@@ -1451,7 +1558,7 @@ class UniteCreatorFiltersProcess{
1451
 
1452
  if($isSelectFirst == true && $numSelectedTab > $numTerms)
1453
  $numSelectedTab = 1;
1454
-
1455
  $firstNotHiddenIndex = null;
1456
 
1457
  $hasSelected = false;
@@ -1492,8 +1599,8 @@ class UniteCreatorFiltersProcess{
1492
  return($arrTerms);
1493
 
1494
  //make sure the first item selected in select filter
1495
-
1496
- $arrTerms[$firstNotHiddenIndex]["isselected"] = true;
1497
 
1498
 
1499
  return($arrTerms);
@@ -1539,7 +1646,7 @@ class UniteCreatorFiltersProcess{
1539
  $isHidden = true;
1540
 
1541
  $htmlAttributes = "";
1542
-
1543
  if($isHidden == true)
1544
  $htmlAttributes = "style='display:none'";
1545
 
@@ -1600,6 +1707,14 @@ class UniteCreatorFiltersProcess{
1600
  if($isSelected == false)
1601
  continue;
1602
 
 
 
 
 
 
 
 
 
1603
  $class = UniteFunctionsUC::getVal($term, "addclass","");
1604
  $class .= " uc-selected";
1605
 
@@ -1764,7 +1879,6 @@ class UniteCreatorFiltersProcess{
1764
 
1765
  $arrTerms = $this->modifyOutputTerms_modifySelectedByRequest($arrTerms);
1766
 
1767
-
1768
  $isFilterHidden = false;
1769
 
1770
  switch($filterType){
@@ -1789,7 +1903,7 @@ class UniteCreatorFiltersProcess{
1789
 
1790
  if($isFilterHidden)
1791
  $addClass .= " uc-filter-hidden";
1792
-
1793
  //return data
1794
 
1795
  $data["filter_isajax"] = $isUnderAjax?"yes":"no";
@@ -1799,15 +1913,13 @@ class UniteCreatorFiltersProcess{
1799
  $data["filter_addclass_item"] = $addClassItem;
1800
  $data["filter_first_load"] = $isFirstLoad?"yes":"no";
1801
 
1802
-
1803
  $data["taxonomy"] = $arrTerms;
1804
 
 
1805
  return($data);
1806
  }
1807
 
1808
 
1809
-
1810
-
1811
  private function _______ARCHIVE_QUERY__________(){}
1812
 
1813
 
@@ -1866,6 +1978,54 @@ class UniteCreatorFiltersProcess{
1866
  return(false);
1867
  }
1868
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1869
  /**
1870
  * test the request filter
1871
  */
@@ -1880,6 +2040,10 @@ class UniteCreatorFiltersProcess{
1880
 
1881
  if(empty($frontAjaxAction))
1882
  return(false);
 
 
 
 
1883
 
1884
  try{
1885
 
@@ -1913,9 +2077,9 @@ class UniteCreatorFiltersProcess{
1913
 
1914
  if(is_admin() == true)
1915
  return(false);
1916
-
1917
  add_action("wp", array($this, "operateAjaxResponse"));
1918
-
1919
  }
1920
 
1921
 
12
  const DEBUG_MAIN_QUERY = false;
13
 
14
  const DEBUG_FILTER = false;
15
+
16
+ private static $showDebug = false;
17
 
18
  private static $filters = null;
19
  private static $arrInputFiltersCache = null;
28
  private static $isModeReplace = false;
29
  private static $numTotalPosts;
30
 
 
31
  private static $originalQueryVars = null;
32
  private $contentWidgetsDebug = array();
33
  private static $lastArgs = null;
338
 
339
  if(!empty($search))
340
  $arrOutput["search"] = $search;
341
+
342
+ //exclude
343
+ $exclude = UniteFunctionsUC::getVal($request, "ucexclude");
344
 
345
+ if(!empty($exclude)){
346
+
347
+ $isValid = UniteFunctionsUC::isValidIDsList($exclude);
348
+
349
+ if($isValid == true)
350
+ $arrOutput["exclude"] = $exclude;
351
+ }
352
+
353
  self::$arrInputFiltersCache = $arrOutput;
354
 
355
  return($arrOutput);
438
  if(!empty($search))
439
  self::$filters["search"] = $search;
440
 
441
+ //get exclude
442
+ $exclude = UniteFunctionsUC::getVal($arrInputFilters, "exclude");
443
+
444
+ if(!empty($exclude))
445
+ self::$filters["exclude"] = $exclude;
446
+
447
 
448
  return(self::$filters);
449
  }
580
 
581
  $arrFilters = $this->getRequestFilters();
582
 
583
+
584
  //---- set offset and count ----
585
 
586
  $page = UniteFunctionsUC::getVal($arrFilters, "page");
587
  $numItems = UniteFunctionsUC::getVal($arrFilters, "num_items");
588
  $offset = UniteFunctionsUC::getVal($arrFilters, "offset");
589
  $search = UniteFunctionsUC::getVal($arrFilters, "search");
590
+ $exclude = UniteFunctionsUC::getVal($arrFilters, "exclude");
591
 
592
 
593
  if(!empty($page))
606
  if(!empty($search))
607
  $args["s"] = $search;
608
 
 
609
  $arrTerms = UniteFunctionsUC::getVal($arrFilters, "terms");
610
  if(!empty($arrTerms)){
611
 
614
 
615
  if(!empty($arrTaxQuery))
616
  $args = $this->setArgsTaxQuery($args, $arrTaxQuery);
617
+ }
618
+
619
+ //exclude
620
+ if(!empty($exclude)){
621
+
622
+ $arrExclude = explode(",", $exclude);
623
+
624
+ $arrExclude = array_unique($arrExclude);
625
+
626
+ $arrNotIn = UniteFunctionsUC::getVal($args, "post__not_in");
627
+
628
+ if(empty($arrNotIn))
629
+ $arrNotIn = array();
630
+
631
+ $arrNotIn = array_merge($arrNotIn, $arrExclude);
632
+
633
+ $args["post__not_in"] = $arrExclude;
634
 
635
  }
636
 
637
 
638
+ if(self::$showDebug == true){
639
+
640
+ dmp("args:");
641
  dmp($args);
642
+
643
+ dmp("filters:");
644
  dmp($arrFilters);
 
645
  }
646
 
647
 
780
  //------ get the html output
781
 
782
  //collect the debug html
783
+ if(self::$showDebug == false)
784
+ ob_start();
785
+
786
  $objOutput = new UniteCreatorOutput();
787
  $objOutput->initByAddon($addon);
788
 
789
+ if(self::$showDebug == false){
790
+ $htmlDebug = ob_get_contents();
791
+ ob_end_clean();
792
+ }
793
 
794
  $output = array();
795
 
813
 
814
  if(!empty($htmlDebug))
815
  $output["html_debug"] = $htmlDebug;
816
+
817
  return($output);
818
  }
819
 
1010
  //find the term id's for test (find or not in the current posts query)
1011
  if(!empty($testTermIDs)){
1012
 
1013
+ if(self::$showDebug == true)
1014
+ dmp("---- Test Not Empty Terms----");
1015
+
1016
  $args = GlobalsProviderUC::$lastQueryArgs;
1017
 
1018
+ if(self::$showDebug == true){
1019
+ dmp("--- Last Query Args:");
1020
+ dmp($args);
1021
+ }
1022
+
1023
  $query = new WP_Query($args);
1024
 
1025
  $request = $query->request;
1026
 
1027
  $taxRequest = $this->getInitFiltersTaxRequest($request, $testTermIDs);
1028
+
1029
+ if(self::$showDebug == true){
1030
+
1031
+ dmp("---- Terms request: ");
1032
+ dmp($taxRequest);
1033
+ }
1034
+
1035
  $db = HelperUC::getDB();
1036
  $arrFoundTermIDs = $db->fetchSql($taxRequest);
1037
 
1038
  $arrFoundTermIDs = $this->modifyFoundTermsIDs($arrFoundTermIDs);
1039
 
1040
+ if(self::$showDebug == true){
1041
+
1042
+ dmp("--- result - terms with num posts");
1043
+ dmp($arrFoundTermIDs);
1044
+ }
1045
+
1046
  //set the test term id's for the output
1047
  GlobalsProviderUC::$arrTestTermIDs = $arrFoundTermIDs;
1048
  }
1243
 
1244
  /**
1245
  * add values to settings from data
1246
+ * postIDs - exists only if avoid duplicates option set
1247
  */
1248
+ public function addWidgetFilterableVarsFromData($data, $dataPosts, $postListName, $arrPostIDs = null){
1249
 
1250
  //check if ajax related
1251
  $isAjax = UniteFunctionsUC::getVal($dataPosts, $postListName."_isajax");
1252
  $isAjax = UniteFunctionsUC::strToBool($isAjax);
1253
+
1254
+ $addClass = "";
1255
+ $strAttributes = "";
1256
+
1257
+ //avoid duplicates handle
1258
+
1259
+ if(!empty($arrPostIDs)){
1260
+
1261
+ $addClass = " uc-avoid-duplicates";
1262
+
1263
+ $strPostIDs = implode(",", $arrPostIDs);
1264
+ $strAttributes = " data-postids='$strPostIDs'";
1265
+
1266
+ }
1267
+
1268
+ if($isAjax == false){
1269
+
1270
+ $data["uc_filtering_attributes"] = $strAttributes;
1271
+ $data["uc_filtering_addclass"] = $addClass;
1272
+
1273
  return($data);
1274
+ }
1275
+
1276
+
1277
+ //all ajax related
1278
+
1279
+ $addClass .= " uc-filterable-grid";
1280
+
1281
  $filterBehavoiur = UniteFunctionsUC::getVal($dataPosts, $postListName."_ajax_seturl");
1282
 
 
 
1283
 
1284
  $strAttributes .= " data-ajax='true' ";
1285
 
1296
  $this->includeClientSideScripts();
1297
 
1298
  $data["uc_filtering_attributes"] = $strAttributes;
1299
+ $data["uc_filtering_addclass"] = $addClass;
1300
+
1301
 
1302
  return($data);
1303
 
1308
  * add widget variables
1309
  * uc_listing_addclass, uc_listing_attributes
1310
  */
1311
+ public function addWidgetFilterableVariables($data, $addon, $arrPostIDs = array()){
1312
+
1313
  $param = $addon->getParamByType(UniteCreatorDialogParam::PARAM_POSTS_LIST);
1314
 
1315
  if(empty($param))
1318
  $postListName = UniteFunctionsUC::getVal($param, "name");
1319
 
1320
  $dataPosts = UniteFunctionsUC::getVal($data, $postListName);
1321
+
1322
+ $data = $this->addWidgetFilterableVarsFromData($data, $dataPosts, $postListName, $arrPostIDs);
1323
 
1324
  return($data);
1325
  }
1327
 
1328
  /**
1329
  * get filters attributes
1330
+ * get the base url
1331
  */
1332
  private function getFiltersJSData(){
1333
 
1334
+ $urlBase = UniteFunctionsUC::getBaseUrl(GlobalsUC::$current_page_url, true); //strip pagination
1335
+
1336
 
1337
  //include some common url filters
1338
  $orderby = UniteFunctionsUC::getGetVar("orderby","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
1358
  $urlBase = UniteFunctionsUC::addUrlParams($urlBase, "s=$search");
1359
  }
1360
 
1361
+ //debug client url
1362
+
1363
+ $isDebug = UniteFunctionsUC::getGetVar("ucfiltersdebug","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
1364
+ $isDebug = UniteFunctionsUC::strToBool($isDebug);
1365
+
1366
+
1367
  //get current filters
1368
 
1369
  $arrData = array();
1370
  $arrData["urlbase"] = $urlBase;
1371
  $arrData["urlajax"] = GlobalsUC::$url_ajax_full;
1372
 
1373
+ if($isDebug == true)
1374
+ $arrData["debug"] = true;
1375
+
1376
 
1377
  return($arrData);
1378
  }
1523
 
1524
 
1525
  /**
1526
+ * modify the selected
1527
  */
1528
  private function modifyOutputTerms_modifySelected($arrTerms, $data, $filterType){
1529
 
1536
  if($filterType == self::TYPE_SELECT)
1537
  $isSelectFirst = true;
1538
 
1539
+ if($filterType == self::TYPE_TABS){
1540
+
1541
+ $role = UniteFunctionsUC::getVal($data, "filter_role");
1542
+
1543
+ if($role == "child")
1544
+ $isSelectFirst = false;
1545
+ }
1546
+
1547
+
1548
+ if($isSelectFirst == false)
1549
+ return($arrTerms);
1550
+
1551
  $numSelectedTab = UniteFunctionsUC::getVal($data, "selected_tab_number");
1552
  if(empty($numSelectedTab))
1553
  $numSelectedTab = 1;
1558
 
1559
  if($isSelectFirst == true && $numSelectedTab > $numTerms)
1560
  $numSelectedTab = 1;
1561
+
1562
  $firstNotHiddenIndex = null;
1563
 
1564
  $hasSelected = false;
1599
  return($arrTerms);
1600
 
1601
  //make sure the first item selected in select filter
1602
+ if($isSelectFirst == true)
1603
+ $arrTerms[$firstNotHiddenIndex]["isselected"] = true;
1604
 
1605
 
1606
  return($arrTerms);
1646
  $isHidden = true;
1647
 
1648
  $htmlAttributes = "";
1649
+
1650
  if($isHidden == true)
1651
  $htmlAttributes = "style='display:none'";
1652
 
1707
  if($isSelected == false)
1708
  continue;
1709
 
1710
+ //hidden can't be selected
1711
+
1712
+ $isHidden = UniteFunctionsUC::getVal($term, "hidden");
1713
+ $isHidden = UniteFunctionsUC::strToBool($isHidden);
1714
+
1715
+ if($isHidden == true)
1716
+ continue;
1717
+
1718
  $class = UniteFunctionsUC::getVal($term, "addclass","");
1719
  $class .= " uc-selected";
1720
 
1879
 
1880
  $arrTerms = $this->modifyOutputTerms_modifySelectedByRequest($arrTerms);
1881
 
 
1882
  $isFilterHidden = false;
1883
 
1884
  switch($filterType){
1903
 
1904
  if($isFilterHidden)
1905
  $addClass .= " uc-filter-hidden";
1906
+
1907
  //return data
1908
 
1909
  $data["filter_isajax"] = $isUnderAjax?"yes":"no";
1913
  $data["filter_addclass_item"] = $addClassItem;
1914
  $data["filter_first_load"] = $isFirstLoad?"yes":"no";
1915
 
 
1916
  $data["taxonomy"] = $arrTerms;
1917
 
1918
+
1919
  return($data);
1920
  }
1921
 
1922
 
 
 
1923
  private function _______ARCHIVE_QUERY__________(){}
1924
 
1925
 
1978
  return(false);
1979
  }
1980
 
1981
+ /**
1982
+ * just return true
1983
+ */
1984
+ public function pluginProtection_ezCacheHideComment(){
1985
+
1986
+ return(true);
1987
+ }
1988
+
1989
+
1990
+ /**
1991
+ * run some cross plugin protections
1992
+ */
1993
+ private function runSomeCrossPluginProtections(){
1994
+
1995
+ add_filter("wp_bost_hide_cache_time_comment",array($this, "pluginProtection_ezCacheHideComment"));
1996
+
1997
+ }
1998
+
1999
+ /**
2000
+ * set if show debug or not
2001
+ */
2002
+ private function setShowDebug(){
2003
+
2004
+ if(self::DEBUG_FILTER == true){
2005
+ self::$showDebug = true;
2006
+ return(false);
2007
+ }
2008
+
2009
+ //set debug only for logged in users
2010
+
2011
+ $isDebug = UniteFunctionsUC::getGetVar("ucfiltersdebug","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
2012
+ $isDebug = UniteFunctionsUC::strToBool($isDebug);
2013
+
2014
+ if($isDebug == true){
2015
+
2016
+ $hasPermissions = UniteFunctionsWPUC::isCurrentUserHasPermissions();
2017
+
2018
+ if($hasPermissions == true){
2019
+ self::$showDebug = true;
2020
+
2021
+ dmp("SHOW DEBUG, logged in user");
2022
+ }
2023
+
2024
+ }
2025
+
2026
+ }
2027
+
2028
+
2029
  /**
2030
  * test the request filter
2031
  */
2040
 
2041
  if(empty($frontAjaxAction))
2042
  return(false);
2043
+
2044
+ $this->runSomeCrossPluginProtections();
2045
+
2046
+ $this->setShowDebug();
2047
 
2048
  try{
2049
 
2077
 
2078
  if(is_admin() == true)
2079
  return(false);
2080
+
2081
  add_action("wp", array($this, "operateAjaxResponse"));
2082
+
2083
  }
2084
 
2085
 
inc_php/unitecreator_operations.class.php CHANGED
@@ -484,7 +484,7 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
484
  /**
485
  * put debug of post custom fields
486
  */
487
- public function putPostCustomFieldsDebug($postID){
488
 
489
  $post = get_post($postID);
490
 
@@ -493,11 +493,22 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
493
 
494
  $postTitle = $post->post_title;
495
 
496
- $arrCustomFields = UniteFunctionsWPUC::getPostMeta($postID);
 
 
 
 
 
 
 
497
 
498
  $htmlFields = HelperHtmlUC::getHtmlArrayTable($arrCustomFields, "No Meta Fields Found");
499
 
500
- echo "<br>Meta fields for post: <b>$postTitle </b>, post id: $postID <br>";
 
 
 
 
501
 
502
  dmp($htmlFields);
503
 
484
  /**
485
  * put debug of post custom fields
486
  */
487
+ public function putPostCustomFieldsDebug($postID, $showCustomFields = false){
488
 
489
  $post = get_post($postID);
490
 
493
 
494
  $postTitle = $post->post_title;
495
 
496
+ if($showCustomFields == false)
497
+ $arrCustomFields = UniteFunctionsWPUC::getPostMeta($postID);
498
+ else{
499
+ $arrCustomFields = UniteFunctionsWPUC::getPostCustomFields($postID, false);
500
+
501
+ if(empty($arrCustomFields))
502
+ $arrCustomFields = UniteFunctionsWPUC::getPostMeta($postID);
503
+ }
504
 
505
  $htmlFields = HelperHtmlUC::getHtmlArrayTable($arrCustomFields, "No Meta Fields Found");
506
 
507
+ $fieldsTitle = "Meta";
508
+ if($showCustomFields == true)
509
+ $fieldsTitle = "Custom";
510
+
511
+ echo "<br>{$fieldsTitle} fields for post: <b>$postTitle </b>, post id: $postID <br>";
512
 
513
  dmp($htmlFields);
514
 
inc_php/unitecreator_output.class.php CHANGED
@@ -2113,7 +2113,7 @@ class UniteCreatorOutputWork extends HtmlOutputBaseUC{
2113
  $paramName = UniteFunctionsUC::getVal($paramListing, "name");
2114
 
2115
  $dataValue = UniteFunctionsUC::getVal($arrData, $paramName);
2116
-
2117
  if(is_string($dataValue) && $dataValue === "uc_items")
2118
  $arrItemData = $this->addon->getProcessedItemsData($this->processType);
2119
  elseif(is_array($dataValue)){
2113
  $paramName = UniteFunctionsUC::getVal($paramListing, "name");
2114
 
2115
  $dataValue = UniteFunctionsUC::getVal($arrData, $paramName);
2116
+
2117
  if(is_string($dataValue) && $dataValue === "uc_items")
2118
  $arrItemData = $this->addon->getProcessedItemsData($this->processType);
2119
  elseif(is_array($dataValue)){
inc_php/unitecreator_params_processor.class.php CHANGED
@@ -196,6 +196,14 @@ class UniteCreatorParamsProcessorWork{
196
  return($data);
197
  }
198
 
 
 
 
 
 
 
 
 
199
  private function a________RADIO_BOOLEAN_________(){}
200
 
201
 
@@ -915,7 +923,8 @@ class UniteCreatorParamsProcessorWork{
915
  * @param $param
916
  */
917
  protected function getProcessedParamsValue_image($data, $value, $param){
918
-
 
919
  $mediaType = UniteFunctionsUC::getVal($param, "media_type");
920
 
921
  $name = $param["name"];
@@ -939,6 +948,7 @@ class UniteCreatorParamsProcessorWork{
939
  if(empty($value))
940
  return($data);
941
  }
 
942
 
943
  $urlImage = $value; //in case that the value is image id
944
  if(is_numeric($value)){
@@ -1849,13 +1859,70 @@ class UniteCreatorParamsProcessorWork{
1849
  }
1850
 
1851
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1852
 
1853
  /**
1854
  * get item data
1855
  */
1856
  public function getProcessedItemsData($arrItems, $processType, $forTemplate = true, $filterType = null){
1857
 
1858
-
1859
  $this->validateInited();
1860
  self::validateProcessType($processType);
1861
 
@@ -1871,37 +1938,23 @@ class UniteCreatorParamsProcessorWork{
1871
  if(empty($arrItems))
1872
  return(array());
1873
 
1874
- //process form items
1875
- $itemsType = $this->addon->getItemsType();
1876
- if($itemsType == UniteCreatorAddon::ITEMS_TYPE_FORM){
1877
-
1878
- $objForm = new UniteCreatorForm();
1879
- $objForm->setAddon($this->addon);
1880
-
1881
- if($this->isOutputProcessType($processType)){
1882
-
1883
- $arrItems = $objForm->processFormItemsForOutput($arrItems);
1884
- return($arrItems);
1885
- }else{
1886
-
1887
- //don't process for config
1888
- //$arrItems = $this->normalizeItemsData($arrItems);
1889
- //dmp($arrItems);
1890
-
1891
- return($arrItems);
1892
- }
1893
- }
1894
-
1895
 
1896
- //regular process
1897
  $operations = new UCOperations();
1898
 
1899
  $arrItemsNew = array();
1900
  $arrItemParams = $this->addon->getParamsItems();
 
 
 
 
 
1901
  $arrItemParams = $this->initProcessParams($arrItemParams);
1902
 
1903
  $numItems = count($arrItems);
1904
 
 
1905
  foreach($arrItems as $index => $arrItemValues){
1906
 
1907
  $elementorID = UniteFunctionsUC::getVal($arrItemValues, "_id");
@@ -1909,9 +1962,10 @@ class UniteCreatorParamsProcessorWork{
1909
  //if not found - generate one
1910
  if(empty($elementorID))
1911
  $elementorID = UniteFunctionsUC::getRandomString(5);
1912
-
1913
  $arrParamsNew = $this->addon->setParamsValuesItems($arrItemValues, $arrItemParams);
1914
 
 
1915
  $item = $this->getProcessedParamsValues($arrParamsNew, $processType, $filterType);
1916
 
1917
  if($this->isOutputProcessType($processType) == true){
196
  return($data);
197
  }
198
 
199
+ /**
200
+ * get the addon
201
+ */
202
+ public function getAddon(){
203
+
204
+ return($this->addon);
205
+ }
206
+
207
  private function a________RADIO_BOOLEAN_________(){}
208
 
209
 
923
  * @param $param
924
  */
925
  protected function getProcessedParamsValue_image($data, $value, $param){
926
+
927
+
928
  $mediaType = UniteFunctionsUC::getVal($param, "media_type");
929
 
930
  $name = $param["name"];
948
  if(empty($value))
949
  return($data);
950
  }
951
+
952
 
953
  $urlImage = $value; //in case that the value is image id
954
  if(is_numeric($value)){
1859
  }
1860
 
1861
 
1862
+ /**
1863
+ * get items image size accordion special attribute
1864
+ */
1865
+ public function getProcessedItemsData_getImageSize($processType = null){
1866
+
1867
+ if($processType == self::PROCESS_TYPE_CONFIG)
1868
+ return(null);
1869
+
1870
+ $paramsSpecial = $this->addon->getParams(UniteCreatorDialogParam::PARAM_SPECIAL);
1871
+
1872
+ if(empty($paramsSpecial))
1873
+ return(null);
1874
+
1875
+ foreach($paramsSpecial as $param){
1876
+
1877
+ $attributeType = UniteFunctionsUC::getVal($param, "attribute_type");
1878
+ if($attributeType != "items_image_size")
1879
+ continue;
1880
+
1881
+ $value = UniteFunctionsUC::getVal($param, "value");
1882
+
1883
+ if(empty($value))
1884
+ return(null);
1885
+
1886
+ $name = UniteFunctionsUC::getVal($param, "name");
1887
+
1888
+ if(is_array($value)){
1889
+ $value = UniteFunctionsUC::getVal($value, $name."_size");
1890
+ }
1891
+
1892
+ return($value);
1893
+ }
1894
+
1895
+
1896
+ return(null);
1897
+ }
1898
+
1899
+ /**
1900
+ * modify image param
1901
+ */
1902
+ private function getProcessedItemsData_modifyImageItem($arrItemParams, $itemsImageSize){
1903
+
1904
+ foreach($arrItemParams as $index => $param){
1905
+
1906
+ $type = UniteFunctionsUC::getVal($param, "type");
1907
+
1908
+ if($type != UniteCreatorDialogParam::PARAM_IMAGE)
1909
+ continue;
1910
+
1911
+ $param["add_image_sizes"] = true;
1912
+ $param["value_size"] = $itemsImageSize;
1913
+
1914
+ $arrItemParams[$index] = $param;
1915
+ }
1916
+
1917
+ return($arrItemParams);
1918
+ }
1919
+
1920
 
1921
  /**
1922
  * get item data
1923
  */
1924
  public function getProcessedItemsData($arrItems, $processType, $forTemplate = true, $filterType = null){
1925
 
 
1926
  $this->validateInited();
1927
  self::validateProcessType($processType);
1928
 
1938
  if(empty($arrItems))
1939
  return(array());
1940
 
1941
+ //check for special params
1942
+ $itemsImageSize = $this->getProcessedItemsData_getImageSize($processType);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1943
 
 
1944
  $operations = new UCOperations();
1945
 
1946
  $arrItemsNew = array();
1947
  $arrItemParams = $this->addon->getParamsItems();
1948
+
1949
+ if(!empty($itemsImageSize)){
1950
+ $arrItemParams = $this->getProcessedItemsData_modifyImageItem($arrItemParams, $itemsImageSize);
1951
+ }
1952
+
1953
  $arrItemParams = $this->initProcessParams($arrItemParams);
1954
 
1955
  $numItems = count($arrItems);
1956
 
1957
+
1958
  foreach($arrItems as $index => $arrItemValues){
1959
 
1960
  $elementorID = UniteFunctionsUC::getVal($arrItemValues, "_id");
1962
  //if not found - generate one
1963
  if(empty($elementorID))
1964
  $elementorID = UniteFunctionsUC::getRandomString(5);
1965
+
1966
  $arrParamsNew = $this->addon->setParamsValuesItems($arrItemValues, $arrItemParams);
1967
 
1968
+
1969
  $item = $this->getProcessedParamsValues($arrParamsNew, $processType, $filterType);
1970
 
1971
  if($this->isOutputProcessType($processType) == true){
inc_php/unitecreator_settings.class.php CHANGED
@@ -560,6 +560,25 @@ class UniteCreatorSettingsWork extends UniteSettingsAdvancedUC{
560
  return($options);
561
  }
562
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
563
 
564
  /**
565
  * add special param
@@ -569,10 +588,18 @@ class UniteCreatorSettingsWork extends UniteSettingsAdvancedUC{
569
  $attributeType = UniteFunctionsUC::getVal($param, "attribute_type");
570
 
571
  switch($attributeType){
 
 
 
572
  case "entrance_animation":
573
 
574
  UniteCreatorEntranceAnimations::addSettings($this, $name, $param);
575
 
 
 
 
 
 
576
  break;
577
  default:
578
  UniteFunctionsUC::throwError("Add special param error: wrong attribute type: $attributeType");
560
  return($options);
561
  }
562
 
563
+ /**
564
+ * add items image size setting
565
+ */
566
+ private function addItemsImageSizeSetting($name, $param){
567
+
568
+ $title = UniteFunctionsUC::getVal($param, "title");
569
+
570
+ $arrSizes = UniteFunctionsWPUC::getArrThumbSizes();
571
+
572
+ $params = array();
573
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
574
+ $params["label_block"] = true;
575
+
576
+ $arrSizes = array_flip($arrSizes);
577
+
578
+ $this->addSelect($name."_size", $arrSizes, $title, "medium_large", $params);
579
+
580
+ }
581
+
582
 
583
  /**
584
  * add special param
588
  $attributeType = UniteFunctionsUC::getVal($param, "attribute_type");
589
 
590
  switch($attributeType){
591
+ case "non":
592
+ case "none":
593
+ break;
594
  case "entrance_animation":
595
 
596
  UniteCreatorEntranceAnimations::addSettings($this, $name, $param);
597
 
598
+ break;
599
+ case "items_image_size":
600
+
601
+ $this->addItemsImageSizeSetting($name, $param);
602
+
603
  break;
604
  default:
605
  UniteFunctionsUC::throwError("Add special param error: wrong attribute type: $attributeType");
inc_php/unitecreator_template_engine.class.php CHANGED
@@ -905,6 +905,8 @@ class UniteCreatorTemplateEngineWork{
905
  break;
906
  case "get_term_image":
907
 
 
 
908
  $arrImage = UniteFunctionsWPUC::getTermImage($arg1, $arg2);
909
 
910
  return($arrImage);
@@ -992,6 +994,37 @@ class UniteCreatorTemplateEngineWork{
992
  HelperHtmlUC::putDocReadyEndJS($widgetID);
993
 
994
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
995
  default:
996
 
997
  $type = UniteFunctionsUC::sanitizeAttr($type);
@@ -1167,7 +1200,7 @@ class UniteCreatorTemplateEngineWork{
1167
 
1168
  if(class_exists("Twig_Loader_Array") == false)
1169
  UniteFunctionsUC::throwError("Twig template engine not loaded. Please check if it collides with some other plugin that also loading twig engine.");
1170
-
1171
  $loader = new Twig_Loader_Array($this->arrTemplates);
1172
 
1173
  $arrOptions = array();
905
  break;
906
  case "get_term_image":
907
 
908
+ //termID, meta key
909
+
910
  $arrImage = UniteFunctionsWPUC::getTermImage($arg1, $arg2);
911
 
912
  return($arrImage);
994
  HelperHtmlUC::putDocReadyEndJS($widgetID);
995
 
996
  break;
997
+ case "get_product_attributes":
998
+
999
+ $objWoo = new UniteCreatorWooIntegrate();
1000
+
1001
+ $arrAttributes = $objWoo->getProductAttributes($arg1);
1002
+
1003
+ return($arrAttributes);
1004
+
1005
+ break;
1006
+ case "get_current_term_id":
1007
+
1008
+ $termID = UniteFunctionsWPUC::getCurrentTermID();
1009
+
1010
+ return($termID);
1011
+ break;
1012
+ case "put_next_post_link":
1013
+
1014
+ next_post_link();
1015
+
1016
+ break;
1017
+ case "put_prev_post_link":
1018
+
1019
+ previous_post_link();
1020
+
1021
+ break;
1022
+ case "get_nextprev_post_data":
1023
+
1024
+ $data = UniteFunctionsWPUC::getNextPrevPostData($arg1, $arg2);
1025
+
1026
+ return($data);
1027
+ break;
1028
  default:
1029
 
1030
  $type = UniteFunctionsUC::sanitizeAttr($type);
1200
 
1201
  if(class_exists("Twig_Loader_Array") == false)
1202
  UniteFunctionsUC::throwError("Twig template engine not loaded. Please check if it collides with some other plugin that also loading twig engine.");
1203
+
1204
  $loader = new Twig_Loader_Array($this->arrTemplates);
1205
 
1206
  $arrOptions = array();
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.5.31");
16
 
17
  $currentFile = __FILE__;
18
  $currentFolder = dirname($currentFile);
@@ -51,6 +51,7 @@ require_once $folderIncludesMain . 'unitecreator_addon.class.php';
51
  require_once GlobalsUC::$pathProvider . 'provider_addon.class.php';
52
  require_once $folderIncludesMain . 'unitecreator_params_processor.class.php';
53
  require_once GlobalsUC::$pathProvider . 'provider_params_processor.class.php';
 
54
  require_once $folderIncludesMain . 'unitecreator_addons.class.php';
55
  require_once $folderIncludesMain . 'unitecreator_helper.class.php';
56
  require_once $folderIncludesMain . 'unitecreator_helperhtml.class.php';
12
  defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
13
 
14
  if(!defined("UNLIMITED_ELEMENTS_VERSION"))
15
+ define("UNLIMITED_ELEMENTS_VERSION", "1.5.35");
16
 
17
  $currentFile = __FILE__;
18
  $currentFolder = dirname($currentFile);
51
  require_once GlobalsUC::$pathProvider . 'provider_addon.class.php';
52
  require_once $folderIncludesMain . 'unitecreator_params_processor.class.php';
53
  require_once GlobalsUC::$pathProvider . 'provider_params_processor.class.php';
54
+ require_once GlobalsUC::$pathProvider . 'provider_params_processor_multisource.class.php';
55
  require_once $folderIncludesMain . 'unitecreator_addons.class.php';
56
  require_once $folderIncludesMain . 'unitecreator_helper.class.php';
57
  require_once $folderIncludesMain . 'unitecreator_helperhtml.class.php';
js/unitecreator_params_dialog.js CHANGED
@@ -2012,9 +2012,7 @@ function UniteCreatorParamsDialog(){
2012
 
2013
  var objChild = jQuery(child);
2014
  var childValue = objChild.data("control");
2015
-
2016
- trace(value);
2017
-
2018
  var arrValues = childValue.split(",");
2019
  if(arrValues.length > 1){
2020
 
2012
 
2013
  var objChild = jQuery(child);
2014
  var childValue = objChild.data("control");
2015
+
 
 
2016
  var arrValues = childValue.split(",");
2017
  if(arrValues.length > 1){
2018
 
provider/admin_notices.class.php CHANGED
@@ -341,6 +341,25 @@ class UniteCreatorAdminNotices{
341
  border-color:#ff6a00 !important;
342
  }
343
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  </style>
345
  <?php
346
  }
@@ -366,7 +385,7 @@ class UniteCreatorAdminNotices{
366
  * check dissmiss action
367
  */
368
  public function checkDissmissAction(){
369
-
370
  $dissmissKey = UniteFunctionsUC::getPostGetVariable("uc_dismiss_notice","", UniteFunctionsUC::SANITIZE_KEY);
371
  if(empty($dissmissKey))
372
  return(false);
@@ -387,14 +406,15 @@ class UniteCreatorAdminNotices{
387
  * init
388
  */
389
  private function init(){
390
-
391
  if(self::$isInited == true)
392
  return(false);
393
 
394
  if(GlobalsUC::$is_admin == false)
395
  return(false);
396
-
397
- UniteProviderFunctionsUC::addAction("admin_init", array($this, "checkDissmissAction"));
 
398
 
399
  UniteProviderFunctionsUC::addFilter("admin_notices", array($this, "putAdminNotices"),10,3);
400
 
341
  border-color:#ff6a00 !important;
342
  }
343
 
344
+ .uc-notice-header{
345
+ font-weight:bold;
346
+ font-size:16px;
347
+ }
348
+
349
+ .uc-notice-middle{
350
+ padding-top:10px;
351
+ padding-bottom:18px;
352
+ }
353
+
354
+ .uc-notice-wrapper{
355
+ display:flex;
356
+ }
357
+
358
+ .uc-notice-left{
359
+ padding-left:15px;
360
+ padding-right:30px;
361
+ }
362
+
363
  </style>
364
  <?php
365
  }
385
  * check dissmiss action
386
  */
387
  public function checkDissmissAction(){
388
+
389
  $dissmissKey = UniteFunctionsUC::getPostGetVariable("uc_dismiss_notice","", UniteFunctionsUC::SANITIZE_KEY);
390
  if(empty($dissmissKey))
391
  return(false);
406
  * init
407
  */
408
  private function init(){
409
+
410
  if(self::$isInited == true)
411
  return(false);
412
 
413
  if(GlobalsUC::$is_admin == false)
414
  return(false);
415
+
416
+ $this->checkDissmissAction();
417
+
418
 
419
  UniteProviderFunctionsUC::addFilter("admin_notices", array($this, "putAdminNotices"),10,3);
420
 
provider/assets/provider_admin.js CHANGED
@@ -657,7 +657,7 @@ function UniteProviderAdminUC(){
657
  * init taxonomy setting
658
  */
659
  function initTaxonomyTypeSetting(selectPostType){
660
-
661
  if(selectPostType.length == 0)
662
  return(false);
663
 
@@ -670,10 +670,10 @@ function UniteProviderAdminUC(){
670
  throw new Error("unable to find post list setting parent");
671
 
672
  var selectPostTaxonomy = objParent.find(".unite-setting-post-taxonomy");
673
-
674
  if(selectPostTaxonomy.length == 0)
675
  return(false);
676
-
677
  var dataPostTypes = selectPostType.data("arrposttypes");
678
 
679
  if(typeof dataPostTypes == "string"){
657
  * init taxonomy setting
658
  */
659
  function initTaxonomyTypeSetting(selectPostType){
660
+
661
  if(selectPostType.length == 0)
662
  return(false);
663
 
670
  throw new Error("unable to find post list setting parent");
671
 
672
  var selectPostTaxonomy = objParent.find(".unite-setting-post-taxonomy");
673
+
674
  if(selectPostTaxonomy.length == 0)
675
  return(false);
676
+
677
  var dataPostTypes = selectPostType.data("arrposttypes");
678
 
679
  if(typeof dataPostTypes == "string"){
provider/core/plugins/unlimited_elements/dialog_param_elementor.class.php CHANGED
@@ -876,8 +876,10 @@ class UniteCreatorDialogParamElementor extends UniteCreatorDialogParam{
876
  protected function putSpecialAttribute(){
877
 
878
  $arrTypes = array();
879
- $arrTypes["non"] = __("[Select Type]","unlimited-elements-for-elementor");
880
  $arrTypes["entrance_animation"] = __("Entrance Animation","unlimited-elements-for-elementor");
 
 
881
 
882
  $optionsClass = "uc-special-attribute-options";
883
 
876
  protected function putSpecialAttribute(){
877
 
878
  $arrTypes = array();
879
+ $arrTypes["none"] = __("[Select Type]","unlimited-elements-for-elementor");
880
  $arrTypes["entrance_animation"] = __("Entrance Animation","unlimited-elements-for-elementor");
881
+ $arrTypes["items_image_size"] = __("Items Image Size","unlimited-elements-for-elementor");
882
+
883
 
884
  $optionsClass = "uc-special-attribute-options";
885
 
provider/core/plugins/unlimited_elements/elementor/assets/uc_editor_admin.js CHANGED
@@ -142,11 +142,24 @@ function UniteCreatorElementorEditorAdmin(){
142
  var objPanel = getObjElementorPanel();
143
  var prefix = selectPostType.data("settingprefix");
144
 
145
- var selectPostTaxonomy = objPanel.find("select[data-setting='"+prefix+"_taxonomy']");
 
 
 
 
 
146
 
147
  var postType = selectPostType.val();
148
  var selectedTax = selectPostTaxonomy.val();
149
 
 
 
 
 
 
 
 
 
150
 
151
  var objTax = getVal(dataPostTypes, postType);
152
  if(!objTax)
@@ -175,15 +188,20 @@ function UniteCreatorElementorEditorAdmin(){
175
 
176
  //check and change current tax
177
 
 
 
 
178
  var isCurrentTaxRelevant = objTax.hasOwnProperty(selectedTax);
 
179
  if(isCurrentTaxRelevant == false && firstVisibleOption){
180
 
181
  selectPostTaxonomy.val(firstVisibleOption).trigger("change");
182
  }
183
-
184
 
185
  }
186
 
 
187
  /**
188
  * fill category select
189
  */
@@ -270,7 +288,7 @@ function UniteCreatorElementorEditorAdmin(){
270
 
271
  var objSelectPostCategory = objPanel.find("select[data-setting='"+prefix+"_category']");
272
  var objSelectExcludeTerms = objPanel.find("select[data-setting='"+prefix+"_exclude_terms']");
273
-
274
  onPostTypeSelectChange_fillCategorySelect(objSelectPostCategory, selectPostType, dataPostTypes, "All Terms");
275
 
276
  onPostTypeSelectChange_fillCategorySelect(objSelectExcludeTerms, selectPostType, dataPostTypes, "Select Terms To Exclude");
@@ -1219,14 +1237,17 @@ function UniteCreatorElementorEditorAdmin(){
1219
 
1220
 
1221
  function ____________BACKGROUNDS______________(){}
1222
-
 
 
1223
  /**
1224
  * search elementor data
1225
  */
1226
  function searchElementorData(data, id){
1227
 
 
1228
  //get from last opened object
1229
- if(id == window.ucLastElementorModelID){
1230
  var objSettings = getVal(window.ucLastElementorModel, "settings");
1231
  var objSettingsAttributes = getVal(objSettings, "attributes");
1232
 
@@ -1246,36 +1267,44 @@ function UniteCreatorElementorEditorAdmin(){
1246
  if(!data)
1247
  return(false);
1248
 
1249
- var isArray = jQuery.isArray(data);
1250
-
1251
- if(isArray == false)
1252
- return(false);
1253
 
 
 
 
 
 
1254
  jQuery.each(data, function(index, item){
1255
-
1256
- var elType = getVal(item, "elType");
1257
- var elID = getVal(item, "id");
1258
- var elements = getVal(item, "elements");
1259
 
 
 
 
 
 
 
 
1260
  if(g_searchDataID == elID){
 
 
1261
 
1262
- g_searchData = getVal(item, "settings");
1263
-
1264
  return(false);
1265
  }
1266
-
1267
- if(elType != "widget" && jQuery.isArray(elements) && elements.length > 0){
1268
  searchElementorData(elements);
1269
  return(true);
1270
  }
1271
 
1272
  });
1273
-
1274
  var settingsOutput = {};
1275
 
1276
  if(g_searchData && jQuery.isArray(g_searchData) == false)
1277
  settingsOutput = jQuery.extend({}, g_searchData);
1278
-
 
1279
  return(settingsOutput);
1280
  }
1281
 
@@ -1283,28 +1312,23 @@ function UniteCreatorElementorEditorAdmin(){
1283
  * get settings from elementor
1284
  */
1285
  function getSettingsFromElementor(id){
1286
-
1287
  var objSettings = getVal(window.ucLastElementorModel, "settings");
1288
 
1289
  var cid = getVal(objSettings, "cid");
1290
  var attributes = getVal(objSettings, "attributes");
1291
-
1292
  if(cid && attributes)
1293
  return(attributes);
1294
 
1295
  if(typeof elementor == "undefined")
1296
  return(null);
1297
-
1298
- var config = getVal(elementor, "config");
1299
-
1300
- if(!config)
1301
- return(null);
1302
-
1303
- var elements = getVal(config, "elements");
1304
 
1305
  if(!elements)
1306
  return(null);
1307
-
1308
  var objSettings = searchElementorData(elements, id);
1309
 
1310
  if(!objSettings)
@@ -1375,7 +1399,7 @@ function UniteCreatorElementorEditorAdmin(){
1375
  * get repeater data
1376
  */
1377
  function getRepeaterData(objData){
1378
-
1379
  var models = getVal(objData, "models");
1380
 
1381
  if(!models || jQuery.isEmptyObject(models))
@@ -1538,7 +1562,7 @@ function UniteCreatorElementorEditorAdmin(){
1538
  * check section backgrounds
1539
  */
1540
  function onFrontElementReady(element){
1541
-
1542
  var objElement = jQuery(element);
1543
 
1544
  var type = objElement.data("element_type");
@@ -1555,7 +1579,7 @@ function UniteCreatorElementorEditorAdmin(){
1555
  var id = objElement.data("id");
1556
 
1557
  var objSettings = getSettingsFromElementor(id);
1558
-
1559
  checkElementBackground(element, objSettings);
1560
 
1561
  }
@@ -1582,7 +1606,7 @@ function UniteCreatorElementorEditorAdmin(){
1582
 
1583
  window.ucLastElementorModelID = model.id;
1584
  window.ucLastElementorModel = model.attributes;
1585
-
1586
  }
1587
 
1588
  /**
@@ -1592,6 +1616,7 @@ function UniteCreatorElementorEditorAdmin(){
1592
 
1593
  elementor.hooks.addAction("panel/open_editor/section", onElementorSectionPanelChange);
1594
  elementor.hooks.addAction("panel/open_editor/container", onElementorSectionPanelChange);
 
1595
 
1596
  //elementorFrontend.hooks.addAction( 'frontend/element_ready/global', onFrontElementReady);
1597
 
142
  var objPanel = getObjElementorPanel();
143
  var prefix = selectPostType.data("settingprefix");
144
 
145
+ var settingKey = prefix+"_taxonomy";
146
+
147
+ var selectPostTaxonomy = objPanel.find("select[data-setting='"+settingKey+"']");
148
+
149
+ selectPostTaxonomy.attr("multiple", true);
150
+ selectPostTaxonomy.css("height", "50px");
151
 
152
  var postType = selectPostType.val();
153
  var selectedTax = selectPostTaxonomy.val();
154
 
155
+ //fix the value that could be array
156
+ var objSettings = getLastOpenedWidgetSettings();
157
+ var realValue = getVal(objSettings, settingKey);
158
+
159
+ if(typeof realValue == "object"){
160
+ selectedTax = realValue;
161
+ selectPostTaxonomy.val(realValue);
162
+ }
163
 
164
  var objTax = getVal(dataPostTypes, postType);
165
  if(!objTax)
188
 
189
  //check and change current tax
190
 
191
+ if(typeof selectedTax != "string" && selectedTax.length)
192
+ selectedTax = selectedTax[0];
193
+
194
  var isCurrentTaxRelevant = objTax.hasOwnProperty(selectedTax);
195
+
196
  if(isCurrentTaxRelevant == false && firstVisibleOption){
197
 
198
  selectPostTaxonomy.val(firstVisibleOption).trigger("change");
199
  }
200
+
201
 
202
  }
203
 
204
+
205
  /**
206
  * fill category select
207
  */
288
 
289
  var objSelectPostCategory = objPanel.find("select[data-setting='"+prefix+"_category']");
290
  var objSelectExcludeTerms = objPanel.find("select[data-setting='"+prefix+"_exclude_terms']");
291
+
292
  onPostTypeSelectChange_fillCategorySelect(objSelectPostCategory, selectPostType, dataPostTypes, "All Terms");
293
 
294
  onPostTypeSelectChange_fillCategorySelect(objSelectExcludeTerms, selectPostType, dataPostTypes, "Select Terms To Exclude");
1237
 
1238
 
1239
  function ____________BACKGROUNDS______________(){}
1240
+
1241
+
1242
+
1243
  /**
1244
  * search elementor data
1245
  */
1246
  function searchElementorData(data, id){
1247
 
1248
+
1249
  //get from last opened object
1250
+ if(id && id == window.ucLastElementorModelID){
1251
  var objSettings = getVal(window.ucLastElementorModel, "settings");
1252
  var objSettingsAttributes = getVal(objSettings, "attributes");
1253
 
1267
  if(!data)
1268
  return(false);
1269
 
1270
+ var models = getVal(data, "models");
 
 
 
1271
 
1272
+ if(models && jQuery.isArray(models)){
1273
+
1274
+ searchElementorData(models);
1275
+ }
1276
+
1277
  jQuery.each(data, function(index, item){
 
 
 
 
1278
 
1279
+ var attributes = getVal(item, "attributes");
1280
+
1281
+ var elType = getVal(attributes, "elType");
1282
+ var elID = getVal(attributes, "id");
1283
+ var elements = getVal(attributes, "elements");
1284
+
1285
+ //if found
1286
  if(g_searchDataID == elID){
1287
+
1288
+ var objSettings = getVal(attributes, "settings");
1289
 
1290
+ g_searchData = getVal(objSettings, "attributes");
1291
+
1292
  return(false);
1293
  }
1294
+
1295
+ if(elType != "widget" && typeof elements == "object" && elements.length > 0){
1296
  searchElementorData(elements);
1297
  return(true);
1298
  }
1299
 
1300
  });
1301
+
1302
  var settingsOutput = {};
1303
 
1304
  if(g_searchData && jQuery.isArray(g_searchData) == false)
1305
  settingsOutput = jQuery.extend({}, g_searchData);
1306
+
1307
+
1308
  return(settingsOutput);
1309
  }
1310
 
1312
  * get settings from elementor
1313
  */
1314
  function getSettingsFromElementor(id){
1315
+
1316
  var objSettings = getVal(window.ucLastElementorModel, "settings");
1317
 
1318
  var cid = getVal(objSettings, "cid");
1319
  var attributes = getVal(objSettings, "attributes");
1320
+
1321
  if(cid && attributes)
1322
  return(attributes);
1323
 
1324
  if(typeof elementor == "undefined")
1325
  return(null);
1326
+
1327
+ var elements = getVal(elementor, "elements");
 
 
 
 
 
1328
 
1329
  if(!elements)
1330
  return(null);
1331
+
1332
  var objSettings = searchElementorData(elements, id);
1333
 
1334
  if(!objSettings)
1399
  * get repeater data
1400
  */
1401
  function getRepeaterData(objData){
1402
+
1403
  var models = getVal(objData, "models");
1404
 
1405
  if(!models || jQuery.isEmptyObject(models))
1562
  * check section backgrounds
1563
  */
1564
  function onFrontElementReady(element){
1565
+
1566
  var objElement = jQuery(element);
1567
 
1568
  var type = objElement.data("element_type");
1579
  var id = objElement.data("id");
1580
 
1581
  var objSettings = getSettingsFromElementor(id);
1582
+
1583
  checkElementBackground(element, objSettings);
1584
 
1585
  }
1606
 
1607
  window.ucLastElementorModelID = model.id;
1608
  window.ucLastElementorModel = model.attributes;
1609
+
1610
  }
1611
 
1612
  /**
1616
 
1617
  elementor.hooks.addAction("panel/open_editor/section", onElementorSectionPanelChange);
1618
  elementor.hooks.addAction("panel/open_editor/container", onElementorSectionPanelChange);
1619
+ elementor.hooks.addAction("panel/open_editor/widget", onElementorSectionPanelChange);
1620
 
1621
  //elementorFrontend.hooks.addAction( 'frontend/element_ready/global', onFrontElementReady);
1622
 
provider/core/plugins/unlimited_elements/elementor/elementor_layout_exporter.class.php CHANGED
@@ -530,17 +530,25 @@ class UniteCreatorLayoutsExporterElementor extends UniteCreatorLayoutsExporter{
530
 
531
  function a_______EXPORT_IMAGES______(){}
532
 
 
533
  /**
534
  * check if it's image array or not
535
  */
536
  protected function isImageArray($arr){
 
 
 
 
 
 
537
 
538
- if( count($arr) > 2 || empty($arr))
539
- return(false);
540
 
541
- if(isset($arr["url"]) || isset($arr["id"]))
542
  return(true);
543
 
 
544
  return(false);
545
  }
546
 
@@ -588,9 +596,11 @@ class UniteCreatorLayoutsExporterElementor extends UniteCreatorLayoutsExporter{
588
 
589
  continue;
590
  }
591
-
592
- $isImageItem = $this->isImageArray($item);
593
 
 
 
 
 
594
  if($isImageItem == true){
595
 
596
  $arrLayout[$key] = $modifyFunc($item, $key);
@@ -646,11 +656,7 @@ class UniteCreatorLayoutsExporterElementor extends UniteCreatorLayoutsExporter{
646
  $arrContent = $this->runOverLayoutImagesForExport($arrContent, array($this, "modifyLayoutImageForExport"));
647
 
648
  $this->addPostFeaturedImage();
649
-
650
- /*
651
- dmp("export images"); dmp($this->arrExportImages); exit();
652
- */
653
-
654
  $this->putLayoutImages_copyImages();
655
 
656
  return($arrContent);
@@ -1055,6 +1061,7 @@ class UniteCreatorLayoutsExporterElementor extends UniteCreatorLayoutsExporter{
1055
 
1056
  $arrContent = $this->modifyExportDeleteGlobals($arrContent);
1057
 
 
1058
  $this->putLayoutFile_elementor($arrContent);
1059
 
1060
  //make zip
@@ -1176,9 +1183,9 @@ class UniteCreatorLayoutsExporterElementor extends UniteCreatorLayoutsExporter{
1176
 
1177
  if(!empty($sectionID))
1178
  $exportName = $exportName."_".$sectionID;
1179
-
1180
  $arrData = $this->exportElementorLayoutZip($content, $exportName, $isReturnData);
1181
-
1182
  return($arrData);
1183
  }
1184
 
530
 
531
  function a_______EXPORT_IMAGES______(){}
532
 
533
+
534
  /**
535
  * check if it's image array or not
536
  */
537
  protected function isImageArray($arr){
538
+
539
+ if(count($arr) <= 2 && ( isset($arr["url"]) || isset($arr["id"]) ) )
540
+ return(true);
541
+
542
+ if( count($arr) <= 5 && array_key_exists("url", $arr) && array_key_exists("id", $arr) )
543
+ return(true);
544
 
545
+ if( count($arr) <= 5 && array_key_exists("url", $arr) && array_key_exists("alt", $arr) )
546
+ return(true);
547
 
548
+ if( count($arr) <= 5 && array_key_exists("id", $arr) && array_key_exists("alt", $arr) )
549
  return(true);
550
 
551
+
552
  return(false);
553
  }
554
 
596
 
597
  continue;
598
  }
 
 
599
 
600
+ //in case of array
601
+
602
+ $isImageItem = $this->isImageArray($item);
603
+
604
  if($isImageItem == true){
605
 
606
  $arrLayout[$key] = $modifyFunc($item, $key);
656
  $arrContent = $this->runOverLayoutImagesForExport($arrContent, array($this, "modifyLayoutImageForExport"));
657
 
658
  $this->addPostFeaturedImage();
659
+
 
 
 
 
660
  $this->putLayoutImages_copyImages();
661
 
662
  return($arrContent);
1061
 
1062
  $arrContent = $this->modifyExportDeleteGlobals($arrContent);
1063
 
1064
+
1065
  $this->putLayoutFile_elementor($arrContent);
1066
 
1067
  //make zip
1183
 
1184
  if(!empty($sectionID))
1185
  $exportName = $exportName."_".$sectionID;
1186
+
1187
  $arrData = $this->exportElementorLayoutZip($content, $exportName, $isReturnData);
1188
+
1189
  return($arrData);
1190
  }
1191
 
provider/core/plugins/unlimited_elements/elementor/elementor_widget.class.php CHANGED
@@ -2451,7 +2451,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
2451
 
2452
  //add query controls section (post list) if exists
2453
  if($hasPostsList == true){
2454
-
2455
  $forWooCommerce = UniteFunctionsUC::getVal($postListParam, "for_woocommerce_products");
2456
  $forWooCommerce = UniteFunctionsUC::strToBool($forWooCommerce);
2457
 
@@ -2465,7 +2465,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
2465
  'label' => $labelPosts,
2466
  )
2467
  );
2468
-
2469
  $this->addElementorParamUC($postListParam);
2470
 
2471
  $this->end_controls_section();
@@ -2552,6 +2552,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
2552
  */
2553
  private function putListingSections($listingParam){
2554
 
 
2555
  $objUEControls = new UniteCreatorElementorControls();
2556
 
2557
  $name = UniteFunctionsUC::getVal($listingParam, "name");
@@ -2559,6 +2560,9 @@ class UniteCreatorElementorWidget extends Widget_Base {
2559
  $useFor = UniteFunctionsUC::getVal($listingParam, "use_for");
2560
  $isForGallery = ($useFor == "gallery");
2561
 
 
 
 
2562
  switch($useFor){
2563
  case "remote":
2564
  case "filter":
@@ -2578,8 +2582,7 @@ class UniteCreatorElementorWidget extends Widget_Base {
2578
  'condition'=>array($name."_source"=>"posts")
2579
  )
2580
  );
2581
-
2582
-
2583
  $postParam = $listingParam;
2584
 
2585
  $postParam["type"] = UniteCreatorDialogParam::PARAM_POSTS_LIST;
@@ -2594,8 +2597,8 @@ class UniteCreatorElementorWidget extends Widget_Base {
2594
  //woocommerce
2595
 
2596
  $isWooActive = UniteCreatorWooIntegrate::isWooActive();
2597
- if($isWooActive == true){
2598
-
2599
  //add products section
2600
 
2601
  $this->start_controls_section(
@@ -3532,9 +3535,9 @@ class UniteCreatorElementorWidget extends Widget_Base {
3532
  $arrItems = $this->modifyArrItemsParamsValuesUC($arrItems, $itemsType);
3533
 
3534
  }
3535
-
3536
  $arrMainParamValues = $this->getArrMainParamValuesUC($arrValues, $objAddon);
3537
-
3538
  //transfer the pagination type
3539
  $arrPostListParam = $objAddon->getParamByType(UniteCreatorDialogParam::PARAM_POSTS_LIST);
3540
 
2451
 
2452
  //add query controls section (post list) if exists
2453
  if($hasPostsList == true){
2454
+
2455
  $forWooCommerce = UniteFunctionsUC::getVal($postListParam, "for_woocommerce_products");
2456
  $forWooCommerce = UniteFunctionsUC::strToBool($forWooCommerce);
2457
 
2465
  'label' => $labelPosts,
2466
  )
2467
  );
2468
+
2469
  $this->addElementorParamUC($postListParam);
2470
 
2471
  $this->end_controls_section();
2552
  */
2553
  private function putListingSections($listingParam){
2554
 
2555
+
2556
  $objUEControls = new UniteCreatorElementorControls();
2557
 
2558
  $name = UniteFunctionsUC::getVal($listingParam, "name");
2560
  $useFor = UniteFunctionsUC::getVal($listingParam, "use_for");
2561
  $isForGallery = ($useFor == "gallery");
2562
 
2563
+ $isForItems = ($useFor == "items");
2564
+
2565
+
2566
  switch($useFor){
2567
  case "remote":
2568
  case "filter":
2582
  'condition'=>array($name."_source"=>"posts")
2583
  )
2584
  );
2585
+
 
2586
  $postParam = $listingParam;
2587
 
2588
  $postParam["type"] = UniteCreatorDialogParam::PARAM_POSTS_LIST;
2597
  //woocommerce
2598
 
2599
  $isWooActive = UniteCreatorWooIntegrate::isWooActive();
2600
+ if($isWooActive == true && $isForItems == false){
2601
+
2602
  //add products section
2603
 
2604
  $this->start_controls_section(
3535
  $arrItems = $this->modifyArrItemsParamsValuesUC($arrItems, $itemsType);
3536
 
3537
  }
3538
+
3539
  $arrMainParamValues = $this->getArrMainParamValuesUC($arrValues, $objAddon);
3540
+
3541
  //transfer the pagination type
3542
  $arrPostListParam = $objAddon->getParamByType(UniteCreatorDialogParam::PARAM_POSTS_LIST);
3543
 
provider/core/plugins/unlimited_elements/elementor/pagination.class.php CHANGED
@@ -12,6 +12,7 @@ defined ('UNLIMITED_ELEMENTS_INC') or die ('restricted aceess');
12
 
13
  class UniteCreatorElementorPagination{
14
 
 
15
 
16
  /**
17
  * add content controls
@@ -373,7 +374,13 @@ class UniteCreatorElementorPagination{
373
 
374
  //output demo pagination
375
  $isEditMode = UniteCreatorElementorIntegrate::$isEditMode;
 
376
  if($isEditMode == true){
 
 
 
 
 
377
  $options["total"] = 5;
378
  $options["current"] = 2;
379
  return($options);
@@ -389,7 +396,6 @@ class UniteCreatorElementorPagination{
389
  global $wp_rewrite;
390
  $isUsingPermalinks = $wp_rewrite->using_permalinks();
391
 
392
-
393
  if( $isUsingPermalinks == true){ //with permalinks - add /2
394
 
395
  $permalink = get_permalink();
@@ -419,10 +425,17 @@ class UniteCreatorElementorPagination{
419
 
420
  //set current page
421
  $currentPage = 1;
422
- if(!empty(GlobalsProviderUC::$lastPostQuery_page))
423
  $currentPage = GlobalsProviderUC::$lastPostQuery_page;
 
 
 
 
 
 
424
  else{
425
  $currentPage = get_query_var("paged");
 
426
  }
427
 
428
  if(empty($currentPage))
@@ -507,7 +520,6 @@ class UniteCreatorElementorPagination{
507
  */
508
  public function putPaginationWidgetHtml($args){
509
 
510
-
511
  $putPrevNext = UniteFunctionsUC::getVal($args, "put_prev_next_buttons");
512
  $putPrevNext = UniteFunctionsUC::strToBool($putPrevNext);
513
 
@@ -532,6 +544,9 @@ class UniteCreatorElementorPagination{
532
  $isDebug = UniteFunctionsUC::getVal($args, "debug_pagination_options");
533
  $isDebug = UniteFunctionsUC::strToBool($isDebug);
534
 
 
 
 
535
  $forceFormat = UniteFunctionsUC::getVal($args, "force_format");
536
  if($forceFormat == "none")
537
  $forceFormat = null;
@@ -582,10 +597,19 @@ class UniteCreatorElementorPagination{
582
  dmp("Force Format: ".$forceFormat);
583
  }
584
 
585
-
 
 
 
 
 
 
 
 
586
  //fix the archive
587
 
588
  if($isArchivePage == true && !empty(GlobalsProviderUC::$lastPostQuery_paginationType) && GlobalsProviderUC::$lastPostQuery_paginationType != GlobalsProviderUC::QUERY_TYPE_CURRENT){
 
589
  $isArchivePage = false;
590
 
591
  if($isDebug == true){
12
 
13
  class UniteCreatorElementorPagination{
14
 
15
+ const SHOW_DEBUG = false; //please turn it off
16
 
17
  /**
18
  * add content controls
374
 
375
  //output demo pagination
376
  $isEditMode = UniteCreatorElementorIntegrate::$isEditMode;
377
+
378
  if($isEditMode == true){
379
+
380
+ if(self::SHOW_DEBUG == true){
381
+ dmp("edit mode!!!");
382
+ }
383
+
384
  $options["total"] = 5;
385
  $options["current"] = 2;
386
  return($options);
396
  global $wp_rewrite;
397
  $isUsingPermalinks = $wp_rewrite->using_permalinks();
398
 
 
399
  if( $isUsingPermalinks == true){ //with permalinks - add /2
400
 
401
  $permalink = get_permalink();
425
 
426
  //set current page
427
  $currentPage = 1;
428
+ if(!empty(GlobalsProviderUC::$lastPostQuery_page)){
429
  $currentPage = GlobalsProviderUC::$lastPostQuery_page;
430
+
431
+ if(self::SHOW_DEBUG == true){
432
+ dmp("current: $currentPage from the lastPostQuery_page var");
433
+ }
434
+
435
+ }
436
  else{
437
  $currentPage = get_query_var("paged");
438
+ dmp("current: $currentPage from the get_query_var");
439
  }
440
 
441
  if(empty($currentPage))
520
  */
521
  public function putPaginationWidgetHtml($args){
522
 
 
523
  $putPrevNext = UniteFunctionsUC::getVal($args, "put_prev_next_buttons");
524
  $putPrevNext = UniteFunctionsUC::strToBool($putPrevNext);
525
 
544
  $isDebug = UniteFunctionsUC::getVal($args, "debug_pagination_options");
545
  $isDebug = UniteFunctionsUC::strToBool($isDebug);
546
 
547
+ if(self::SHOW_DEBUG == true)
548
+ $isDebug = true;
549
+
550
  $forceFormat = UniteFunctionsUC::getVal($args, "force_format");
551
  if($forceFormat == "none")
552
  $forceFormat = null;
597
  dmp("Force Format: ".$forceFormat);
598
  }
599
 
600
+ //on ajax - always take the last grid response - single
601
+
602
+ $objFilters = new UniteCreatorFiltersProcess();
603
+ $isAjax = $objFilters->isFrontAjaxRequest();
604
+
605
+ if($isAjax == true)
606
+ $isArchivePage = false;
607
+
608
+
609
  //fix the archive
610
 
611
  if($isArchivePage == true && !empty(GlobalsProviderUC::$lastPostQuery_paginationType) && GlobalsProviderUC::$lastPostQuery_paginationType != GlobalsProviderUC::QUERY_TYPE_CURRENT){
612
+
613
  $isArchivePage = false;
614
 
615
  if($isDebug == true){
provider/core/plugins/unlimited_elements/globals.class.php CHANGED
@@ -17,7 +17,7 @@ class GlobalsUnlimitedElements{
17
  public static $showAdminNotice = false;
18
 
19
  public static $arrAdminNotice = array(
20
- "id"=>"doubly1",
21
  "text"=>"temp text", //real text goes from event
22
  //"banner"=>"birthday-3-banner.png",
23
  "type"=>"simple",
@@ -87,16 +87,48 @@ class GlobalsUnlimitedElements{
87
  public static $urlTemplatesList;
88
  public static $renderingDynamicData;
89
 
 
90
  /**
91
- * on admin init
92
  */
93
- public static function onAdminInit(){
94
-
95
  $urlInstallDoubly = UniteFunctionsWPUC::getInstallPluginLink("doubly");
 
 
96
 
97
- $textDoubly = "Unlimited Elements Notice - Do you know, you can copy sections from our site using our Doubly plugin. <a href='{$urlInstallDoubly}'>Install Doubly Now</a>";
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
  self::$arrAdminNotice["text"] = $textDoubly;
 
 
 
 
 
 
 
 
 
 
 
 
 
100
 
101
  }
102
 
@@ -106,6 +138,10 @@ class GlobalsUnlimitedElements{
106
  */
107
  public static function initGlobals(){
108
 
 
 
 
 
109
  self::$urlTemplatesList = admin_url("edit.php?post_type=elementor_library&tabs_group=library");
110
 
111
  add_action("init",array("GlobalsUnlimitedElements", "onAdminInit"));
17
  public static $showAdminNotice = false;
18
 
19
  public static $arrAdminNotice = array(
20
+ "id"=>"doubly2",
21
  "text"=>"temp text", //real text goes from event
22
  //"banner"=>"birthday-3-banner.png",
23
  "type"=>"simple",
87
  public static $urlTemplatesList;
88
  public static $renderingDynamicData;
89
 
90
+
91
  /**
92
+ * set doubly notice text
93
  */
94
+ private static function setDoublyNoticeText(){
95
+
96
  $urlInstallDoubly = UniteFunctionsWPUC::getInstallPluginLink("doubly");
97
+
98
+ $urlImage = GlobalsUC::$urlPluginImages."logo-circle.svg";
99
 
100
+ $textDoubly = "
101
+ <div class='uc-notice-wrapper'>
102
+ <div class='uc-notice-left'>
103
+ <img src='{$urlImage}' width='100'>
104
+ </div>
105
+ <div class='uc-notice-right'>
106
+ <div class='uc-notice-header'>Live Copy Paste from Unlimited Elements</div>
107
+
108
+ <div class='uc-notice-middle'>
109
+ Did you know that now you can copy fully designed sections from Unlimited Elements to your website for FREE? <br>
110
+ If you want to try then install our new plugin called Doubly. <br>
111
+ </div>
112
+
113
+ <a class='uc-notice-button button button-primary' href='{$urlInstallDoubly}'>Install Doubly Now</a>
114
+ </div>
115
+ </div>
116
+ ";
117
 
118
  self::$arrAdminNotice["text"] = $textDoubly;
119
+
120
+ }
121
+
122
+
123
+ /**
124
+ * on admin init
125
+ */
126
+ public static function onAdminInit(){
127
+
128
+ if(self::$showAdminNotice == false)
129
+ return(false);
130
+
131
+ self::setDoublyNoticeText();
132
 
133
  }
134
 
138
  */
139
  public static function initGlobals(){
140
 
141
+ //remove me
142
+ //if(GlobalsUC::$inDev == true)
143
+ //self::$showAdminNotice = true;
144
+
145
  self::$urlTemplatesList = admin_url("edit.php?post_type=elementor_library&tabs_group=library");
146
 
147
  add_action("init",array("GlobalsUnlimitedElements", "onAdminInit"));
provider/functions_wordpress.class.php CHANGED
@@ -1404,13 +1404,14 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1404
  $prefix = null;
1405
  if($addPrefixes == true)
1406
  $prefix = "cf_";
1407
-
1408
  $isAcfActive = UniteCreatorAcfIntegrate::isAcfActive();
1409
 
1410
  //get acf
1411
  if($isAcfActive){
1412
  $objAcf = self::getObjAcfIntegrate();
1413
- $arrCustomFields = $objAcf->getAcfFields($postID);
 
1414
  }else{ //without acf - get regular custom fields
1415
 
1416
  $arrCustomFields = null;
@@ -1418,9 +1419,9 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1418
  $isPodsExists = UniteCreatorPodsIntegrate::isPodsExists();
1419
  if($isPodsExists){
1420
  $objPods = UniteCreatorPodsIntegrate::getObjPodsIntegrate();
1421
- $arrCustomFields = $objPods->getPodsFields($postID);
1422
  }
1423
-
1424
  //handle toolset
1425
  $isToolsetActive = UniteCreatorToolsetIntegrate::isToolsetExists();
1426
 
@@ -1504,7 +1505,13 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
1504
  * get term meta
1505
  */
1506
  public static function getTermImage($termID, $metaKey){
1507
-
 
 
 
 
 
 
1508
  if(empty($metaKey))
1509
  return(null);
1510
 
@@ -2187,6 +2194,44 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
2187
  return($content);
2188
  }
2189
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2190
  public static function a__________POST_ACTIONS_________(){}
2191
 
2192
 
@@ -2718,6 +2763,30 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
2718
 
2719
  public static function a___________USER_DATA__________(){}
2720
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2721
  /**
2722
  * get keys of user meta
2723
  */
@@ -3196,18 +3265,6 @@ defined('UNLIMITED_ELEMENTS_INC') or die('Restricted access');
3196
  return(false);
3197
  }
3198
 
3199
- /**
3200
- *
3201
- * validate permission that the user is admin, and can manage options.
3202
- */
3203
- public static function isAdminPermissions(){
3204
-
3205
- if( is_admin() && current_user_can("manage_options") )
3206
- return(true);
3207
-
3208
- return(false);
3209
- }
3210
-
3211
 
3212
  /**
3213
  * add shortcode
1404
  $prefix = null;
1405
  if($addPrefixes == true)
1406
  $prefix = "cf_";
1407
+
1408
  $isAcfActive = UniteCreatorAcfIntegrate::isAcfActive();
1409
 
1410
  //get acf
1411
  if($isAcfActive){
1412
  $objAcf = self::getObjAcfIntegrate();
1413
+ $arrCustomFields = $objAcf->getAcfFields($postID, "post", $addPrefixes);
1414
+
1415
  }else{ //without acf - get regular custom fields
1416
 
1417
  $arrCustomFields = null;
1419
  $isPodsExists = UniteCreatorPodsIntegrate::isPodsExists();
1420
  if($isPodsExists){
1421
  $objPods = UniteCreatorPodsIntegrate::getObjPodsIntegrate();
1422
+ $arrCustomFields = $objPods->getPodsFields($postID, $addPrefixes);
1423
  }
1424
+
1425
  //handle toolset
1426
  $isToolsetActive = UniteCreatorToolsetIntegrate::isToolsetExists();
1427
 
1505
  * get term meta
1506
  */
1507
  public static function getTermImage($termID, $metaKey){
1508
+
1509
+ if(empty($termID) || $termID === "current")
1510
+ $termID = self::getCurrentTermID();
1511
+
1512
+ if(empty($termID))
1513
+ return(null);
1514
+
1515
  if(empty($metaKey))
1516
  return(null);
1517
 
2194
  return($content);
2195
  }
2196
 
2197
+ /**
2198
+ * get next or previous post
2199
+ */
2200
+ public static function getNextPrevPostData($type = "next", $taxonomy = "category"){
2201
+
2202
+ if(empty($taxonomy))
2203
+ $taxonomy = "category";
2204
+
2205
+ if(empty($type))
2206
+ $type = "next";
2207
+
2208
+ $previous = !($type == "next");
2209
+
2210
+ if ( $previous && is_attachment() ) {
2211
+ $post = get_post( get_post()->post_parent );
2212
+ } else {
2213
+ $in_same_term = false;
2214
+ $excluded_terms = '';
2215
+
2216
+ $post = get_adjacent_post( $in_same_term, $excluded_terms, $previous, $taxonomy );
2217
+ }
2218
+
2219
+ if(empty($post))
2220
+ return(null);
2221
+
2222
+ $title = $post->post_title;
2223
+
2224
+ $link = get_permalink($post);
2225
+
2226
+ $output = array();
2227
+
2228
+ $output["title"] = $title;
2229
+ $output["link"] = $link;
2230
+
2231
+ return($output);
2232
+ }
2233
+
2234
+
2235
  public static function a__________POST_ACTIONS_________(){}
2236
 
2237
 
2763
 
2764
  public static function a___________USER_DATA__________(){}
2765
 
2766
+
2767
+ /**
2768
+ *
2769
+ * validate permission that the user is admin, and can manage options.
2770
+ */
2771
+ public static function isAdminPermissions(){
2772
+
2773
+ if( is_admin() && current_user_can("manage_options") )
2774
+ return(true);
2775
+
2776
+ return(false);
2777
+ }
2778
+
2779
+ /**
2780
+ * check if current user has some permissions
2781
+ */
2782
+ public static function isCurrentUserHasPermissions(){
2783
+
2784
+ $canEdit = current_user_can("manage_options");
2785
+
2786
+ return($canEdit);
2787
+ }
2788
+
2789
+
2790
  /**
2791
  * get keys of user meta
2792
  */
3265
  return(false);
3266
  }
3267
 
 
 
 
 
 
 
 
 
 
 
 
 
3268
 
3269
  /**
3270
  * add shortcode
provider/provider_functions.class.php CHANGED
@@ -121,7 +121,7 @@ class UniteProviderFunctionsUC{
121
 
122
  $uploadsBaseDir = UniteFunctionsUC::getVal($arrUploads, "basedir");
123
  $uploadsBaseUrl = UniteFunctionsUC::getVal($arrUploads, "baseurl");
124
-
125
  $urlBase = null;
126
  if(is_dir($uploadsBaseDir)){
127
  $pathBase = UniteFunctionsUC::addPathEndingSlash($uploadsBaseDir);
121
 
122
  $uploadsBaseDir = UniteFunctionsUC::getVal($arrUploads, "basedir");
123
  $uploadsBaseUrl = UniteFunctionsUC::getVal($arrUploads, "baseurl");
124
+
125
  $urlBase = null;
126
  if(is_dir($uploadsBaseDir)){
127
  $pathBase = UniteFunctionsUC::addPathEndingSlash($uploadsBaseDir);
provider/provider_params_processor.class.php CHANGED
@@ -12,6 +12,8 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
12
  const SHOW_DEBUG_QUERY = false;
13
 
14
  private static $arrPostTypeTaxCache = array();
 
 
15
 
16
 
17
  /**
@@ -690,8 +692,8 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
690
  /**
691
  * get post data
692
  */
693
- private function getPostDataByObj($post, $arrPostAdditions = array(), $arrImageSizes = null){
694
-
695
  try{
696
 
697
  if(is_numeric($post))
@@ -812,18 +814,26 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
812
  /**
813
  * run custom query
814
  */
815
- private function getPostListData_getCustomQueryFilters($args, $value, $name, $data){
816
 
 
 
817
  if(GlobalsUC::$isProVersion == false)
818
  return($args);
 
819
 
820
  $queryID = UniteFunctionsUC::getVal($value, "{$name}_queryid");
821
  $queryID = trim($queryID);
822
 
 
823
  if(empty($queryID))
824
  return($args);
825
 
826
- HelperUC::addDebug("applying custom args filter: $queryID");
 
 
 
 
827
 
828
  //pass the widget data
829
  $widgetData = $data;
@@ -831,7 +841,10 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
831
 
832
  $args = apply_filters($queryID, $args, $widgetData);
833
 
834
- HelperUC::addDebug("args after custom query", $args);
 
 
 
835
 
836
  return($args);
837
  }
@@ -1034,7 +1047,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1034
  $beforeMeta = date('Ymt');
1035
 
1036
  }else{
1037
- $year = $date("Y");
1038
  $month = date("m");
1039
  }
1040
 
@@ -1155,6 +1168,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1155
  if(is_array($value) == false)
1156
  return(array());
1157
 
 
1158
  $filters = array();
1159
 
1160
  $showDebugQuery = UniteFunctionsUC::getVal($value, "{$name}_show_query_debug");
@@ -1163,10 +1177,23 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1163
  if(self::SHOW_DEBUG_QUERY == true)
1164
  $showDebugQuery = true;
1165
 
 
 
 
 
 
 
 
 
 
1166
  $debugType = null;
1167
  if($showDebugQuery == true)
1168
  $debugType = UniteFunctionsUC::getVal($value, "{$name}_query_debug_type");
1169
 
 
 
 
 
1170
  $source = UniteFunctionsUC::getVal($value, "{$name}_source");
1171
 
1172
  $isForWoo = UniteFunctionsUC::getVal($param, "for_woocommerce_products");
@@ -1291,7 +1318,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1291
 
1292
  if($limit > 1000)
1293
  $limit = 1000;
1294
-
1295
 
1296
  //------ Exclude ---------
1297
 
@@ -1405,8 +1432,8 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1405
 
1406
  switch($includeby){
1407
  case "terms_from_dynamic":
1408
-
1409
- $strTermIDs = UniteFunctionsUC::getVal($value, $name."_includeby_dynamic_field");
1410
 
1411
  $arrTermIDs = UniteFunctionsUC::getIDsArray($strTermIDs);
1412
 
@@ -1498,7 +1525,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1498
  // exclude duplicates
1499
  if($isAvoidDuplicates == true && !empty(GlobalsProviderUC::$arrFetchedPostIDs)){
1500
 
1501
- $arrFetchedIDs = array_keys(GlobalsProviderUC::$arrFetchedPostIDs);
1502
 
1503
  if(empty($arrPostsNotIn))
1504
  $arrPostsNotIn = $arrFetchedIDs;
@@ -1856,6 +1883,8 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1856
  $makePostINOrder = true;
1857
  }
1858
 
 
 
1859
  if(!empty($arrIDsFromContent)){
1860
  $arrPostInIDs = $arrIDsFromContent;
1861
  $makePostINOrder = true;
@@ -1962,7 +1991,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1962
 
1963
 
1964
  $args = $this->getPostListData_getPostGetFilters_pagination($args, $value, $name, $data, $param);
1965
-
1966
  $args = $this->getPostListData_getCustomQueryFilters($args, $value, $name, $data);
1967
 
1968
  //update by post and get filters
@@ -1995,6 +2024,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
1995
 
1996
  $query = new WP_Query($args);
1997
 
 
1998
 
1999
  if($showDebugQuery == true && $debugType == "show_query"){
2000
 
@@ -2069,12 +2099,16 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2069
  }
2070
 
2071
  //save last query and page
2072
- $this->saveLastQueryAndPage($query,GlobalsProviderUC::QUERY_TYPE_CUSTOM);
 
 
2073
 
2074
  //remember duplicate posts
2075
  if($isAvoidDuplicates == true){
2076
- foreach($arrPosts as $post)
2077
  GlobalsProviderUC::$arrFetchedPostIDs[$post->ID] = true;
 
 
2078
  }
2079
 
2080
  HelperUC::addDebug("posts found: ".count($arrPosts));
@@ -2127,7 +2161,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2127
  /**
2128
  * save last query and page
2129
  */
2130
- private function saveLastQueryAndPage($query, $type){
2131
 
2132
  GlobalsProviderUC::$lastPostQuery = $query;
2133
  GlobalsProviderUC::$lastPostQuery_page = 1;
@@ -2147,9 +2181,14 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2147
 
2148
  $offset = UniteFunctionsUC::getVal($queryVars, "offset");
2149
 
 
 
 
2150
  if(empty($offset))
2151
  return(false);
2152
 
 
 
2153
  $page = ceil($offset / $perPage)+1;
2154
 
2155
  if(!empty($page))
@@ -2266,6 +2305,10 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2266
 
2267
  }
2268
 
 
 
 
 
2269
  $query = $wp_query;
2270
 
2271
  $objFilters = new UniteCreatorFiltersProcess();
@@ -2311,7 +2354,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2311
 
2312
  //save last query
2313
  $this->saveLastQueryAndPage($query, GlobalsProviderUC::QUERY_TYPE_CURRENT);
2314
-
2315
  $arrPosts = $query->posts;
2316
 
2317
 
@@ -2355,6 +2398,10 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2355
 
2356
  $postIDs = UniteFunctionsUC::getVal($value, $name."_manual_select_post_ids");
2357
 
 
 
 
 
2358
  if(empty($postIDs))
2359
  $postIDs = array();
2360
 
@@ -2377,6 +2424,9 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2377
 
2378
  $debugType = UniteFunctionsUC::getVal($value, "{$name}_query_debug_type");
2379
 
 
 
 
2380
 
2381
  if(empty($postIDs)){
2382
 
@@ -2407,6 +2457,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2407
 
2408
  $query = new WP_Query($args);
2409
 
 
2410
  if($showDebugQuery == true && $debugType == "show_query"){
2411
 
2412
  $originalQueryVars = $query->query_vars;
@@ -2434,13 +2485,26 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2434
 
2435
  //save last query
2436
  $this->saveLastQueryAndPage($query,GlobalsProviderUC::QUERY_TYPE_MANUAL);
2437
-
2438
  HelperUC::addDebug("posts found: ".count($arrPosts));
2439
 
2440
  if($showDebugQuery == true){
2441
  dmp("Found Posts: ".count($arrPosts));
2442
  }
2443
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2444
  return($arrPosts);
2445
 
2446
  }
@@ -2448,9 +2512,8 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2448
  /**
2449
  * get post list data
2450
  */
2451
- private function getPostListData($value, $name, $processType, $param, $data){
2452
 
2453
-
2454
  if($processType != self::PROCESS_TYPE_OUTPUT && $processType != self::PROCESS_TYPE_OUTPUT_BACK)
2455
  return($data);
2456
 
@@ -2511,6 +2574,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2511
 
2512
  HelperUC::addDebug("post additions", $arrPostAdditions);
2513
 
 
2514
  //image sizes
2515
  $showImageSizes = UniteFunctionsUC::getVal($param, "show_image_sizes");
2516
  $showImageSizes = UniteFunctionsUC::strToBool($showImageSizes);
@@ -2518,17 +2582,19 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2518
  $arrImageSizes = null;
2519
 
2520
  if($showImageSizes == true){
2521
-
2522
  $imageSize = UniteFunctionsUC::getVal($value, "{$name}_imagesize","medium_large");
 
2523
  $arrImageSizes["desktop"] = $imageSize;
2524
  }
2525
 
 
2526
  //prepare listing output. no items prepare for the listing
2527
 
2528
  $objFilters = new UniteCreatorFiltersProcess();
2529
 
2530
  if($useForListing == true){
2531
-
2532
  //add filterable variables - dynamic
2533
  $data = $objFilters->addWidgetFilterableVarsFromData($data, $value, $nameListing);
2534
 
@@ -2538,16 +2604,16 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
2538
 
2539
  //filters additions - regular
2540
 
2541
- $data = $objFilters->addWidgetFilterableVariables($data, $this->addon);
2542
  }
2543
-
2544
  $arrData = array();
2545
  foreach($arrPosts as $post){
2546
 
2547
  //protection in case that post is id
2548
  if(is_numeric($post))
2549
  $post = get_post($post);
2550
-
2551
  $arrData[] = $this->getPostDataByObj($post, $arrPostAdditions, $arrImageSizes);
2552
  }
2553
 
@@ -3519,222 +3585,22 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3519
 
3520
  protected function z_______________MULTISOURCE____________(){}
3521
 
3522
- /**
3523
- * get all fields from the values
3524
- */
3525
- private function modifyMultisourceItems_getFields($arrValues, $namePosts){
3526
-
3527
- $arrFields = array();
3528
-
3529
- foreach($arrValues as $key => $value){
3530
-
3531
- $prefix = $namePosts."_field_source_";
3532
-
3533
- $pos = strpos($key, $prefix);
3534
-
3535
- if($pos === false)
3536
- continue;
3537
-
3538
- $arrFields[$key] = $value;
3539
- }
3540
-
3541
- return($arrFields);
3542
- }
3543
-
3544
-
3545
- /**
3546
- * get post data by source, modify item
3547
- */
3548
- private function modifyMultisourceItems_getFieldDataFromPost($item, $source, $fieldName, $postData, $param, $metaValue){
3549
-
3550
- //set as default value
3551
-
3552
- $defaultValue = UniteFunctionsUC::getVal($param, "default_value");
3553
-
3554
- $item[$fieldName] = $defaultValue;
3555
-
3556
- if($source == "default")
3557
- return($item);
3558
-
3559
- if(empty($postData))
3560
- return($item);
3561
-
3562
- if(!is_array($postData))
3563
- return($item);
3564
-
3565
-
3566
-
3567
- //post values source
3568
-
3569
- foreach($postData as $name => $value){
3570
-
3571
- //if equal - just copy the data
3572
-
3573
- if($name === $source){
3574
-
3575
- $paramType = UniteFunctionsUC::getVal($param, "type");
3576
-
3577
- switch($paramType){
3578
- case UniteCreatorDialogParam::PARAM_NUMBER:
3579
- case UniteCreatorDialogParam::PARAM_SLIDER:
3580
-
3581
- //protection - set to default if not numeric
3582
- if(is_string($value) && is_numeric($value) == false){
3583
-
3584
- if(empty($value))
3585
- $value = 0;
3586
- else
3587
- $value = UniteFunctionsUC::getVal($param, "default_value");
3588
-
3589
- }
3590
-
3591
- $item = $this->getProcessedParamData($item, $value, $param, self::PROCESS_TYPE_OUTPUT);
3592
-
3593
- break;
3594
- }
3595
-
3596
- $item[$fieldName] = $value;
3597
-
3598
- continue;
3599
- }
3600
-
3601
-
3602
- if(strpos($name, $source."_") === 0){
3603
-
3604
- $suffix = substr($name, strlen($source));
3605
-
3606
- $item[$fieldName.$suffix] = $value;
3607
- }
3608
-
3609
- }
3610
-
3611
-
3612
-
3613
- return($item);
3614
- }
3615
-
3616
-
3617
- /**
3618
- * modify multisource posts items
3619
- */
3620
- private function getMultisourceItems_posts($arrPosts, $namePosts, $arrValues){
3621
-
3622
- if(empty($arrPosts))
3623
- return(array());
3624
-
3625
- $arrFields = $this->modifyMultisourceItems_getFields($arrValues, $namePosts);
3626
-
3627
- $arrItemParams = $this->addon->getParamsItems();
3628
-
3629
- $arrItemParams = UniteFunctionsUC::arrayToAssoc($arrItemParams,"name");
3630
-
3631
- $arrItems = array();
3632
-
3633
- foreach($arrPosts as $index => $post){
3634
-
3635
- $postData = $this->getPostDataByObj($post);
3636
-
3637
- $item = array();
3638
-
3639
- foreach($arrFields as $fieldKey => $source){
3640
-
3641
- $paramName = str_replace($namePosts."_field_source_", "", $fieldKey);
3642
-
3643
- $param = UniteFunctionsUC::getVal($arrItemParams, $paramName);
3644
-
3645
-
3646
- if($source == "static_value"){
3647
-
3648
- $staticValueKey = $namePosts."_field_value_{$paramName}";
3649
-
3650
- $item[$paramName] = UniteFunctionsUC::getVal($arrValues, $staticValueKey);
3651
- continue;
3652
- }
3653
-
3654
-
3655
- $metaValue = null;
3656
- if($source == "meta_field"){
3657
-
3658
- dmp("get meta field max ");
3659
- dmp("postid: ". $postData["id"]);
3660
-
3661
- //dmp($arrValues);
3662
- //exit();
3663
- }
3664
-
3665
-
3666
- $item = $this->modifyMultisourceItems_getFieldDataFromPost($item, $source, $paramName, $postData, $param, $metaValue);
3667
- }
3668
-
3669
- //add extra fields
3670
-
3671
- $postID = UniteFunctionsUC::getVal($postData, "id");
3672
-
3673
- $item["item_source"] = "post";
3674
- $item["item_postid"] = $postID;
3675
-
3676
- //add extra fields
3677
- $elementorID = UniteFunctionsUC::getRandomString(5);
3678
- $item["item_repeater_class"] = "elementor-repeater-item-".$elementorID;
3679
-
3680
- $arrItems[] = array("item" => $item);
3681
- }
3682
-
3683
-
3684
- return($arrItems);
3685
- }
3686
-
3687
-
3688
  /**
3689
  * get multisource data
3690
  */
3691
  private function getMultisourceSettingsData($value, $name, $processType, $param, $data){
3692
 
3693
- $itemsSource = UniteFunctionsUC::getVal($value, $name."_source");
3694
 
3695
- $response = null;
3696
 
3697
- switch($itemsSource){
3698
- case "items":
3699
-
3700
- $response = "uc_items";
3701
-
3702
- break;
3703
- case "posts":
3704
-
3705
- $paramPosts = $param;
3706
- $namePosts = $name."_posts";
3707
-
3708
- $paramPosts["name"] = $namePosts;
3709
- $paramPosts["name_listing"] = $name;
3710
- $paramPosts["use_for_listing"] = true;
3711
-
3712
- $dataResponse = $this->getPostListData($value, $paramPosts["name"], $processType, $paramPosts, $data);
3713
-
3714
- $arrPosts = UniteFunctionsUC::getVal($dataResponse, $name."_items");
3715
-
3716
- //shoe meta fields
3717
- $isShowMeta = UniteFunctionsUC::getVal($value, $name."_show_metafields");
3718
- $isShowMeta = UniteFunctionsUC::strToBool($isShowMeta);
3719
-
3720
- if($isShowMeta == true)
3721
- HelperUC::$operations->putPostsCustomFieldsDebug($arrPosts);
3722
-
3723
- $response = $this->getMultisourceItems_posts($arrPosts, $namePosts, $value);
3724
-
3725
-
3726
- break;
3727
- default:
3728
- UniteFunctionsUC::throwError("Wrong multisource source: $itemsSource");
3729
- break;
3730
- }
3731
 
3732
- $data[$name] = $response;
3733
-
3734
  return($data);
3735
  }
3736
 
3737
 
 
3738
  protected function z_______________TERMS____________(){}
3739
 
3740
 
@@ -3894,7 +3760,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3894
  /**
3895
  * get terms data
3896
  */
3897
- protected function getWPTermsData($value, $name, $processType, $param){
3898
 
3899
  $postType = UniteFunctionsUC::getVal($value, $name."_posttype","post");
3900
  $taxonomy = UniteFunctionsUC::getVal($value, $name."_taxonomy","category");
@@ -3911,6 +3777,12 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3911
  $showDebug = UniteFunctionsUC::getVal($value, $name."_show_query_debug");
3912
  $showDebug = UniteFunctionsUC::strToBool($showDebug);
3913
 
 
 
 
 
 
 
3914
 
3915
  $queryDebugType = "";
3916
  if($showDebug == true)
@@ -3949,7 +3821,12 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
3949
  $postType = "post";
3950
  $taxonomy = "category";
3951
  }
 
 
 
3952
 
 
 
3953
 
3954
 
3955
 
@@ -4050,6 +3927,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
4050
  if(!empty($arrMetaQuery))
4051
  $args["meta_query"] = $arrMetaQuery;
4052
 
 
4053
  //---------- get the args
4054
 
4055
  $args["hide_empty"] = $isHide;
@@ -4132,10 +4010,13 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
4132
  dmp($args);
4133
  }
4134
 
 
4135
 
4136
  $term_query = new WP_Term_Query();
4137
  $arrTermsObjects = $term_query->query( $args );
4138
 
 
 
4139
  if($showDebug == true && $queryDebugType == "show_query"){
4140
 
4141
  $originalQueryVars = $term_query->query_vars;
@@ -4458,8 +4339,8 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
4458
  /**
4459
  * get processe param data, function with override
4460
  */
4461
- protected function getProcessedParamData($data, $value, $param, $processType){
4462
-
4463
  $type = UniteFunctionsUC::getVal($param, "type");
4464
  $name = UniteFunctionsUC::getVal($param, "name");
4465
 
@@ -4473,7 +4354,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
4473
  break;
4474
  case UniteCreatorDialogParam::PARAM_POST_TERMS:
4475
 
4476
- $data[$name] = $this->getWPTermsData($value, $name, $processType, $param);
4477
 
4478
  break;
4479
  case UniteCreatorDialogParam::PARAM_WOO_CATS:
@@ -4494,6 +4375,7 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
4494
  return($data);
4495
  }
4496
 
 
4497
  /**
4498
  * set extra params value, add it to the param values fields
4499
  * like value_extra = something
@@ -4506,9 +4388,17 @@ class UniteCreatorParamsProcessor extends UniteCreatorParamsProcessorWork{
4506
 
4507
  $isAddSizes = UniteFunctionsUC::getVal($param, "add_image_sizes");
4508
  $isAddSizes = UniteFunctionsUC::strToBool($isAddSizes);
4509
-
4510
- if($isAddSizes == true)
4511
- $param["value_size"] = UniteFunctionsUC::getVal($arrValues, $name."_size");
 
 
 
 
 
 
 
 
4512
 
4513
  break;
4514
  }
12
  const SHOW_DEBUG_QUERY = false;
13
 
14
  private static $arrPostTypeTaxCache = array();
15
+ private $arrCurrentPostIDs = array();
16
+ private $itemsImageSize = null;
17
 
18
 
19
  /**
692
  /**
693
  * get post data
694
  */
695
+ public function getPostDataByObj($post, $arrPostAdditions = array(), $arrImageSizes = null){
696
+
697
  try{
698
 
699
  if(is_numeric($post))
814
  /**
815
  * run custom query
816
  */
817
+ private function getPostListData_getCustomQueryFilters($args, $value, $name, $data, $checkPro = true){
818
 
819
+
820
+ if($checkPro == true){
821
  if(GlobalsUC::$isProVersion == false)
822
  return($args);
823
+ }
824
 
825
  $queryID = UniteFunctionsUC::getVal($value, "{$name}_queryid");
826
  $queryID = trim($queryID);
827
 
828
+
829
  if(empty($queryID))
830
  return($args);
831
 
832
+ $showDebugQuery = UniteFunctionsUC::getVal($value, "{$name}_show_query_debug");
833
+ $showDebugQuery = UniteFunctionsUC::strToBool($showDebugQuery);
834
+
835
+ if($showDebugQuery == true)
836
+ dmp("applying custom args filter: $queryID");
837
 
838
  //pass the widget data
839
  $widgetData = $data;
841
 
842
  $args = apply_filters($queryID, $args, $widgetData);
843
 
844
+ if($showDebugQuery == true){
845
+ dmp("args after custom query");
846
+ dmp($args);
847
+ }
848
 
849
  return($args);
850
  }
1047
  $beforeMeta = date('Ymt');
1048
 
1049
  }else{
1050
+ $year = date("Y");
1051
  $month = date("m");
1052
  }
1053
 
1168
  if(is_array($value) == false)
1169
  return(array());
1170
 
1171
+
1172
  $filters = array();
1173
 
1174
  $showDebugQuery = UniteFunctionsUC::getVal($value, "{$name}_show_query_debug");
1177
  if(self::SHOW_DEBUG_QUERY == true)
1178
  $showDebugQuery = true;
1179
 
1180
+ //show debug by url only for admins
1181
+
1182
+ $showQueryDebugByUrl = UniteFunctionsUC::getGetVar("ucquerydebug","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
1183
+ $showQueryDebugByUrl = UniteFunctionsUC::strToBool($showQueryDebugByUrl);
1184
+
1185
+ if($showQueryDebugByUrl == true && UniteFunctionsWPUC::isCurrentUserHasPermissions())
1186
+ $showDebugQuery = true;
1187
+
1188
+
1189
  $debugType = null;
1190
  if($showDebugQuery == true)
1191
  $debugType = UniteFunctionsUC::getVal($value, "{$name}_query_debug_type");
1192
 
1193
+ if(self::SHOW_DEBUG_QUERY == true)
1194
+ $debugType = "show_query";
1195
+
1196
+
1197
  $source = UniteFunctionsUC::getVal($value, "{$name}_source");
1198
 
1199
  $isForWoo = UniteFunctionsUC::getVal($param, "for_woocommerce_products");
1318
 
1319
  if($limit > 1000)
1320
  $limit = 1000;
1321
+
1322
 
1323
  //------ Exclude ---------
1324
 
1432
 
1433
  switch($includeby){
1434
  case "terms_from_dynamic":
1435
+
1436
+ $strTermIDs = UniteFunctionsUC::getVal($value, $name."_includeby_terms_dynamic_field");
1437
 
1438
  $arrTermIDs = UniteFunctionsUC::getIDsArray($strTermIDs);
1439
 
1525
  // exclude duplicates
1526
  if($isAvoidDuplicates == true && !empty(GlobalsProviderUC::$arrFetchedPostIDs)){
1527
 
1528
+ $arrFetchedIDs = array_keys(GlobalsProviderUC::$arrFetchedPostIDs);
1529
 
1530
  if(empty($arrPostsNotIn))
1531
  $arrPostsNotIn = $arrFetchedIDs;
1883
  $makePostINOrder = true;
1884
  }
1885
 
1886
+
1887
+
1888
  if(!empty($arrIDsFromContent)){
1889
  $arrPostInIDs = $arrIDsFromContent;
1890
  $makePostINOrder = true;
1991
 
1992
 
1993
  $args = $this->getPostListData_getPostGetFilters_pagination($args, $value, $name, $data, $param);
1994
+
1995
  $args = $this->getPostListData_getCustomQueryFilters($args, $value, $name, $data);
1996
 
1997
  //update by post and get filters
2024
 
2025
  $query = new WP_Query($args);
2026
 
2027
+ //custom posts debug
2028
 
2029
  if($showDebugQuery == true && $debugType == "show_query"){
2030
 
2099
  }
2100
 
2101
  //save last query and page
2102
+ $this->saveLastQueryAndPage($query,GlobalsProviderUC::QUERY_TYPE_CUSTOM, $offset);
2103
+
2104
+ $this->arrCurrentPostIDs = array();
2105
 
2106
  //remember duplicate posts
2107
  if($isAvoidDuplicates == true){
2108
+ foreach($arrPosts as $post){
2109
  GlobalsProviderUC::$arrFetchedPostIDs[$post->ID] = true;
2110
+ $this->arrCurrentPostIDs[] = $post->ID;
2111
+ }
2112
  }
2113
 
2114
  HelperUC::addDebug("posts found: ".count($arrPosts));
2161
  /**
2162
  * save last query and page
2163
  */
2164
+ private function saveLastQueryAndPage($query, $type, $initialOffset = null){
2165
 
2166
  GlobalsProviderUC::$lastPostQuery = $query;
2167
  GlobalsProviderUC::$lastPostQuery_page = 1;
2181
 
2182
  $offset = UniteFunctionsUC::getVal($queryVars, "offset");
2183
 
2184
+ if(!empty($initialOffset))
2185
+ $offset = $offset - $initialOffset;
2186
+
2187
  if(empty($offset))
2188
  return(false);
2189
 
2190
+ $arrExcludeBy = UniteFunctionsUC::getVal($value, "_excludeby");
2191
+
2192
  $page = ceil($offset / $perPage)+1;
2193
 
2194
  if(!empty($page))
2305
 
2306
  }
2307
 
2308
+ if(self::SHOW_DEBUG_QUERY == true)
2309
+ $debugType = "show_query";
2310
+
2311
+
2312
  $query = $wp_query;
2313
 
2314
  $objFilters = new UniteCreatorFiltersProcess();
2354
 
2355
  //save last query
2356
  $this->saveLastQueryAndPage($query, GlobalsProviderUC::QUERY_TYPE_CURRENT);
2357
+
2358
  $arrPosts = $query->posts;
2359
 
2360
 
2398
 
2399
  $postIDs = UniteFunctionsUC::getVal($value, $name."_manual_select_post_ids");
2400
 
2401
+ $isAvoidDuplicates = UniteFunctionsUC::getVal($value, $name."_manual_avoid_duplicates");
2402
+ $isAvoidDuplicates = UniteFunctionsUC::strToBool($isAvoidDuplicates);
2403
+
2404
+
2405
  if(empty($postIDs))
2406
  $postIDs = array();
2407
 
2424
 
2425
  $debugType = UniteFunctionsUC::getVal($value, "{$name}_query_debug_type");
2426
 
2427
+ if(self::SHOW_DEBUG_QUERY == true)
2428
+ $debugType = "show_query";
2429
+
2430
 
2431
  if(empty($postIDs)){
2432
 
2457
 
2458
  $query = new WP_Query($args);
2459
 
2460
+
2461
  if($showDebugQuery == true && $debugType == "show_query"){
2462
 
2463
  $originalQueryVars = $query->query_vars;
2485
 
2486
  //save last query
2487
  $this->saveLastQueryAndPage($query,GlobalsProviderUC::QUERY_TYPE_MANUAL);
2488
+
2489
  HelperUC::addDebug("posts found: ".count($arrPosts));
2490
 
2491
  if($showDebugQuery == true){
2492
  dmp("Found Posts: ".count($arrPosts));
2493
  }
2494
 
2495
+ //handle avoid duplicates - save post ids
2496
+
2497
+ $this->arrCurrentPostIDs = array();
2498
+
2499
+ //remember duplicate posts
2500
+ if($isAvoidDuplicates == true){
2501
+ foreach($arrPosts as $post){
2502
+ GlobalsProviderUC::$arrFetchedPostIDs[$post->ID] = true;
2503
+ $this->arrCurrentPostIDs[] = $post->ID;
2504
+ }
2505
+ }
2506
+
2507
+
2508
  return($arrPosts);
2509
 
2510
  }
2512
  /**
2513
  * get post list data
2514
  */
2515
+ public function getPostListData($value, $name, $processType, $param, $data){
2516
 
 
2517
  if($processType != self::PROCESS_TYPE_OUTPUT && $processType != self::PROCESS_TYPE_OUTPUT_BACK)
2518
  return($data);
2519
 
2574
 
2575
  HelperUC::addDebug("post additions", $arrPostAdditions);
2576
 
2577
+
2578
  //image sizes
2579
  $showImageSizes = UniteFunctionsUC::getVal($param, "show_image_sizes");
2580
  $showImageSizes = UniteFunctionsUC::strToBool($showImageSizes);
2582
  $arrImageSizes = null;
2583
 
2584
  if($showImageSizes == true){
2585
+
2586
  $imageSize = UniteFunctionsUC::getVal($value, "{$name}_imagesize","medium_large");
2587
+
2588
  $arrImageSizes["desktop"] = $imageSize;
2589
  }
2590
 
2591
+
2592
  //prepare listing output. no items prepare for the listing
2593
 
2594
  $objFilters = new UniteCreatorFiltersProcess();
2595
 
2596
  if($useForListing == true){
2597
+
2598
  //add filterable variables - dynamic
2599
  $data = $objFilters->addWidgetFilterableVarsFromData($data, $value, $nameListing);
2600
 
2604
 
2605
  //filters additions - regular
2606
 
2607
+ $data = $objFilters->addWidgetFilterableVariables($data, $this->addon, $this->arrCurrentPostIDs);
2608
  }
2609
+
2610
  $arrData = array();
2611
  foreach($arrPosts as $post){
2612
 
2613
  //protection in case that post is id
2614
  if(is_numeric($post))
2615
  $post = get_post($post);
2616
+
2617
  $arrData[] = $this->getPostDataByObj($post, $arrPostAdditions, $arrImageSizes);
2618
  }
2619
 
3585
 
3586
  protected function z_______________MULTISOURCE____________(){}
3587
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3588
  /**
3589
  * get multisource data
3590
  */
3591
  private function getMultisourceSettingsData($value, $name, $processType, $param, $data){
3592
 
3593
+ $objMultisourceProcessor = new UniteCreatetorParamsProcessorMultisource();
3594
 
3595
+ $objMultisourceProcessor->init($this);
3596
 
3597
+ $data = $objMultisourceProcessor->getMultisourceSettingsData($value, $name, $processType, $param, $data);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3598
 
 
 
3599
  return($data);
3600
  }
3601
 
3602
 
3603
+
3604
  protected function z_______________TERMS____________(){}
3605
 
3606
 
3760
  /**
3761
  * get terms data
3762
  */
3763
+ protected function getWPTermsData($value, $name, $processType, $param, $data){
3764
 
3765
  $postType = UniteFunctionsUC::getVal($value, $name."_posttype","post");
3766
  $taxonomy = UniteFunctionsUC::getVal($value, $name."_taxonomy","category");
3777
  $showDebug = UniteFunctionsUC::getVal($value, $name."_show_query_debug");
3778
  $showDebug = UniteFunctionsUC::strToBool($showDebug);
3779
 
3780
+ $showQueryDebugByUrl = UniteFunctionsUC::getGetVar("ucquerydebug","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
3781
+ $showQueryDebugByUrl = UniteFunctionsUC::strToBool($showQueryDebugByUrl);
3782
+
3783
+ if($showQueryDebugByUrl == true && UniteFunctionsWPUC::isCurrentUserHasPermissions())
3784
+ $showDebug = true;
3785
+
3786
 
3787
  $queryDebugType = "";
3788
  if($showDebug == true)
3821
  $postType = "post";
3822
  $taxonomy = "category";
3823
  }
3824
+
3825
+ if(empty($taxonomy))
3826
+ $taxonomy = "category";
3827
 
3828
+ if(is_array($taxonomy) && count($taxonomy) == 1)
3829
+ $taxonomy = $taxonomy[0];
3830
 
3831
 
3832
 
3927
  if(!empty($arrMetaQuery))
3928
  $args["meta_query"] = $arrMetaQuery;
3929
 
3930
+
3931
  //---------- get the args
3932
 
3933
  $args["hide_empty"] = $isHide;
4010
  dmp($args);
4011
  }
4012
 
4013
+ $args = $this->getPostListData_getCustomQueryFilters($args, $value, $name, $data, false);
4014
 
4015
  $term_query = new WP_Term_Query();
4016
  $arrTermsObjects = $term_query->query( $args );
4017
 
4018
+ //term query debug
4019
+
4020
  if($showDebug == true && $queryDebugType == "show_query"){
4021
 
4022
  $originalQueryVars = $term_query->query_vars;
4339
  /**
4340
  * get processe param data, function with override
4341
  */
4342
+ public function getProcessedParamData($data, $value, $param, $processType){
4343
+
4344
  $type = UniteFunctionsUC::getVal($param, "type");
4345
  $name = UniteFunctionsUC::getVal($param, "name");
4346
 
4354
  break;
4355
  case UniteCreatorDialogParam::PARAM_POST_TERMS:
4356
 
4357
+ $data[$name] = $this->getWPTermsData($value, $name, $processType, $param, $data);
4358
 
4359
  break;
4360
  case UniteCreatorDialogParam::PARAM_WOO_CATS:
4375
  return($data);
4376
  }
4377
 
4378
+
4379
  /**
4380
  * set extra params value, add it to the param values fields
4381
  * like value_extra = something
4388
 
4389
  $isAddSizes = UniteFunctionsUC::getVal($param, "add_image_sizes");
4390
  $isAddSizes = UniteFunctionsUC::strToBool($isAddSizes);
4391
+
4392
+ if($isAddSizes == true){
4393
+ $existingSize = UniteFunctionsUC::getVal($param, "value_size");
4394
+
4395
+ $newSize = UniteFunctionsUC::getVal($arrValues, $name."_size");
4396
+
4397
+ if(empty($newSize) && !empty($existingSize))
4398
+ $newSize = $existingSize;
4399
+
4400
+ $param["value_size"] = $newSize;
4401
+ }
4402
 
4403
  break;
4404
  }
provider/provider_params_processor_multisource.class.php ADDED
@@ -0,0 +1,450 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class UniteCreatetorParamsProcessorMultisource{
4
+
5
+ private $objProcessor;
6
+ private $addon;
7
+
8
+
9
+ /**
10
+ *
11
+ * init the class
12
+ */
13
+ public function init($objProcessor){
14
+
15
+ $this->objProcessor = $objProcessor;
16
+ $this->addon = $objProcessor->getAddon();
17
+
18
+ }
19
+
20
+
21
+ /**
22
+ * get multisource data
23
+ */
24
+ public function getMultisourceSettingsData($value, $name, $processType, $param, $data){
25
+
26
+ $itemsSource = UniteFunctionsUC::getVal($value, $name."_source");
27
+
28
+ $response = null;
29
+
30
+ $imageSize = null;
31
+ if($itemsSource != "items")
32
+ $imageSize = $this->objProcessor->getProcessedItemsData_getImageSize($processType);
33
+
34
+ $this->itemsImageSize = $imageSize;
35
+
36
+ switch($itemsSource){
37
+ case "items":
38
+
39
+ $response = "uc_items";
40
+
41
+ break;
42
+ case "posts":
43
+
44
+ //get data from the image size param
45
+
46
+ $paramPosts = $param;
47
+ $namePosts = $name."_posts";
48
+
49
+ $paramPosts["name"] = $namePosts;
50
+ $paramPosts["name_listing"] = $name;
51
+ $paramPosts["use_for_listing"] = true;
52
+
53
+ $dataResponse = $this->objProcessor->getPostListData($value, $paramPosts["name"], $processType, $paramPosts, $data);
54
+
55
+ $arrPosts = UniteFunctionsUC::getVal($dataResponse, $name."_items");
56
+
57
+ //shoe meta fields
58
+ $isShowMeta = UniteFunctionsUC::getVal($value, $name."_show_metafields");
59
+ $isShowMeta = UniteFunctionsUC::strToBool($isShowMeta);
60
+
61
+ if($isShowMeta == true)
62
+ HelperUC::$operations->putPostsCustomFieldsDebug($arrPosts);
63
+
64
+ $response = $this->getMultisourceItems_posts($arrPosts, $namePosts, $value);
65
+
66
+ break;
67
+ case "repeater":
68
+
69
+ $response = $this->getMultisourceItems_currentPostRepeater($name, $value);
70
+
71
+ break;
72
+ default:
73
+ UniteFunctionsUC::throwError("Wrong multisource source: $itemsSource");
74
+ break;
75
+ }
76
+
77
+ $data[$name] = $response;
78
+
79
+ return($data);
80
+ }
81
+
82
+
83
+ /**
84
+ * add item dafault fields
85
+ */
86
+ private function getMultisourceItems_posts__add_default_fields($item, $arrItemParams, $arrUsedParams){
87
+
88
+ foreach($arrItemParams as $param){
89
+
90
+ $paramName = UniteFunctionsUC::getVal($param, "name");
91
+
92
+ if(isset($arrUsedParams[$paramName]))
93
+ continue;
94
+
95
+ $value = UniteFunctionsUC::getVal($param, "default_value");
96
+
97
+ $item[$paramName] = $value;
98
+
99
+ $item = $this->objProcessor->getProcessedParamData($item, $value, $param, UniteCreatorParamsProcessorWork::PROCESS_TYPE_OUTPUT);
100
+
101
+ }
102
+
103
+ return($item);
104
+ }
105
+
106
+
107
+ /**
108
+ * modify multisource posts items
109
+ */
110
+ private function getMultisourceItems_posts($arrPosts, $namePosts, $arrValues){
111
+
112
+ if(empty($arrPosts))
113
+ return(array());
114
+
115
+ $arrFields = $this->modifyMultisourceItems_getFields($arrValues, $namePosts);
116
+
117
+ $arrItemParams = $this->addon->getParamsItems();
118
+
119
+ $arrItemParams = UniteFunctionsUC::arrayToAssoc($arrItemParams,"name");
120
+
121
+ $arrItems = array();
122
+
123
+ $arrImageSizes = null;
124
+ if(!empty($this->itemsImageSize))
125
+ $arrImageSizes = array("desktop"=>$this->itemsImageSize);
126
+
127
+
128
+ foreach($arrPosts as $index => $post){
129
+
130
+ $postData = $this->objProcessor->getPostDataByObj($post, null, $arrImageSizes);
131
+
132
+ $item = array();
133
+
134
+ $arrUsedParams = array();
135
+
136
+ foreach($arrFields as $fieldKey => $source){
137
+
138
+ $paramName = str_replace($namePosts."_field_source_", "", $fieldKey);
139
+
140
+ $param = UniteFunctionsUC::getVal($arrItemParams, $paramName);
141
+
142
+ $item = $this->modifyMultisourceItems_getFieldDataFromPost($item, $source, $paramName, $postData, $param, $namePosts, $arrValues, "post");
143
+
144
+ $arrUsedParams[$paramName] = true;
145
+
146
+ }
147
+
148
+ //add other default fields
149
+
150
+ $item = $this->getMultisourceItems_posts__add_default_fields($item, $arrItemParams);
151
+
152
+ //add extra fields
153
+
154
+ $postID = UniteFunctionsUC::getVal($postData, "id");
155
+
156
+ $item["item_postid"] = $postID;
157
+
158
+ $arrItems = $this->getMultisourceItems_posts__addItem($arrItems, $item, "post");
159
+
160
+ }
161
+
162
+
163
+ return($arrItems);
164
+ }
165
+
166
+ /**
167
+ * get all fields from the values
168
+ */
169
+ private function modifyMultisourceItems_getFields($arrValues, $namePosts){
170
+
171
+ $arrFields = array();
172
+
173
+ foreach($arrValues as $key => $value){
174
+
175
+ $prefix = $namePosts."_field_source_";
176
+
177
+ $pos = strpos($key, $prefix);
178
+
179
+ if($pos === false)
180
+ continue;
181
+
182
+ $arrFields[$key] = $value;
183
+ }
184
+
185
+ return($arrFields);
186
+ }
187
+
188
+
189
+ /**
190
+ * modify param value
191
+ */
192
+ private function modifyMultisourceItems_modifyParamValue($value, $param){
193
+
194
+ $paramType = UniteFunctionsUC::getVal($param, "type");
195
+
196
+ switch($paramType){
197
+ case UniteCreatorDialogParam::PARAM_NUMBER:
198
+ case UniteCreatorDialogParam::PARAM_SLIDER:
199
+
200
+ //protection - set to default if not numeric
201
+ if(is_string($value) && is_numeric($value) == false){
202
+
203
+ if(empty($value))
204
+ $value = 0;
205
+ else
206
+ $value = UniteFunctionsUC::getVal($param, "default_value");
207
+
208
+ }
209
+
210
+ break;
211
+ }
212
+
213
+ return($value);
214
+ }
215
+
216
+
217
+ /**
218
+ * get post data by source, modify item
219
+ */
220
+ private function modifyMultisourceItems_getFieldDataFromPost($item, $source, $fieldName, $postData, $param, $namePosts, $arrValues, $sourceType){
221
+
222
+ //set as default value
223
+
224
+ $defaultValue = UniteFunctionsUC::getVal($param, "default_value");
225
+
226
+ $item[$fieldName] = $defaultValue;
227
+
228
+ if($source == "default")
229
+ return($item);
230
+
231
+ if(empty($postData))
232
+ return($item);
233
+
234
+ if(!is_array($postData))
235
+ return($item);
236
+
237
+
238
+ //process meta field
239
+
240
+ $isProcessReturn = false;
241
+
242
+ if($source == "meta_field"){
243
+
244
+ $metaField = $namePosts."_field_meta_{$fieldName}";
245
+
246
+ $metaKey = UniteFunctionsUC::getVal($arrValues, $metaField);
247
+
248
+ $postID = UniteFunctionsUC::getVal($postData, "id");
249
+
250
+ $value = $defaultValue;
251
+
252
+ if(!empty($metaKey)){
253
+
254
+ $value = UniteFunctionsWPUC::getPostCustomField($postID, $metaKey);
255
+
256
+ }
257
+
258
+ $isProcessReturn = true;
259
+ }
260
+
261
+ if($source == "static_value"){
262
+
263
+ $staticValueKey = $namePosts."_field_value_{$fieldName}";
264
+
265
+ $value = UniteFunctionsUC::getVal($arrValues, $staticValueKey);
266
+
267
+ $isProcessReturn = true;
268
+ }
269
+
270
+
271
+ //return the static value or meta field
272
+
273
+ if($isProcessReturn == true){
274
+
275
+ $value = $this->modifyMultisourceItems_modifyParamValue($value, $param);
276
+
277
+ $item[$fieldName] = $value;
278
+
279
+ //modify the image size
280
+
281
+ $type = UniteFunctionsUC::getVal($param, "type");
282
+
283
+ if($type == UniteCreatorDialogParam::PARAM_IMAGE && !empty($this->itemsImageSize)){
284
+ $param["add_image_sizes"] = true;
285
+ $param["value_size"] = $this->itemsImageSize;
286
+
287
+ }
288
+
289
+ $item = $this->objProcessor->getProcessedParamData($item, $value, $param, UniteCreatorParamsProcessorWork::PROCESS_TYPE_OUTPUT);
290
+
291
+ return($item);
292
+ }
293
+
294
+ //get the source name for field
295
+ if($source == "field")
296
+ $source = UniteFunctionsUC::getVal($arrValues, $namePosts."_field_name_".$fieldName);
297
+
298
+
299
+ //post values source
300
+
301
+ foreach($postData as $name => $value){
302
+
303
+ //if equal - just copy the data
304
+
305
+ if($name === $source){
306
+
307
+ $value = $this->modifyMultisourceItems_modifyParamValue($value, $param);
308
+
309
+ $item[$fieldName] = $value;
310
+
311
+ $item = $this->objProcessor->getProcessedParamData($item, $value, $param, UniteCreatorParamsProcessorWork::PROCESS_TYPE_OUTPUT);
312
+
313
+ continue;
314
+ }
315
+
316
+ //get children fields values
317
+
318
+ if(strpos($name, $source."_") === 0){
319
+
320
+ $suffix = substr($name, strlen($source));
321
+
322
+ $item[$fieldName.$suffix] = $value;
323
+ }
324
+
325
+ }
326
+
327
+
328
+
329
+ return($item);
330
+ }
331
+
332
+ /**
333
+ * add the item to items list
334
+ */
335
+ private function getMultisourceItems_posts__addItem($arrItems, $item, $type){
336
+
337
+ //add extra fields
338
+
339
+ $item["item_source"] = $type;
340
+
341
+ //add extra fields
342
+ $elementorID = UniteFunctionsUC::getRandomString(5);
343
+ $item["item_repeater_class"] = "elementor-repeater-item-".$elementorID;
344
+
345
+ $arrItems[] = array("item" => $item);
346
+
347
+ return($arrItems);
348
+ }
349
+
350
+
351
+ /**
352
+ * get data from current post data repeater
353
+ */
354
+ private function getMultisourceItems_currentPostRepeater($name, $arrValues){
355
+
356
+ //debug meta
357
+
358
+ $isShowMeta = UniteFunctionsUC::getVal($arrValues, $name."_show_current_meta");
359
+ $isShowMeta = UniteFunctionsUC::strToBool($isShowMeta);
360
+
361
+ $post = get_post();
362
+
363
+ if(empty($post))
364
+ return(false);
365
+
366
+ $postID = $post->ID;
367
+
368
+ if($isShowMeta == true){
369
+ HelperUC::$operations->putPostCustomFieldsDebug($postID, true);
370
+ }
371
+
372
+ $nameParamRepeater = $name."_repeater";
373
+
374
+
375
+
376
+ $repeaterName = UniteFunctionsUC::getVal($arrValues, $name."_repeater_name");
377
+
378
+ if(empty($repeaterName)){
379
+
380
+ dmp("items from repeater: please enter repeater name");
381
+ return(array());
382
+ }
383
+
384
+ //get the data from repeater
385
+
386
+ $arrCustomFields = UniteFunctionsWPUC::getPostCustomFields($postID, false);
387
+
388
+ $arrRepeaterItems = UniteFunctionsUC::getVal($arrCustomFields, $repeaterName);
389
+
390
+ if(empty($arrRepeaterItems)){
391
+
392
+ $previewID = UniteFunctionsUC::getGetVar("preview_id","",UniteFunctionsUC::SANITIZE_TEXT_FIELD);
393
+
394
+ if(!empty($previewID)){
395
+ dmp("preview data from repeater: you are under elementor preview, the output may be wrong. Please open the post without the preview");
396
+ }
397
+
398
+ return(array());
399
+ }
400
+
401
+ if(is_array($arrRepeaterItems) == false)
402
+ return(array());
403
+
404
+
405
+ //output the items
406
+
407
+ $arrItems = array();
408
+
409
+ $arrFields = $this->modifyMultisourceItems_getFields($arrValues, $nameParamRepeater);
410
+
411
+ $arrItemParams = $this->addon->getParamsItems();
412
+ $arrItemParams = UniteFunctionsUC::arrayToAssoc($arrItemParams,"name");
413
+
414
+ foreach($arrRepeaterItems as $index => $repaterItem){
415
+
416
+ $item = array();
417
+
418
+ $arrUsedParams = array();
419
+
420
+
421
+ foreach($arrFields as $fieldKey => $source){
422
+
423
+ $paramName = str_replace($nameParamRepeater."_field_source_", "", $fieldKey);
424
+
425
+ $param = UniteFunctionsUC::getVal($arrItemParams, $paramName);
426
+
427
+ $item = $this->modifyMultisourceItems_getFieldDataFromPost($item, $source, $paramName, $repaterItem, $param, $nameParamRepeater, $arrValues,"repeater");
428
+
429
+ $arrUsedParams[$paramName] = true;
430
+
431
+ }
432
+
433
+ $item = $this->getMultisourceItems_posts__add_default_fields($item, $arrItemParams, $arrUsedParams);
434
+
435
+
436
+ //add the item to items array
437
+
438
+ $arrItems = $this->getMultisourceItems_posts__addItem($arrItems, $item, "repeater");
439
+
440
+
441
+ }
442
+
443
+
444
+ return($arrItems);
445
+
446
+ }
447
+
448
+
449
+
450
+ }
provider/provider_settings.class.php CHANGED
@@ -669,6 +669,16 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
669
 
670
  $this->addRadioBoolean($name."_show_query_debug", __("Show Query Debug", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
671
 
 
 
 
 
 
 
 
 
 
 
672
  //--------- debug type terms ---------
673
 
674
  $params = array();
@@ -1529,34 +1539,34 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1529
  $this->addTextBox($name."_includeby_postmeta_metafield", "", esc_html__("Meta Field Name", "unlimited-elements-for-elementor"), $params);
1530
 
1531
 
1532
- //----- include terms from dynamic field by ids -------
1533
 
1534
  $arrConditionIncludeDynamic = $arrConditionIncludeBy;
1535
- $arrConditionIncludeDynamic[$name."_includeby"] = "terms_from_dynamic";
1536
 
1537
  $params = array();
1538
  $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1539
- $params["description"] = __("Enter term id's like 12,434,1289, or select from dynamic tag. You can use the term relation and include children options from below","unlimited-elements-for-elementor");
1540
  $params["elementor_condition"] = $arrConditionIncludeDynamic;
1541
  $params["label_block"] = true;
1542
  $params["add_dynamic"] = true;
1543
 
1544
- $this->addTextBox($name."_includeby_dynamic_field","",__("Include by Terms from Dynamic Field","unlimited-elements-for-elementor"), $params);
1545
-
1546
 
1547
- //----- include id's from dynamic field -------
1548
 
1549
  $arrConditionIncludeDynamic = $arrConditionIncludeBy;
1550
- $arrConditionIncludeDynamic[$name."_includeby"] = "ids_from_dynamic";
1551
 
1552
  $params = array();
1553
  $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1554
- $params["description"] = __("Enter post id's like 45,65,76, or select from dynamic tag","unlimited-elements-for-elementor");
1555
  $params["elementor_condition"] = $arrConditionIncludeDynamic;
1556
  $params["label_block"] = true;
1557
  $params["add_dynamic"] = true;
1558
 
1559
- $this->addTextBox($name."_includeby_terms_dynamic_field","",__("Include Posts by Dynamic Field","unlimited-elements-for-elementor"), $params);
1560
 
1561
 
1562
  // --------- include by most viewed -------------
@@ -1692,6 +1702,24 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1692
  $params["description"] = "Optional. Select some dynamic field, that has output of post ids (string or array) like 15,40,23";
1693
 
1694
  $this->addTextBox($name."_manual_post_ids_dynamic", "", __("Or Select Post IDs by Dynamic Field", "unlimited-elements-for-elementor"), $params);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1695
 
1696
 
1697
  // --------- add hr before exclude -------------
@@ -1754,6 +1782,7 @@ class UniteCreatorSettings extends UniteCreatorSettingsWork{
1754
  $this->addTextBox($name."_exclude_dynamic_field","",__("Exclude Posts by Dynamic Field","unlimited-elements-for-elementor"), $params);
1755
 
1756
 
 
1757
  //------- Already Fetched --------
1758
 
1759
  $conditionExcludeByFetched = $conditionExcludeBy;
669
 
670
  $this->addRadioBoolean($name."_show_query_debug", __("Show Query Debug", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
671
 
672
+ //---- query id -----
673
+
674
+ $params = array();
675
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
676
+ $title = __("Query ID", "unlimited-elements-for-elementor");
677
+ $params["description"] = __("Give your Query unique ID to been able to filter it in server side using add_filter() function. <a href='https://unlimited-elements.com/docs/work-with-query-id-in-terms-selection/'><a target='blank' href='https://unlimited-elements.com/docs/work-with-query-id-in-posts-selection/'>See docs here</a></a>.","unlimited-elements-for-elementor");
678
+
679
+ $this->addTextBox($name."_queryid", "", $title, $params);
680
+
681
+
682
  //--------- debug type terms ---------
683
 
684
  $params = array();
1539
  $this->addTextBox($name."_includeby_postmeta_metafield", "", esc_html__("Meta Field Name", "unlimited-elements-for-elementor"), $params);
1540
 
1541
 
1542
+ //----- include id's from dynamic field -------
1543
 
1544
  $arrConditionIncludeDynamic = $arrConditionIncludeBy;
1545
+ $arrConditionIncludeDynamic[$name."_includeby"] = "ids_from_dynamic";
1546
 
1547
  $params = array();
1548
  $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1549
+ $params["description"] = __("Enter post id's like 45,65,76, or select from dynamic tag","unlimited-elements-for-elementor");
1550
  $params["elementor_condition"] = $arrConditionIncludeDynamic;
1551
  $params["label_block"] = true;
1552
  $params["add_dynamic"] = true;
1553
 
1554
+ $this->addTextBox($name."_includeby_dynamic_field","",__("Include Posts by Dynamic Field","unlimited-elements-for-elementor"), $params);
1555
+
1556
 
1557
+ //----- include terms from dynamic field by ids -------
1558
 
1559
  $arrConditionIncludeDynamic = $arrConditionIncludeBy;
1560
+ $arrConditionIncludeDynamic[$name."_includeby"] = "terms_from_dynamic";
1561
 
1562
  $params = array();
1563
  $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
1564
+ $params["description"] = __("Enter term id's like 12,434,1289, or select from dynamic tag. You can use the term relation and include children options from below","unlimited-elements-for-elementor");
1565
  $params["elementor_condition"] = $arrConditionIncludeDynamic;
1566
  $params["label_block"] = true;
1567
  $params["add_dynamic"] = true;
1568
 
1569
+ $this->addTextBox($name."_includeby_terms_dynamic_field","",__("Include by Terms from Dynamic Field","unlimited-elements-for-elementor"), $params);
1570
 
1571
 
1572
  // --------- include by most viewed -------------
1702
  $params["description"] = "Optional. Select some dynamic field, that has output of post ids (string or array) like 15,40,23";
1703
 
1704
  $this->addTextBox($name."_manual_post_ids_dynamic", "", __("Or Select Post IDs by Dynamic Field", "unlimited-elements-for-elementor"), $params);
1705
+
1706
+ // --------- add hr before avoid duplicates -------------
1707
+
1708
+ $params = array();
1709
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_HR;
1710
+ $params["elementor_condition"] = $arrManualElementorCondition;
1711
+
1712
+ $this->addHr($name."_before_avoid_duplicates_manual",$params);
1713
+
1714
+
1715
+ //----- avoid duplicates -------
1716
+
1717
+ $params = array();
1718
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
1719
+ $params["description"] = __("If turned on, those posts in another widgets won't be shown", "unlimited-elements-for-elementor");
1720
+ $params["elementor_condition"] = $arrManualElementorCondition;
1721
+
1722
+ $this->addRadioBoolean($name."_manual_avoid_duplicates", __("Avoid Duplicates", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
1723
 
1724
 
1725
  // --------- add hr before exclude -------------
1782
  $this->addTextBox($name."_exclude_dynamic_field","",__("Exclude Posts by Dynamic Field","unlimited-elements-for-elementor"), $params);
1783
 
1784
 
1785
+
1786
  //------- Already Fetched --------
1787
 
1788
  $conditionExcludeByFetched = $conditionExcludeBy;
provider/provider_settings_multisource.class.php CHANGED
@@ -57,6 +57,14 @@ class UniteCreatorSettingsMultisource{
57
 
58
  UniteFunctionsUC::validateNotEmpty($this->settings, "settings object");
59
 
 
 
 
 
 
 
 
 
60
 
61
  //------ items source ------
62
 
@@ -65,6 +73,17 @@ class UniteCreatorSettingsMultisource{
65
  $arrSource["items"] = __("Items", "unlimited-elements-for-elementor");
66
  $arrSource["posts"] = __("Posts", "unlimited-elements-for-elementor");
67
 
 
 
 
 
 
 
 
 
 
 
 
68
  /*
69
  $isWooActive = UniteCreatorWooIntegrate::isWooActive();
70
  if($isWooActive == true)
@@ -73,10 +92,7 @@ class UniteCreatorSettingsMultisource{
73
  $arrSource["terms"] = __("Terms", "unlimited-elements-for-elementor");
74
 
75
  $isAcfExists = UniteCreatorAcfIntegrate::isAcfActive();
76
-
77
- if($isAcfExists == true)
78
- $arrSource["acf_repeater"] = __("ACF Repeater", "unlimited-elements-for-elementor");
79
-
80
  $hasInstagram = HelperProviderCoreUC_EL::isInstagramSetUp();
81
 
82
  if($hasInstagram)
@@ -91,26 +107,58 @@ class UniteCreatorSettingsMultisource{
91
 
92
  $this->settings->addSelect($name."_source", $arrSource, __("Items Source", "unlimited-elements-for-elementor"), "items", $params);
93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
- $this->addMultisourceConnectors_posts($name);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
 
97
  }
98
 
 
99
  /**
100
  * add multisource connectors
101
  */
102
- private function addMultisourceConnectors_posts($name){
103
 
104
- if(empty($this->objAddon))
105
- return(false);
106
-
107
- $hasItems = $this->objAddon->isHasItems();
108
-
109
- if($hasItems == false)
110
- return(false);
111
 
112
  $paramsItems = $this->objAddon->getParamsItems();
113
 
 
 
114
  if(empty($paramsItems))
115
  return(false);
116
 
@@ -145,16 +193,69 @@ class UniteCreatorSettingsMultisource{
145
 
146
  $params = array();
147
  $params["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
148
- $params["description"] = __("Show the current post meta fields, turn off it after choose the right one", "unlimited-elements-for-elementor");
149
  $params["elementor_condition"] = $condition;
150
 
151
  $this->settings->addRadioBoolean($name."_show_metafields", __("Debug - Show Meta Fields", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
 
154
 
155
  }
156
 
157
 
 
158
  /**
159
  * get post param connector
160
  */
@@ -171,7 +272,7 @@ class UniteCreatorSettingsMultisource{
171
  return(false);
172
 
173
  //-------------- select param ----------------
174
-
175
  $params = array();
176
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
177
  $params["elementor_condition"] = $condition;
@@ -213,6 +314,72 @@ class UniteCreatorSettingsMultisource{
213
 
214
  }
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
 
217
 
218
  }
57
 
58
  UniteFunctionsUC::validateNotEmpty($this->settings, "settings object");
59
 
60
+ $includedAttributes = UniteFunctionsUC::getVal($param, "multisource_included_attributes");
61
+
62
+ $includedAttributes = trim($includedAttributes);
63
+
64
+ $arrIncludedAttributes = explode(",", $includedAttributes);
65
+
66
+ $arrIncludedAttributes = UniteFunctionsUC::arrayToAssoc($arrIncludedAttributes);
67
+
68
 
69
  //------ items source ------
70
 
73
  $arrSource["items"] = __("Items", "unlimited-elements-for-elementor");
74
  $arrSource["posts"] = __("Posts", "unlimited-elements-for-elementor");
75
 
76
+ $metaRepeaterTitle = __("Current Post Meta Repeater", "unlimited-elements-for-elementor");
77
+
78
+ $isAcfExists = UniteCreatorAcfIntegrate::isAcfActive();
79
+
80
+ if($isAcfExists == true)
81
+ $metaRepeaterTitle = __("Current Post ACF Repeater", "unlimited-elements-for-elementor");
82
+
83
+ $arrSource["repeater"] = $metaRepeaterTitle;
84
+
85
+
86
+
87
  /*
88
  $isWooActive = UniteCreatorWooIntegrate::isWooActive();
89
  if($isWooActive == true)
92
  $arrSource["terms"] = __("Terms", "unlimited-elements-for-elementor");
93
 
94
  $isAcfExists = UniteCreatorAcfIntegrate::isAcfActive();
95
+
 
 
 
96
  $hasInstagram = HelperProviderCoreUC_EL::isInstagramSetUp();
97
 
98
  if($hasInstagram)
107
 
108
  $this->settings->addSelect($name."_source", $arrSource, __("Items Source", "unlimited-elements-for-elementor"), "items", $params);
109
 
110
+ if(empty($this->objAddon))
111
+ return(false);
112
+
113
+ $hasItems = $this->objAddon->isHasItems();
114
+
115
+ if($hasItems == false)
116
+ return(false);
117
+
118
+
119
+ $this->addMultisourceConnectors_posts($name, $arrIncludedAttributes);
120
+
121
+ $this->addMultisourceConnectors_repeater($name, $arrIncludedAttributes);
122
+
123
+ }
124
+
125
+ /**
126
+ * filter params by included attributes array
127
+ */
128
+ private function filterParamItemsByIncludedAttributes($params, $arrIncludedAttributes){
129
 
130
+ if(empty($params))
131
+ return($params);
132
+
133
+ if(empty($arrIncludedAttributes))
134
+ return($params);
135
+
136
+ $arrParamsNew = array();
137
+
138
+ foreach($params as $param){
139
+
140
+ $name = UniteFunctionsUC::getVal($param, "name");
141
+
142
+ if(isset($arrIncludedAttributes[$name]) == false)
143
+ continue;
144
+
145
+ $arrParamsNew[] = $param;
146
+ }
147
 
148
+ return($arrParamsNew);
149
  }
150
 
151
+
152
  /**
153
  * add multisource connectors
154
  */
155
+ private function addMultisourceConnectors_posts($name, $arrIncludedAttributes){
156
 
 
 
 
 
 
 
 
157
 
158
  $paramsItems = $this->objAddon->getParamsItems();
159
 
160
+ $paramsItems = $this->filterParamItemsByIncludedAttributes($paramsItems, $arrIncludedAttributes);
161
+
162
  if(empty($paramsItems))
163
  return(false);
164
 
193
 
194
  $params = array();
195
  $params["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
196
+ $params["description"] = __("Show the posts meta fields, turn off it after choose the right one", "unlimited-elements-for-elementor");
197
  $params["elementor_condition"] = $condition;
198
 
199
  $this->settings->addRadioBoolean($name."_show_metafields", __("Debug - Show Meta Fields", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
200
 
201
+ }
202
+
203
+
204
+ /**
205
+ * add multisource connectors
206
+ */
207
+ private function addMultisourceConnectors_repeater($name, $arrIncludedAttributes){
208
+
209
+ $paramsItems = $this->objAddon->getParamsItems();
210
+
211
+ $paramsItems = $this->filterParamItemsByIncludedAttributes($paramsItems, $arrIncludedAttributes);
212
+
213
+ if(empty($paramsItems))
214
+ return(false);
215
+
216
+ $condition = array($name."_source"=>"repeater");
217
+
218
+ //-------------- repeater meta name ----------------
219
+
220
+ $params = array();
221
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
222
+ $params["elementor_condition"] = $condition;
223
+ $params["description"] = __("Choose the current post repeater field name, you can choose the show current post meta to see the meta fields", "unlimited-elements-for-elementor");;
224
+
225
+ $text = __("Repeater Field Name", "unlimited-elements-for-elementor");
226
+
227
+ $this->settings->addTextBox($name."_repeater_name", "", $text, $params);
228
+
229
+ // --- items source select
230
+
231
+ foreach($paramsItems as $itemParam){
232
+
233
+ $this->putParamConnector_repeater($name, $itemParam, $condition);
234
+ }
235
+
236
+ //--------- h3 before meta ----------
237
+
238
+ $params = array();
239
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_HR;
240
+ $params["elementor_condition"] = $condition;
241
+
242
+ $this->settings->addHr($name."_hr_before_debug_current_meta",$params);
243
+
244
+
245
+ //--------- debug meta ----------
246
+
247
+ $params = array();
248
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
249
+ $params["description"] = __("Show the current post meta fields, turn off it after choose the right one", "unlimited-elements-for-elementor");
250
+ $params["elementor_condition"] = $condition;
251
+
252
+ $this->settings->addRadioBoolean($name."_show_current_meta", __("Debug - Show Meta Fields", "unlimited-elements-for-elementor"), false, "Yes", "No", $params);
253
 
254
 
255
  }
256
 
257
 
258
+
259
  /**
260
  * get post param connector
261
  */
272
  return(false);
273
 
274
  //-------------- select param ----------------
275
+
276
  $params = array();
277
  $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
278
  $params["elementor_condition"] = $condition;
314
 
315
  }
316
 
317
+ /**
318
+ * get post param connector
319
+ */
320
+ private function putParamConnector_repeater($fieldName, $param, $condition){
321
+
322
+ $title = UniteFunctionsUC::getVal($param, "title");
323
+
324
+ if(empty($title))
325
+ return(false);
326
+
327
+ $name = UniteFunctionsUC::getVal($param, "name");
328
+
329
+ if(empty($name))
330
+ return(false);
331
+
332
+ //-------------- select type ----------------
333
+
334
+ $arrOptions = array(
335
+ "default"=>__("-- Item Default --","unlimited-elements-for-elementor"),
336
+ "static_value"=>__("-- Static Value --","unlimited-elements-for-elementor"),
337
+ "field"=>__("Repeater Field","unlimited-elements-for-elementor")
338
+ );
339
+
340
+ $arrOptions = array_flip($arrOptions);
341
+
342
+ $params = array();
343
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_DROPDOWN;
344
+ $params["elementor_condition"] = $condition;
345
+
346
+ $text = $title. " ".__("Source", "unlimited-elements-for-elementor");
347
+
348
+ $selectName = $fieldName."_repeater_field_source_$name";
349
+
350
+ $this->settings->addSelect($selectName, $arrOptions, $text, "default", $params);
351
+
352
+
353
+ //-------------- repeater field ----------------
354
+
355
+ $conditionRepeaterField = $condition;
356
+ $conditionRepeaterField[$selectName] = "field";
357
+
358
+ $params = array();
359
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
360
+ $params["elementor_condition"] = $conditionRepeaterField;
361
+
362
+ $text = $title. " ".__("Repeater Field", "unlimited-elements-for-elementor");
363
+
364
+ $this->settings->addTextBox($fieldName."_repeater_field_name_{$name}", "", $text, $params);
365
+
366
+ //-------------- static value ----------------
367
+
368
+ $conditionRepeaterField = $condition;
369
+ $conditionStaticValue[$selectName] = "static_value";
370
+
371
+ $params = array();
372
+ $params["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
373
+ $params["elementor_condition"] = $conditionStaticValue;
374
+ $params["label_block"] = true;
375
+
376
+ $text = $title. " ".__("Static Value", "unlimited-elements-for-elementor");
377
+
378
+ $this->settings->addTextBox($fieldName."_repeater_field_value_{$name}", "", $text, $params);
379
+
380
+
381
+ }
382
+
383
 
384
 
385
  }
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;
@@ -436,6 +436,35 @@ class UniteCreatorWooIntegrate{
436
  return($arrOutput);
437
  }
438
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
 
440
  /**
441
  * get product attribute names
@@ -461,6 +490,51 @@ class UniteCreatorWooIntegrate{
461
  return($arrOutput);
462
  }
463
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
464
 
465
  /**
466
  * get variations array
@@ -683,7 +757,7 @@ class UniteCreatorWooIntegrate{
683
  //put add to cart link
684
  $arrProduct = $this->addAddToCartData($arrProduct, $productID, $productSku);
685
 
686
-
687
  return($arrProduct);
688
  }
689
 
14
 
15
  const POST_TYPE_PRODUCT = "product";
16
  const PRODUCT_TYPE_VARIABLE = "variable";
17
+
18
  private $currency;
19
  private $currencySymbol;
20
  private $urlCheckout;
436
  return($arrOutput);
437
  }
438
 
439
+ /**
440
+ * combine by name
441
+ */
442
+ private function combineAttributesByName($arrAttributes){
443
+
444
+ if(empty($arrAttributes))
445
+ return($arrAttributes);
446
+
447
+ $arrCombined = array();
448
+
449
+ foreach($arrAttributes as $name=>$arr){
450
+
451
+ $name = UniteFunctionsUC::getVal($arr, "attr");
452
+ $value = UniteFunctionsUC::getVal($arr, "title");
453
+
454
+ $arrAttribute = UniteFunctionsUC::getVal($arrCombined, $name);
455
+
456
+ if(empty($arrAttribute))
457
+ $arrAttribute = array();
458
+
459
+ $arrAttribute[] = $value;
460
+
461
+ $arrCombined[$name] = $arrAttribute;
462
+ }
463
+
464
+ return($arrCombined);
465
+ }
466
+
467
+
468
 
469
  /**
470
  * get product attribute names
490
  return($arrOutput);
491
  }
492
 
493
+ /**
494
+ * convert combined attributes array to text
495
+ */
496
+ private function convertCombinedAttributesToText($arrCombined, $sap = ":", $sapValues = ","){
497
+
498
+ $arrText = array();
499
+
500
+ foreach($arrCombined as $name=>$arrValues){
501
+
502
+ $strValues = implode($sapValues, $arrValues);
503
+
504
+ $text = "{$name}{$sap} $strValues";
505
+
506
+ $arrText[] = $text;
507
+ }
508
+
509
+ return($arrText);
510
+ }
511
+
512
+
513
+ /**
514
+ * get product attributes
515
+ */
516
+ public function getProductAttributes($productID){
517
+
518
+ if(function_exists("wc_get_product") == false)
519
+ return(array());
520
+
521
+ $product = wc_get_product($productID);
522
+
523
+ if(empty($product))
524
+ return(array());
525
+
526
+ $arrAttributeTitles = $this->getProductAttributeNames($product);
527
+
528
+ $arrCombined = $this->combineAttributesByName($arrAttributeTitles);
529
+
530
+ if(empty($arrCombined))
531
+ return($arrCombined);
532
+
533
+ $arrText = $this->convertCombinedAttributesToText($arrCombined);
534
+
535
+ return($arrText);
536
+ }
537
+
538
 
539
  /**
540
  * get variations array
757
  //put add to cart link
758
  $arrProduct = $this->addAddToCartData($arrProduct, $productID, $productSku);
759
 
760
+
761
  return($arrProduct);
762
  }
763
 
readme.txt CHANGED
@@ -1230,6 +1230,46 @@ Note : This plugin works with Elementor. Make sure you have [Elementor](https://
1230
 
1231
  == Changelog ==
1232
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1233
  version 1.5.31: 2022-09-20
1234
 
1235
  * Fix: fixed thumbs gallery
1230
 
1231
  == Changelog ==
1232
 
1233
+
1234
+ version 1.5.35: 2022-15-24
1235
+
1236
+ -Fix: fixed include by id's from dynamic field, and terms from dynamic field in post selection
1237
+
1238
+
1239
+ version 1.5.34: 2022-15-19
1240
+
1241
+ * Feature: added items image size attribute (special type)
1242
+ * Fix: fixed show backgrounds in elementor editor
1243
+
1244
+
1245
+ version 1.5.33: 2022-15-11
1246
+
1247
+ * Fix: fixed avoid duplicates with filters
1248
+ * Fix: fixed select dropdown filter js
1249
+ * Feature: added avoid duplicates option to manual posts selection
1250
+
1251
+
1252
+
1253
+ version 1.5.32: 2022-10-11
1254
+
1255
+ * Fix: fixed some ajax pagination issues
1256
+ * Fix: fixed pagination widget appearance on archive ajax pages with filters
1257
+ * Fix: added twig functionality to put product attributes text
1258
+ * Fix: fixed export with images not worked in some cases
1259
+ * Fix: made some protection with ezcache plugin integration and filtering
1260
+ * Fix: fixed some small php bug with this month post selection
1261
+ * Fix: fixed some visible and hidden filters collision
1262
+ * Fix: fixed terms select in terms filter on history back click in filters
1263
+ * Fix: set child filter always first unselected
1264
+ * Fix: set option for the tabs filter to be unselected
1265
+ * Fix: fixed the pagination numbers if exclude offset chosen
1266
+
1267
+ * Feature: added multiple taxonomy terms in term selection
1268
+ * Feature: added query id in terms selection
1269
+ * Feature: added functionality for next / prev post
1270
+
1271
+
1272
+
1273
  version 1.5.31: 2022-09-20
1274
 
1275
  * Fix: fixed thumbs gallery
release_log.txt CHANGED
@@ -1,5 +1,42 @@
1
 
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  version 1.5.31:
4
 
5
  -bug fix: fixed thumbs gallery
1
 
2
 
3
+ version 1.5.35:
4
+
5
+ -bug fix: fixed include by id's from dynamic field, and terms from dynamic field in post selection
6
+
7
+
8
+ version 1.5.34:
9
+
10
+ -feature: added items image size attribute (special type)
11
+ -bug fix: fixed show backgrounds in elementor editor
12
+
13
+
14
+
15
+ version 1.5.33:
16
+
17
+ -bug fix: fixed avoid duplicates with filters
18
+ -feature: added avoid duplicates option to manual posts selection
19
+ -bug fix: fixed select dropdown filter js
20
+
21
+
22
+ version 1.5.32:
23
+
24
+ -bug fix: fixed some ajax pagination issues
25
+ -bug fix: fixed pagination widget appearance on archive ajax pages with filters
26
+ -feature: added twig functionality to put product attributes text
27
+ -bug fix: fixed export with images not worked in some cases
28
+ -bug fix: made some protection with ezcache plugin integration and filtering
29
+ -bug fix: fixed some small php bug with this month post selection
30
+ -bug fix: fixed some visible and hidden filters collision
31
+ -feature: added multiple taxonomy terms in term selection
32
+ -feature: added query id in terms selection
33
+ -bug fix: fixed terms select in terms filter on history back click in filters
34
+ -bug fix: set child filter always first unselected
35
+ -bug fix: set option for the tabs filter to be unselected
36
+ -bug fix: fixed the pagination numbers if exclude offset chosen
37
+
38
+
39
+
40
  version 1.5.31:
41
 
42
  -bug fix: fixed thumbs gallery
unlimited_elements.php CHANGED
@@ -4,14 +4,14 @@
4
  * Plugin URI: http://unlimited-elements.com
5
  * Description: Unlimited Elements - Huge Widgets Pack for Elementor Website Builder, with html/css/js widget creator and editor
6
  * Author: Unlimited Elements
7
- * Version: 1.5.31
8
  * Author URI: http://unlimited-elements.com
9
  * Text Domain: unlimited-elements-for-elementor
10
  * Domain Path: /languages
11
  *
12
  * Tested up to: 6.0
13
- * Elementor tested up to: 3.7.1
14
- * Elementor Pro tested up to: 3.7.3
15
  */
16
 
17
  if(!defined("UNLIMITED_ELEMENTS_INC"))
4
  * Plugin URI: http://unlimited-elements.com
5
  * Description: Unlimited Elements - Huge Widgets Pack for Elementor Website Builder, with html/css/js widget creator and editor
6
  * Author: Unlimited Elements
7
+ * Version: 1.5.34
8
  * Author URI: http://unlimited-elements.com
9
  * Text Domain: unlimited-elements-for-elementor
10
  * Domain Path: /languages
11
  *
12
  * Tested up to: 6.0
13
+ * Elementor tested up to: 3.7.8
14
+ * Elementor Pro tested up to: 3.7.7
15
  */
16
 
17
  if(!defined("UNLIMITED_ELEMENTS_INC"))
vendor/twig/twig/src/Loader/ArrayLoader.php CHANGED
@@ -100,3 +100,5 @@ class ArrayLoader implements LoaderInterface, ExistsLoaderInterface, SourceConte
100
  }
101
 
102
  class_alias('Twig\Loader\ArrayLoader', 'Twig_Loader_Array');
 
 
100
  }
101
 
102
  class_alias('Twig\Loader\ArrayLoader', 'Twig_Loader_Array');
103
+
104
+
views/objects/addon_view_childparams.class.php CHANGED
@@ -424,6 +424,27 @@ class UniteCreatorAddonViewChildParams{
424
 
425
  {{printVar(user)}}
426
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
427
  {% endif %}
428
  ";
429
 
@@ -443,11 +464,13 @@ class UniteCreatorAddonViewChildParams{
443
 
444
 
445
 
 
446
  //----- output ------
447
 
448
  return($arrParams);
449
  }
450
 
 
451
 
452
  /**
453
  * get post child params
@@ -1063,6 +1086,24 @@ console.log(arrItems);
1063
  return($arrParam);
1064
  }
1065
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1066
 
1067
  /**
1068
  * check and add woo post params
@@ -1081,6 +1122,7 @@ console.log(arrItems);
1081
 
1082
  $arrParams[] = $this->createWooPostParam_getChildProducts();
1083
  $arrParams[] = $this->createWooPostParam_putVariations();
 
1084
  $arrParams[] = $this->createWooPostParam_putProductGallery();
1085
  $arrParams[] = $this->createWooPostParam_getEndpoints();
1086
 
424
 
425
  {{printVar(user)}}
426
 
427
+ {% endif %}
428
+ ";
429
+
430
+ $arrParams[] = $this->createChildParam_code($key, $text);
431
+
432
+ //----- get term image ------
433
+
434
+ $key = "get_term_image()";
435
+ $text = "
436
+ {# get the image fields out of the term. ucfunc(\"get_term_image\",id,metakey) #}
437
+ {# if id is null - get from current term #}
438
+
439
+ {% set image = ucfunc(\"get_term_image\",10,\"attachment_id\") %}
440
+
441
+ {% if user is not empty %}
442
+ {{printVar(image)}}
443
+
444
+ {% else %}
445
+
446
+ no image found
447
+
448
  {% endif %}
449
  ";
450
 
464
 
465
 
466
 
467
+
468
  //----- output ------
469
 
470
  return($arrParams);
471
  }
472
 
473
+
474
 
475
  /**
476
  * get post child params
1086
  return($arrParam);
1087
  }
1088
 
1089
+ /**
1090
+ * create add child products param
1091
+ */
1092
+ private function createWooPostParam_putAttributes(){
1093
+
1094
+ $strCode = "";
1095
+
1096
+ $strCode .= "{%set attributes = ucfunc(\"get_product_attributes\",[param_prefix].id) %}\n\n";
1097
+
1098
+ $strCode .= "{% for attribute in attributes %}\n";
1099
+ $strCode .= " <p>{{attribute}}</p>\n";
1100
+ $strCode .= "{% endfor %}\n";
1101
+
1102
+ $arrParam = $this->createChildParam("putWooAttributes", null, array("raw_insert_text"=>$strCode));
1103
+
1104
+ return($arrParam);
1105
+ }
1106
+
1107
 
1108
  /**
1109
  * check and add woo post params
1122
 
1123
  $arrParams[] = $this->createWooPostParam_getChildProducts();
1124
  $arrParams[] = $this->createWooPostParam_putVariations();
1125
+ $arrParams[] = $this->createWooPostParam_putAttributes();
1126
  $arrParams[] = $this->createWooPostParam_putProductGallery();
1127
  $arrParams[] = $this->createWooPostParam_getEndpoints();
1128