Changeset 3190823
- Timestamp:
- 11/18/2024 12:35:04 AM (17 months ago)
- Location:
- the-pack-addon/trunk
- Files:
-
- 9 edited
-
assets/css/shortcode.css (modified) (2 diffs)
-
assets/js/custom.js (modified) (2 diffs)
-
assets/js/lazysizes.min.js (modified) (1 diff)
-
includes/extension/inc/thepack-extension.php (modified) (3 diffs)
-
includes/helper-functions.php (modified) (3 diffs)
-
includes/loop/post-loop-2.php (modified) (1 diff)
-
includes/widgets/element/gmap/index.php (modified) (1 diff)
-
includes/widgets/theme/post_content/index.php (modified) (1 diff)
-
index.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
the-pack-addon/trunk/assets/css/shortcode.css
r3113831 r3190823 1777 1777 -ms-transform: translateY(-50%); 1778 1778 transform: translateY(-50%); 1779 position: relative; 1779 1780 } 1780 1781 … … 1906 1907 } 1907 1908 1908 /*Quick popups*/1909 .tp-quick-pop .launcher {1910 position: fixed;1911 display: flex;1912 justify-content: center;1913 align-items: center;1914 cursor: pointer;1915 }1916 1917 .tp-quick-pop .quick-content {1918 position: fixed;1919 width: 100%;1920 display: none;1921 }1922 1923 .tp-quick-pop.show .quick-content {1924 display: block;1925 }1926 1927 .tp-quick-pop .close,1928 .tp-quick-pop.show .open {1929 display: none;1930 }1931 1932 .tp-quick-pop.show .close {1933 display: block;1934 }1935 1909 /*Image gallery*/ 1936 1910 .elementor-image-gallery .gallery-item{ -
the-pack-addon/trunk/assets/js/custom.js
r3113831 r3190823 1217 1217 }); 1218 1218 slider_elem.parents('html').find('.popwrap').html(result); 1219 1219 $('.loader').hide(); 1220 1220 $('iframe').mediaWrapper({ 1221 1221 intrinsic: false, … … 1233 1233 1234 1234 function tp_global_function() { 1235 1236 $('.launcher').on('click', function () {1237 $('.tp-quick-pop').toggleClass("show"); //you can list several class names1238 });1239 1235 1240 1236 $(document).on("scroll", function () { -
the-pack-addon/trunk/assets/js/lazysizes.min.js
r2554231 r3190823 1 /*! lazysizes - v4.0.0-rc2 */ 2 !function(a,b){var c=b(a,a.document);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}(window,function(a,b){"use strict";if(b.getElementsByClassName){var c,d,e=b.documentElement,f=a.Date,g=a.HTMLPictureElement,h="addEventListener",i="getAttribute",j=a[h],k=a.setTimeout,l=a.requestAnimationFrame||k,m=a.requestIdleCallback,n=/^picture$/i,o=["load","error","lazyincluded","_lazyloaded"],p={},q=Array.prototype.forEach,r=function(a,b){return p[b]||(p[b]=new RegExp("(\\s|^)"+b+"(\\s|$)")),p[b].test(a[i]("class")||"")&&p[b]},s=function(a,b){r(a,b)||a.setAttribute("class",(a[i]("class")||"").trim()+" "+b)},t=function(a,b){var c;(c=r(a,b))&&a.setAttribute("class",(a[i]("class")||"").replace(c," "))},u=function(a,b,c){var d=c?h:"removeEventListener";c&&u(a,b),o.forEach(function(c){a[d](c,b)})},v=function(a,d,e,f,g){var h=b.createEvent("CustomEvent");return e||(e={}),e.instance=c,h.initCustomEvent(d,!f,!g,e),a.dispatchEvent(h),h},w=function(b,c){var e;!g&&(e=a.picturefill||d.pf)?e({reevaluate:!0,elements:[b]}):c&&c.src&&(b.src=c.src)},x=function(a,b){return(getComputedStyle(a,null)||{})[b]},y=function(a,b,c){for(c=c||a.offsetWidth;c<d.minSize&&b&&!a._lazysizesWidth;)c=b.offsetWidth,b=b.parentNode;return c},z=function(){var a,c,d=[],e=[],f=d,g=function(){var b=f;for(f=d.length?e:d,a=!0,c=!1;b.length;)b.shift()();a=!1},h=function(d,e){a&&!e?d.apply(this,arguments):(f.push(d),c||(c=!0,(b.hidden?k:l)(g)))};return h._lsFlush=g,h}(),A=function(a,b){return b?function(){z(a)}:function(){var b=this,c=arguments;z(function(){a.apply(b,c)})}},B=function(a){var b,c=0,d=125,e=666,g=e,h=function(){b=!1,c=f.now(),a()},i=m?function(){m(h,{timeout:g}),g!==e&&(g=e)}:A(function(){k(h)},!0);return function(a){var e;(a=a===!0)&&(g=44),b||(b=!0,e=d-(f.now()-c),0>e&&(e=0),a||9>e&&m?i():k(i,e))}},C=function(a){var b,c,d=99,e=function(){b=null,a()},g=function(){var a=f.now()-c;d>a?k(g,d-a):(m||e)(e)};return function(){c=f.now(),b||(b=k(g,d))}},D=function(){var g,l,m,o,p,y,D,F,G,H,I,J,K,L,M=/^img$/i,N=/^iframe$/i,O="onscroll"in a&&!/glebot/.test(navigator.userAgent),P=0,Q=0,R=0,S=-1,T=function(a){R--,a&&a.target&&u(a.target,T),(!a||0>R||!a.target)&&(R=0)},U=function(a,c){var d,f=a,g="hidden"==x(b.body,"visibility")||"hidden"!=x(a,"visibility");for(F-=c,I+=c,G-=c,H+=c;g&&(f=f.offsetParent)&&f!=b.body&&f!=e;)g=(x(f,"opacity")||1)>0,g&&"visible"!=x(f,"overflow")&&(d=f.getBoundingClientRect(),g=H>d.left&&G<d.right&&I>d.top-1&&F<d.bottom+1);return g},V=function(){var a,f,h,j,k,m,n,p,q,r=c.elements;if((o=d.loadMode)&&8>R&&(a=r.length)){f=0,S++,null==K&&("expand"in d||(d.expand=e.clientHeight>500&&e.clientWidth>500?500:370),J=d.expand,K=J*d.expFactor),K>Q&&1>R&&S>2&&o>2&&!b.hidden?(Q=K,S=0):Q=o>1&&S>1&&6>R?J:P;for(;a>f;f++)if(r[f]&&!r[f]._lazyRace)if(O)if((p=r[f][i]("data-expand"))&&(m=1*p)||(m=Q),q!==m&&(y=innerWidth+m*L,D=innerHeight+m,n=-1*m,q=m),h=r[f].getBoundingClientRect(),(I=h.bottom)>=n&&(F=h.top)<=D&&(H=h.right)>=n*L&&(G=h.left)<=y&&(I||H||G||F)&&(d.loadHidden||"hidden"!=x(r[f],"visibility"))&&(l&&3>R&&!p&&(3>o||4>S)||U(r[f],m))){if(ba(r[f]),k=!0,R>9)break}else!k&&l&&!j&&4>R&&4>S&&o>2&&(g[0]||d.preloadAfterLoad)&&(g[0]||!p&&(I||H||G||F||"auto"!=r[f][i](d.sizesAttr)))&&(j=g[0]||r[f]);else ba(r[f]);j&&!k&&ba(j)}},W=B(V),X=function(a){s(a.target,d.loadedClass),t(a.target,d.loadingClass),u(a.target,Z),v(a.target,"lazyloaded")},Y=A(X),Z=function(a){Y({target:a.target})},$=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},_=function(a){var b,c=a[i](d.srcsetAttr);(b=d.customMedia[a[i]("data-media")||a[i]("media")])&&a.setAttribute("media",b),c&&a.setAttribute("srcset",c)},aa=A(function(a,b,c,e,f){var g,h,j,l,o,p;(o=v(a,"lazybeforeunveil",b)).defaultPrevented||(e&&(c?s(a,d.autosizesClass):a.setAttribute("sizes",e)),h=a[i](d.srcsetAttr),g=a[i](d.srcAttr),f&&(j=a.parentNode,l=j&&n.test(j.nodeName||"")),p=b.firesLoad||"src"in a&&(h||g||l),o={target:a},p&&(u(a,T,!0),clearTimeout(m),m=k(T,2500),s(a,d.loadingClass),u(a,Z,!0)),l&&q.call(j.getElementsByTagName("source"),_),h?a.setAttribute("srcset",h):g&&!l&&(N.test(a.nodeName)?$(a,g):a.src=g),f&&(h||l)&&w(a,{src:g})),a._lazyRace&&delete a._lazyRace,t(a,d.lazyClass),z(function(){(!p||a.complete&&a.naturalWidth>1)&&(p?T(o):R--,X(o))},!0)}),ba=function(a){var b,c=M.test(a.nodeName),e=c&&(a[i](d.sizesAttr)||a[i]("sizes")),f="auto"==e;(!f&&l||!c||!a[i]("src")&&!a.srcset||a.complete||r(a,d.errorClass))&&(b=v(a,"lazyunveilread").detail,f&&E.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,R++,aa(a,b,f,e,c))},ca=function(){if(!l){if(f.now()-p<999)return void k(ca,999);var a=C(function(){d.loadMode=3,W()});l=!0,d.loadMode=3,W(),j("scroll",function(){3==d.loadMode&&(d.loadMode=2),a()},!0)}};return{_:function(){p=f.now(),c.elements=b.getElementsByClassName(d.lazyClass),g=b.getElementsByClassName(d.lazyClass+" "+d.preloadClass),L=d.hFac,j("scroll",W,!0),j("resize",W,!0),a.MutationObserver?new MutationObserver(W).observe(e,{childList:!0,subtree:!0,attributes:!0}):(e[h]("DOMNodeInserted",W,!0),e[h]("DOMAttrModified",W,!0),setInterval(W,999)),j("hashchange",W,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(a){b[h](a,W,!0)}),/d$|^c/.test(b.readyState)?ca():(j("load",ca),b[h]("DOMContentLoaded",W),k(ca,2e4)),c.elements.length?(V(),z._lsFlush()):W()},checkElems:W,unveil:ba}}(),E=function(){var a,c=A(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),n.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;g>f;f++)e[f].setAttribute("sizes",d);c.detail.dataAttr||w(a,c.detail)}),e=function(a,b,d){var e,f=a.parentNode;f&&(d=y(a,f,d),e=v(a,"lazybeforesizes",{width:d,dataAttr:!!b}),e.defaultPrevented||(d=e.detail.width,d&&d!==a._lazysizesWidth&&c(a,f,e,d)))},f=function(){var b,c=a.length;if(c)for(b=0;c>b;b++)e(a[b])},g=C(f);return{_:function(){a=b.getElementsByClassName(d.autosizesClass),j("resize",g)},checkElems:g,updateElem:e}}(),F=function(){F.i||(F.i=!0,E._(),D._())};return function(){var b,c={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0};d=a.lazySizesConfig||a.lazysizesConfig||{};for(b in c)b in d||(d[b]=c[b]);a.lazySizesConfig=d,k(function(){d.init&&F()})}(),c={cfg:d,autoSizer:E,loader:D,init:F,uP:w,aC:s,rC:t,hC:r,fire:v,gW:y,rAF:z}}}); 1 /*! lazysizes - v5.3.2 */ 2 3 !function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,i=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,o=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],a={},G=Array.prototype.forEach,J=function(e,t){if(!a[t]){a[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return a[t].test(e[$]("class")||"")&&a[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var a;if(a=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(a," "))}},V=function(t,a,e){var i=e?P:"removeEventListener";if(e){V(t,a)}r.forEach(function(e){t[i](e,a)})},X=function(e,t,a,i,r){var n=D.createEvent("Event");if(!a){a={}}a.instance=k;n.initEvent(t,!i,!r);n.detail=a;e.dispatchEvent(n);return n},Y=function(e,t){var a;if(!i&&(a=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}a({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,a){a=a||e.offsetWidth;while(a<H.minSize&&t&&!e._lazysizesWidth){a=t.offsetWidth;t=t.parentNode}return a},ee=function(){var a,i;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;a=true;i=false;while(e.length){e.shift()()}a=false};var e=function(e,t){if(a&&!t){e.apply(this,arguments)}else{n.push(e);if(!i){i=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(a,e){return e?function(){ee(a)}:function(){var e=this;var t=arguments;ee(function(){a.apply(e,t)})}},ae=function(e){var a;var i=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){a=false;i=f.now();e()};var s=o&&n>49?function(){o(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(a){return}a=true;t=r-(f.now()-i);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ie=function(e){var t,a;var i=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-a;if(e<i){I(n,i-e)}else{(o||r)(r)}};return function(){a=f.now();if(!t){t=I(n,i)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var M=0;var N=-1;var L=function(e){M--;if(!e||M<0||!e.target){M=0}};var x=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var W=function(e,t){var a;var i=e;var r=x(e);g-=t;b+=t;p-=t;C+=t;while(r&&(i=i.offsetParent)&&i!=D.body&&i!=O){r=(Z(i,"opacity")||1)>0;if(r&&Z(i,"overflow")!="visible"){a=i.getBoundingClientRect();r=C>a.left&&p<a.right&&b>a.top-1&&g<a.bottom+1}}return r};var t=function(){var e,t,a,i,r,n,s,o,l,u,f,c;var d=k.elements;if((h=H.loadMode)&&M<8&&(e=d.length)){t=0;N++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(o=d[t][$]("data-expand"))||!(n=o*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&M<1&&N>2&&h>2&&!D.hidden){w=f;N=0}else if(h>1&&N>1&&M<6){w=u}else{w=_}}if(l!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;l=n}a=d[t].getBoundingClientRect();if((b=a.bottom)>=s&&(g=a.top)<=z&&(C=a.right)>=s*c&&(p=a.left)<=y&&(b||C||p||g)&&(H.loadHidden||x(d[t]))&&(m&&M<3&&!o&&(h<3||N<4)||W(d[t],n))){R(d[t]);r=true;if(M>9){break}}else if(!r&&m&&!i&&M<4&&N<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!o&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){i=v[0]||d[t]}}if(i&&!r){R(i)}}};var a=ae(t);var S=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}L(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,B);X(t,"lazyloaded")};var i=te(S);var B=function(e){i({target:e.target})};var T=function(e,t){var a=e.getAttribute("data-load-mode")||H.iframeLoadMode;if(a==0){e.contentWindow.location.replace(t)}else if(a==1){e.src=t}};var F=function(e){var t;var a=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(a){e.setAttribute("srcset",a)}};var s=te(function(t,e,a,i,r){var n,s,o,l,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(i){if(a){K(t,H.autosizesClass)}else{t.setAttribute("sizes",i)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){o=t.parentNode;l=o&&j.test(o.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||l);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(L,2500);V(t,B,true)}if(l){G.call(o.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!l){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||l)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,H.fastLoadedClass)}S(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){M--}},true)});var R=function(e){if(e._lazyRace){return}var t;var a=n.test(e.nodeName);var i=a&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=i=="auto";if((r||!m)&&a&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;M++;s(e,t,r,i,a)};var r=ie(function(){H.loadMode=3;a()});var o=function(){if(H.loadMode==3){H.loadMode=2}r()};var l=function(){if(m){return}if(f.now()-e<999){I(l,999);return}m=true;H.loadMode=3;a();q("scroll",o,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",a,true);q("resize",a,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(a).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",a,true);O[P]("DOMAttrModified",a,true);setInterval(a,999)}q("hashchange",a,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,a,true)});if(/d$|^c/.test(D.readyState)){l()}else{q("load",l);D[P]("DOMContentLoaded",a);I(l,2e4)}if(k.elements.length){t();ee._lsFlush()}else{a()}},checkElems:a,unveil:R,_aLSL:o}}(),re=function(){var a;var n=te(function(e,t,a,i){var r,n,s;e._lazysizesWidth=i;i+="px";e.setAttribute("sizes",i);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",i)}}if(!a.detail.dataAttr){Y(e,a.detail)}});var i=function(e,t,a){var i;var r=e.parentNode;if(r){a=s(e,r,a);i=X(e,"lazybeforesizes",{width:a,dataAttr:!!t});if(!i.defaultPrevented){a=i.detail.width;if(a&&a!==e._lazysizesWidth){n(e,r,i,a)}}}};var e=function(){var e;var t=a.length;if(t){e=0;for(;e<t;e++){i(a[e])}}};var t=ie(e);return{_:function(){a=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:i}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{}); 3 4 4 5 /*! lazysizes - v4.0.0-rc2 */ -
the-pack-addon/trunk/includes/extension/inc/thepack-extension.php
r3100001 r3190823 475 475 476 476 $this->end_controls_section(); 477 478 $this->start_controls_section(479 'tp_quick_pop',480 [481 'label' => esc_html__('Quick popup', 'the-pack-addon'),482 'tab' => $this->get_id(),483 ]484 );485 486 $this->add_control(487 'tpqp_icn',488 [489 'label' => esc_html__('Trigger Icon', 'the-pack-addon'),490 'type' => Controls_Manager::ICONS,491 'label_block' => true,492 ]493 );494 495 $this->add_control(496 'tpqp_clos',497 [498 'label' => esc_html__('Close Icon', 'the-pack-addon'),499 'type' => Controls_Manager::ICONS,500 'label_block' => true,501 ]502 );503 504 $this->add_control(505 'tpqp_tmpl',506 [507 'label' => esc_html__('Template', 'the-pack-addon'),508 'type' => Controls_Manager::SELECT2,509 'options' => thepack_footer_select(),510 'label_block' => true511 ]512 );513 514 $this->add_control(515 'tpqpst',516 [517 'label' => esc_html__('Position', 'the-pack-addon'),518 'type' => Controls_Manager::CHOOSE,519 'options' => [520 'pleft' => [521 'title' => esc_html__('Left', 'the-pack-addon'),522 'icon' => 'eicon-h-align-left',523 ],524 'pright' => [525 'title' => esc_html__('Right', 'the-pack-addon'),526 'icon' => 'eicon-h-align-right',527 ]528 ],529 'default' => 'pleft',530 ]531 );532 533 $this->add_responsive_control(534 'tpqpz',535 [536 'label' => esc_html__('Z index', 'the-pack-addon'),537 'type' => Controls_Manager::SLIDER,538 'default' => [539 'size' => 2,540 ],541 'range' => [542 'px' => [543 'max' => 8000,544 ],545 ],546 'selectors' => [547 '.tp-quick-pop .quick-content' => 'z-index: {{SIZE}};',548 '.tp-quick-pop .launcher' => 'z-index: {{SIZE}};',549 ],550 ]551 );552 553 $this->start_controls_tabs('tpoptab');554 555 $this->start_controls_tab(556 'tpoptab1',557 [558 'label' => esc_html__('Trigger', 'the-pack-addon'),559 ]560 );561 562 $this->add_responsive_control(563 'tpqpwh',564 [565 'label' => esc_html__('Width & height', 'the-pack-addon'),566 'type' => Controls_Manager::SLIDER,567 'selectors' => [568 '.tp-quick-pop .launcher' => 'width:{{SIZE}}{{UNIT}};height:{{SIZE}}{{UNIT}};',569 ],570 571 ]572 );573 574 $this->add_responsive_control(575 'tpqpos',576 [577 'label' => esc_html__('Position', 'the-pack-addon'),578 'type' => Controls_Manager::SLIDER,579 'selectors' => [580 '.tp-quick-pop.pleft .launcher' => 'left:{{SIZE}}{{UNIT}};',581 '.tp-quick-pop.pright .launcher' => 'right:{{SIZE}}{{UNIT}};',582 '.tp-quick-pop .launcher' => 'bottom:{{SIZE}}{{UNIT}};',583 ],584 585 ]586 );587 588 $this->add_responsive_control(589 'tpqpbr',590 [591 'label' => esc_html__('Border radius', 'the-pack-addon'),592 'type' => Controls_Manager::SLIDER,593 'selectors' => [594 '.tp-quick-pop .launcher' => 'border-radius:{{SIZE}}{{UNIT}};',595 ],596 597 ]598 );599 600 $this->add_control(601 'tpqpclr',602 [603 'label' => esc_html__('Color', 'the-pack-addon'),604 'type' => Controls_Manager::COLOR,605 'selectors' => [606 '.tp-quick-pop .launcher' => 'color: {{VALUE}};',607 ],608 ]609 );610 611 $this->add_control(612 'tpqpbg',613 [614 'label' => esc_html__('Background', 'the-pack-addon'),615 'type' => Controls_Manager::COLOR,616 'selectors' => [617 '.tp-quick-pop .launcher' => 'background: {{VALUE}};',618 ],619 ]620 );621 622 $this->end_controls_tab();623 624 $this->start_controls_tab(625 'tpoptab2',626 [627 'label' => esc_html__('Content', 'the-pack-addon'),628 ]629 );630 631 $this->add_responsive_control(632 'tpqpcwd',633 [634 'label' => esc_html__('Width', 'the-pack-addon'),635 'type' => Controls_Manager::SLIDER,636 'range' => [637 'px' => [638 'max' => 800,639 'min' => 1,640 'step' => 1,641 ]642 ],643 'size_units' => ['px', '%'],644 'selectors' => [645 '.tp-quick-pop .quick-content' => 'max-width: {{SIZE}}{{UNIT}};',646 ],647 648 ]649 );650 651 $this->add_control(652 'tpqpcbg',653 [654 'label' => esc_html__('Background', 'the-pack-addon'),655 'type' => Controls_Manager::COLOR,656 'selectors' => [657 '.tp-quick-pop .quick-content' => 'background: {{VALUE}};',658 ],659 ]660 );661 662 $this->add_responsive_control(663 'tpqpcpd',664 [665 'label' => esc_html__('Padding', 'the-pack-addon'),666 'type' => Controls_Manager::DIMENSIONS,667 'size_units' => ['px', 'em'],668 'selectors' => [669 '{{WRAPPER}} .tp-quick-pop .quick-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',670 ],671 ]672 );673 674 $this->add_responsive_control(675 'tpqcpos',676 [677 'label' => esc_html__('Position', 'the-pack-addon'),678 'type' => Controls_Manager::SLIDER,679 'selectors' => [680 '.tp-quick-pop.pleft .quick-content' => 'left:{{SIZE}}{{UNIT}};',681 '.tp-quick-pop.pright .quick-content' => 'right:{{SIZE}}{{UNIT}};',682 '.tp-quick-pop .quick-content' => 'bottom:{{SIZE}}{{UNIT}};',683 ],684 685 ]686 );687 688 $this->add_responsive_control(689 'tpqpcbr',690 [691 'label' => esc_html__('Border radius', 'the-pack-addon'),692 'type' => Controls_Manager::SLIDER,693 'selectors' => [694 '.tp-quick-pop .quick-content' => 'border-radius:{{SIZE}}{{UNIT}};',695 ],696 697 ]698 );699 700 $this->add_group_control(701 Group_Control_Box_Shadow::get_type(),702 [703 'name' => 'tpqpcbxd',704 'label' => esc_html__('Box shadow', 'the-pack-addon'),705 'selector' => '{{WRAPPER}} .quick-content',706 ]707 );708 709 $this->end_controls_tab();710 711 $this->end_controls_tabs();712 713 $this->end_controls_section();714 715 477 } 716 478 } … … 755 517 $show_cursor = self::elementor_get_setting( 'tp_cursor' ); 756 518 $show_progress = self::elementor_get_setting( 'tp_progress_bar' ); 757 $popicon = the_pack_render_icon( self::elementor_get_setting( 'tpqp_icn' ),'open' );758 $popiconclose = the_pack_render_icon( self::elementor_get_setting( 'tpqp_clos' ),'close' );759 $popcontent = self::elementor_get_setting( 'tpqp_tmpl' );760 $popposition = self::elementor_get_setting( 'tpqpst' );761 519 $backtoposition = self::elementor_get_setting( 'tpbktpos' ); 762 520 $backtopicon = the_pack_render_icon( self::elementor_get_setting( 'tpbtpikn' ) ); … … 782 540 echo '<div class="tp-reading-progress"><div class="progress"></div></div>'; 783 541 } 784 785 if ($popcontent){786 echo '787 <div class="tp-quick-pop '.esc_attr($popposition).'">788 <div class="quick-content">789 <div class="inner">790 '.do_shortcode('[THEPACK_INSERT_TPL id="' . $popcontent . '"]').'791 </div>792 </div>793 <div class="launcher">';?>794 <?php //phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped ?>795 <?php echo thepack_build_html($popicon.$popiconclose);?>796 </div>797 </div>798 <?php }799 542 800 543 } -
the-pack-addon/trunk/includes/helper-functions.php
r3178811 r3190823 175 175 $class = $cls ? 'class=' . $cls . '' : ''; 176 176 if ($tag) { 177 return '<' . esc_attr($tag) . ' ' . esc_attr($class) . '>' . wp_kses_post($option). '</' . esc_attr($tag) . '>';177 return '<' . esc_attr($tag) . ' ' . esc_attr($class) . '>' . $option . '</' . esc_attr($tag) . '>'; 178 178 } else { 179 return wp_kses_post($option);179 return $option; 180 180 } 181 181 } … … 366 366 function thepack_ft_images($id = '', $thumb = '') 367 367 { 368 return wp_get_attachment_image($id, $thumb); 369 } 370 368 //return wp_get_attachment_image($id, $thumb); 369 $img_src = wp_get_attachment_image_url( $id, $thumb ); 370 return '<img class="lazyload" data-src="'.$img_src.'" alt="" />'; 371 } 372 371 373 function thepack_human_size_byte($bytes, $base = '1024') 372 374 { … … 624 626 } 625 627 628 add_filter( 'post_thumbnail_html', 'wpdd_modify_post_thumbnail_html', 10, 5 ); 629 630 function wpdd_modify_post_thumbnail_html( $html, $post_id, $post_thumbnail_id, $size, $attr ) 631 { 632 return str_replace( '<img', '<img loading="lazy"', $html ); 633 } 634 635 -
the-pack-addon/trunk/includes/loop/post-loop-2.php
r2917061 r3190823 4 4 <a class="tp-thumblink" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"></a> 5 5 <?php if (!$hide_thumb){ 6 7 //echo thepack_ft_images(get_post_thumbnail_id(), $settings['img_size']); 6 8 the_post_thumbnail($settings['img_size']); 7 9 } ?> -
the-pack-addon/trunk/includes/widgets/element/gmap/index.php
r3100001 r3190823 459 459 <?php //phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped ?> 460 460 <?php echo '<div ' . $bg . ' class="ae-gmap lazyload ' . $cls . '" data-xld =\'' . wp_json_encode($slider_options) . '\'>'; ?> 461 <div id="google-container-<?php echo $this->get_id(); ?>"></div>461 <div id="google-container-<?php echo esc_attr($this->get_id()); ?>"></div> 462 462 <?php //phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped ?> 463 463 <?php echo thepack_build_html($zoom); ?> -
the-pack-addon/trunk/includes/widgets/theme/post_content/index.php
r3050466 r3190823 274 274 echo '<div class="tp-post-content">'; 275 275 //phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped 276 echo get_post_field('post_content', $id); 276 $html = get_post_field('post_content', $id); 277 echo str_replace( '<img', '<img loading="lazy"', $html ); 277 278 echo '</div>'; 278 279 } -
the-pack-addon/trunk/index.php
r3178824 r3190823 349 349 350 350 add_action( 'plugins_loaded', 'run_the_pack_addon' ); 351 352
Note: See TracChangeset
for help on using the changeset viewer.