Plugin Directory

Changeset 2821867

Timestamp:
11/22/2022 05:28:39 AM (21 months ago)
Author:
sayful
Message:

Add version 1.6.3 of Filterable Portfolio

Location:
filterable-portfolio
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • filterable-portfolio/trunk/assets/js/block.js

    r2789121 r2821867  
    1 (()=>{var e={395:e=>{e.exports=function(e,t){var r,n,o=0;function i(){var i,l,a=r,s=arguments.length;e:for(;a;){if(a.args.length===arguments.length){for(l=0;l<s;l++)if(a.args[l]!==arguments[l]){a=a.next;continue e}return a!==r&&(a===n&&(n=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=r,a.prev=null,r.prev=a,r=a),a.val}a=a.next}for(i=new Array(s),l=0;l<s;l++)i[l]=arguments[l];return a={args:i,val:e.apply(null,i)},r?(r.prev=a,a.next=r):n=a,o===t.maxSize?(n=n.prev).next=null:o++,r=a,a.val}return t=t||{},i.clear=function(){r=null,n=null,o=0},i}},588:(e,t,r)=>{var n;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return a(c(e),arguments)}function l(e,t){return i.apply(null,[e].concat(t||[]))}function a(e,t){var r,n,l,a,s,c,u,f,p,h=1,d=e.length,m="";for(n=0;n<d;n++)if("string"==typeof e[n])m+=e[n];else if("object"==typeof e[n]){if((a=e[n]).keys)for(r=t[h],l=0;l<a.keys.length;l++){if(null==r)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[l],a.keys[l-1]));r=r[a.keys[l]]}else r=a.param_no?t[a.param_no]:t[h++];if(o.not_type.test(a.type)&&o.not_primitive.test(a.type)&&r instanceof Function&&(r=r()),o.numeric_arg.test(a.type)&&"number"!=typeof r&&isNaN(r))throw new TypeError(i("[sprintf] expecting number but found %T",r));switch(o.number.test(a.type)&&(f=r>=0),a.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,a.width?parseInt(a.width):0);break;case"e":r=a.precision?parseFloat(r).toExponential(a.precision):parseFloat(r).toExponential();break;case"f":r=a.precision?parseFloat(r).toFixed(a.precision):parseFloat(r);break;case"g":r=a.precision?String(Number(r.toPrecision(a.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=a.precision?r.substring(0,a.precision):r;break;case"t":r=String(!!r),r=a.precision?r.substring(0,a.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=a.precision?r.substring(0,a.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=a.precision?r.substring(0,a.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}o.json.test(a.type)?m+=r:(!o.number.test(a.type)||f&&!a.sign?p="":(p=f?"+":"-",r=r.toString().replace(o.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(p+r).length,s=a.width&&u>0?c.repeat(u):"",m+=a.align?p+r+s:"0"===c?p+s+r:s+p+r)}return m}var s=Object.create(null);function c(e){if(s[e])return s[e];for(var t,r=e,n=[],i=0;r;){if(null!==(t=o.text.exec(r)))n.push(t[0]);else if(null!==(t=o.modulo.exec(r)))n.push("%");else{if(null===(t=o.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var l=[],a=t[2],c=[];if(null===(c=o.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(l.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=o.key_access.exec(a)))l.push(c[1]);else{if(null===(c=o.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");l.push(c[1])}t[2]=l}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return s[e]=n}i,l,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=l,void 0===(n=function(){return{sprintf:i,vsprintf:l}}.call(t,r,t,e))||(e.exports=n))}()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=wp.blocks,t=wp.components,n=wp.blockEditor;var o=r(395),i=r.n(o);r(588);i()(console.error);var l,a,s,c;l={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},a=["(","?"],s={")":["("],":":["?","?:"]},c=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var u={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,r){if(e)throw t;return r}};function f(e){var t=function(e){for(var t,r,n,o,i=[],u=[];t=e.match(c);){for(r=t[0],(n=e.substr(0,t.index).trim())&&i.push(n);o=u.pop();){if(s[r]){if(s[r][0]===o){r=s[r][1]||r;break}}else if(a.indexOf(o)>=0||l[o]<l[r]){u.push(o);break}i.push(o)}s[r]||u.push(r),e=e.substr(t.index+r.length)}return(e=e.trim())&&i.push(e),i.concat(u.reverse())}(e);return function(e){return function(e,t){var r,n,o,i,l,a,s=[];for(r=0;r<e.length;r++){if(l=e[r],i=u[l]){for(n=i.length,o=Array(n);n--;)o[n]=s.pop();try{a=i.apply(null,o)}catch(e){return e}}else a=t.hasOwnProperty(l)?t[l]:+l;s.push(a)}return s[0]}(t,e)}}var p={contextDelimiter:"",onMissingKey:null};function h(e,t){var r;for(r in this.data=e,this.pluralForms={},this.options={},p)this.options[r]=void 0!==t&&r in t?t[r]:p[r]}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}h.prototype.getPluralForm=function(e,t){var r,n,o,i=this.pluralForms[e];return i||("function"!=typeof(o=(r=this.data[e][""])["Plural-Forms"]||r["plural-forms"]||r.plural_forms)&&(n=function(e){var t,r,n;for(t=e.split(";"),r=0;r<t.length;r++)if(0===(n=t[r].trim()).indexOf("plural="))return n.substr(7)}(r["Plural-Forms"]||r["plural-forms"]||r.plural_forms),o=function(e){var t=f(e);return function(e){return+t({n:e})}}(n)),i=this.pluralForms[e]=o),i(t)},h.prototype.dcnpgettext=function(e,t,r,n,o){var i,l,a;return i=void 0===o?0:this.getPluralForm(e,o),l=r,t&&(l=t+this.options.contextDelimiter+r),(a=this.data[e][l])&&a[i]?a[i]:(this.options.onMissingKey&&this.options.onMissingKey(r,e),0===i?r:n)};const b={"":{plural_forms:e=>1===e?0:1}},v=/^i18n\.(n?gettext|has_translation)(_|$)/;const y=function(e){return"string"!=typeof e||""===e?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(e)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};const x=function(e){return"string"!=typeof e||""===e?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(e)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(e)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};const _=function(e,t){return function(r,n,o){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;const l=e[t];if(!x(r))return;if(!y(n))return;if("function"!=typeof o)return void console.error("The hook callback must be a function.");if("number"!=typeof i)return void console.error("If specified, the hook priority must be a number.");const a={callback:o,priority:i,namespace:n};if(l[r]){const e=l[r].handlers;let t;for(t=e.length;t>0&&!(i>=e[t-1].priority);t--);t===e.length?e[t]=a:e.splice(t,0,a),l.__current.forEach((e=>{e.name===r&&e.currentIndex>=t&&e.currentIndex++}))}else l[r]={handlers:[a],runs:0};"hookAdded"!==r&&e.doAction("hookAdded",r,n,o,i)}};const w=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,o){const i=e[t];if(!x(n))return;if(!r&&!y(o))return;if(!i[n])return 0;let l=0;if(r)l=i[n].handlers.length,i[n]={runs:i[n].runs,handlers:[]};else{const e=i[n].handlers;for(let t=e.length-1;t>=0;t--)e[t].namespace===o&&(e.splice(t,1),l++,i.__current.forEach((e=>{e.name===n&&e.currentIndex>=t&&e.currentIndex--})))}return"hookRemoved"!==n&&e.doAction("hookRemoved",n,o),l}};const k=function(e,t){return function(r,n){const o=e[t];return void 0!==n?r in o&&o[r].handlers.some((e=>e.namespace===n)):r in o}};const F=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n){const o=e[t];o[n]||(o[n]={handlers:[],runs:0}),o[n].runs++;const i=o[n].handlers;for(var l=arguments.length,a=new Array(l>1?l-1:0),s=1;s<l;s++)a[s-1]=arguments[s];if(!i||!i.length)return r?a[0]:void 0;const c={name:n,currentIndex:0};for(o.__current.push(c);c.currentIndex<i.length;){const e=i[c.currentIndex].callback.apply(null,a);r&&(a[0]=e),c.currentIndex++}return o.__current.pop(),r?a[0]:void 0}};const E=function(e,t){return function(){var r,n;const o=e[t];return null!==(r=null===(n=o.__current[o.__current.length-1])||void 0===n?void 0:n.name)&&void 0!==r?r:null}};const A=function(e,t){return function(r){const n=e[t];return void 0===r?void 0!==n.__current[0]:!!n.__current[0]&&r===n.__current[0].name}};const C=function(e,t){return function(r){const n=e[t];if(x(r))return n[r]&&n[r].runs?n[r].runs:0}};class O{constructor(){this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=_(this,"actions"),this.addFilter=_(this,"filters"),this.removeAction=w(this,"actions"),this.removeFilter=w(this,"filters"),this.hasAction=k(this,"actions"),this.hasFilter=k(this,"filters"),this.removeAllActions=w(this,"actions",!0),this.removeAllFilters=w(this,"filters",!0),this.doAction=F(this,"actions"),this.applyFilters=F(this,"filters",!0),this.currentAction=E(this,"actions"),this.currentFilter=E(this,"filters"),this.doingAction=A(this,"actions"),this.doingFilter=A(this,"filters"),this.didAction=C(this,"actions"),this.didFilter=C(this,"filters")}}const S=function(){return new O}(),{addAction:j,addFilter:P,removeAction:D,removeFilter:T,hasAction:I,hasFilter:W,removeAllActions:L,removeAllFilters:R,doAction:z,applyFilters:B,currentAction:N,currentFilter:$,doingAction:M,doingFilter:Z,didAction:K,didFilter:X,actions:G,filters:J}=S,U=((e,t,r)=>{const n=new h({}),o=new Set,i=()=>{o.forEach((e=>e()))},l=function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[r]=m(m({},n.data[r]),e),n.data[r][""]=m(m({},b[""]),null===(t=n.data[r])||void 0===t?void 0:t[""]),delete n.pluralForms[r]},a=(e,t)=>{l(e,t),i()},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;return n.data[e]||l(void 0,e),n.dcnpgettext(e,t,r,o,i)},c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return e},u=(e,t,n)=>{let o=s(n,t,e);return r?(o=r.applyFilters("i18n.gettext_with_context",o,e,t,n),r.applyFilters("i18n.gettext_with_context_"+c(n),o,e,t,n)):o};if(e&&a(e,t),r){const e=e=>{v.test(e)&&i()};r.addAction("hookAdded","core/i18n",e),r.addAction("hookRemoved","core/i18n",e)}return{getLocaleData:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[e]},setLocaleData:a,addLocaleData:function(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[r]=m(m(m({},n.data[r]),e),{},{"":m(m(m({},b[""]),null===(t=n.data[r])||void 0===t?void 0:t[""]),null==e?void 0:e[""])}),delete n.pluralForms[r],i()},resetLocaleData:(e,t)=>{n.data={},n.pluralForms={},a(e,t)},subscribe:e=>(o.add(e),()=>o.delete(e)),__:(e,t)=>{let n=s(t,void 0,e);return r?(n=r.applyFilters("i18n.gettext",n,e,t),r.applyFilters("i18n.gettext_"+c(t),n,e,t)):n},_x:u,_n:(e,t,n,o)=>{let i=s(o,void 0,e,t,n);return r?(i=r.applyFilters("i18n.ngettext",i,e,t,n,o),r.applyFilters("i18n.ngettext_"+c(o),i,e,t,n,o)):i},_nx:(e,t,n,o,i)=>{let l=s(i,o,e,t,n);return r?(l=r.applyFilters("i18n.ngettext_with_context",l,e,t,n,o,i),r.applyFilters("i18n.ngettext_with_context_"+c(i),l,e,t,n,o,i)):l},isRTL:()=>"rtl"===u("ltr","text direction"),hasTranslation:(e,t,o)=>{var i,l;const a=t?t+""+e:e;let s=!(null===(i=n.data)||void 0===i||null===(l=i[null!=o?o:"default"])||void 0===l||!l[a]);return r&&(s=r.applyFilters("i18n.has_translation",s,e,t,o),s=r.applyFilters("i18n.has_translation_"+c(o),s,e,t,o)),s}}})(void 0,void 0,S),V=(U.getLocaleData.bind(U),U.setLocaleData.bind(U),U.resetLocaleData.bind(U),U.subscribe.bind(U),U.__.bind(U)),q=(U._x.bind(U),U._n.bind(U),U._nx.bind(U),U.isRTL.bind(U),U.hasTranslation.bind(U),React);var H=r.n(q);const Q=H().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",shapeRendering:"geometricPrecision"},H().createElement("rect",{width:"512",height:"512",rx:"8",fill:"#fff7ed"}),H().createElement("g",{transform:"translate(0 28)"},H().createElement("g",null,H().createElement("rect",{width:"120",height:"90",rx:"0",ry:"0",transform:"translate(38 100)",fill:"#D32F2F",strokeWidth:"0"}),H().createElement("rect",{width:"120",height:"90",rx:"0",ry:"0",transform:"translate(196 100)",fill:"#757575",strokeWidth:"0"}),H().createElement("rect",{width:"120",height:"90",rx:"0",ry:"0",transform:"translate(354 100)",fill:"#D32F2F",strokeWidth:"0"})),H().createElement("g",{transform:"translate(0 128)"},H().createElement("rect",{width:"120",height:"90",rx:"0",ry:"0",transform:"translate(38 100)",fill:"#757575",strokeWidth:"0"}),H().createElement("rect",{width:"120",height:"90",rx:"0",ry:"0",transform:"translate(196 100)",fill:"#2E7D32",strokeWidth:"0"}),H().createElement("rect",{width:"120",height:"90",rx:"0",ry:"0",transform:"translate(354 100)",fill:"#757575",strokeWidth:"0"})),H().createElement("g",{transform:"translate(0 256)"},H().createElement("rect",{width:"120",height:"90",rx:"0",ry:"0",transform:"translate(38 100)",fill:"#1976D2",strokeWidth:"0"}),H().createElement("rect",{width:"120",height:"90",rx:"0",ry:"0",transform:"translate(196 100)",fill:"#757575",strokeWidth:"0"}),H().createElement("rect",{width:"120",height:"90",rx:"0",ry:"0",transform:"translate(354 100)",fill:"#1976D2",strokeWidth:"0"}))),H().createElement("g",{transform:"translate(6 15)"},H().createElement("rect",{width:"60",height:"20",rx:"0",ry:"0",transform:"translate(100 55)",fill:"#757575",strokeWidth:"0"}),H().createElement("rect",{width:"60",height:"20",rx:"0",ry:"0",transform:"translate(180 55)",fill:"#D32F2F",strokeWidth:"0"}),H().createElement("rect",{width:"60",height:"20",rx:"0",ry:"0",transform:"translate(260 55)",fill:"#2E7D32",strokeWidth:"0"}),H().createElement("rect",{width:"60",height:"20",rx:"0",ry:"0",transform:"translate(340 55)",fill:"#1976D2",strokeWidth:"0"}))),Y=[{label:V("Default (as Global Settings)","filterable-portfolio"),value:"0"},{label:V("1 Column","filterable-portfolio"),value:"12"},{label:V("2 Columns","filterable-portfolio"),value:"6"},{label:V("3 Columns","filterable-portfolio"),value:"4"},{label:V("4 Columns","filterable-portfolio"),value:"3"},{label:V("6 Columns","filterable-portfolio"),value:"2"}];(0,e.registerBlockType)("filterable-portfolio/projects",{apiVersion:2,title:V("Filterable Portfolio","filterable-portfolio"),icon:Q,category:"widgets",edit(e){let{attributes:r,setAttributes:o}=e;const{isFeatured:i,showFilter:l,filterBy:a,theme:s,buttonsAlignment:c,limit:u,columnsPhone:f,columnsTablet:p,columnsDesktop:h,columnsWidescreen:d}=r,m=(0,n.useBlockProps)(),g=H().createElement(n.InspectorControls,{key:"setting"},H().createElement(t.PanelBody,{title:V("Portfolio Options","filterable-portfolio"),initialOpen:!0},H().createElement("div",{className:"filterable-portfolio-select-control"},H().createElement(t.SelectControl,{label:V("Theme","filterable-portfolio"),value:s,options:[{label:V("One","filterable-portfolio"),value:"one"},{label:V("Two","filterable-portfolio"),value:"two"}],onChange:e=>o({theme:e})})),H().createElement(t.RangeControl,{label:V("Limit","filterable-portfolio"),help:V("Limit total items to show. To show all set -1.","filterable-portfolio"),value:u,onChange:e=>o({limit:e}),min:-1,max:100}),H().createElement(t.ToggleControl,{label:V("Only show featured projects.","filterable-portfolio"),checked:i,onChange:()=>o({isFeatured:!i})})),H().createElement(t.PanelBody,{title:V("Filter Settings","filterable-portfolio"),initialOpen:!1},H().createElement(t.ToggleControl,{label:V("Show filter buttons.","filterable-portfolio"),checked:l,onChange:()=>o({showFilter:!l})}),H().createElement("div",{className:"filterable-portfolio-select-control"},H().createElement(t.SelectControl,{label:V("Filter buttons alignment","filterable-portfolio"),value:c,options:[{label:"Left",value:"start"},{label:"Center",value:"center"},{label:"Right",value:"end"}],onChange:e=>o({buttonsAlignment:e})})),H().createElement("div",{className:"filterable-portfolio-select-control"},H().createElement(t.SelectControl,{label:V("Filter by","filterable-portfolio"),value:a,options:[{label:V("Categories","filterable-portfolio"),value:"categories"},{label:V("Skills","filterable-portfolio"),value:"skills"}],onChange:e=>o({filterBy:e})}))),H().createElement(t.PanelBody,{title:V("Responsive Settings","filterable-portfolio"),initialOpen:!1},H().createElement(t.SelectControl,{label:V("Columns:Phone","filterable-portfolio"),value:f,onChange:e=>o({columnsPhone:e}),options:Y}),H().createElement(t.SelectControl,{label:V("Columns:Tablet","filterable-portfolio"),value:p,onChange:e=>o({columnsTablet:e}),options:Y}),H().createElement(t.SelectControl,{label:V("Columns:Desktop","filterable-portfolio"),value:h,onChange:e=>o({columnsDesktop:e}),options:Y}),H().createElement(t.SelectControl,{label:V("Columns:Widescreen","filterable-portfolio"),value:d,onChange:e=>o({columnsWidescreen:e}),options:Y})));return H().createElement("div",m,g,H().createElement(t.ServerSideRender,{block:"filterable-portfolio/projects",attributes:r}))},save:()=>null})})()})();
     1(()=>{var e={395:e=>{e.exports=function(e,t){var r,n,o=0;function ,H().createElement(t.ServerSideRender,{block:"filterable-portfolio/projects",attributes:r}))},save:()=>null})})()})();
  • filterable-portfolio/trunk/filterable-portfolio.php

    r2789121 r2821867  
    44 * Plugin URI:          https://sayfulislam.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
    55 * Description:         A WordPress plugin to display portfolio images with filtering.
    6  * Version:             1.6.2
     6 * Version:             1.6.
    77 * Author:              Sayful Islam
    88 * Author URI:          https://sayfulislam.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
     
    4747         * @var string
    4848         */
    49         private $version = '1.6.2';
     49        private $version = '1.6.';
    5050
    5151        /**
  • filterable-portfolio/trunk/includes/class-filterable-portfolio-gutenberg-block.php

    r2789121 r2821867  
    33defined( 'ABSPATH' ) || exit;
    44
     5
     6
     7
    58class Filterable_Portfolio_Gutenberg_Block {
    69    /**
     
    2629    }
    2730
     31
     32
     33
     34
     35
    2836    public function register_block_type() {
    2937        wp_register_script(
     
    4452                'showFilter'        => [ 'type' => 'boolean', 'default' => true ],
    4553                'filterBy'          => [ 'type' => 'string', 'default' => 'categories' ],
     54
     55
     56
     57
     58
     59
     60
     61
    4662                'limit'             => [
    4763                    'type'    => 'number',
     
    6581
    6682    /**
     83
     84
    6785     * @param array $attributes The block attributes.
    6886     * @param string $content The block content.
     
    102120        }
    103121
     122
     123
     124
     125
     126
    104127        return Filterable_Portfolio_Shortcode::init()->shortcode( $args );
    105128    }
    106129
     130
     131
     132
     133
     134
     135
     136
     137
    107138    public function get_responsive_class( $attributes, $name ) {
    108139        $prefixes = [
  • filterable-portfolio/trunk/includes/class-filterable-portfolio-helper.php

    r2789121 r2821867  
    100100            'post_status'    => 'publish',
    101101            'posts_per_page' => intval( $options['posts_per_page'] ),
    102             'orderby'        => $options['orderby'],
    103             'order'          => $options['order'],
     102            'orderby'        => $options['orderby'],
     103            'order'          => $options['order'],
    104104        );
    105105
     
    458458        if ( $prepend_lorem_text ) {
    459459            $out = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, ' .
    460                    'sed do eiusmod tempor incididunt ut labore et dolore magna ' .
    461                    'aliqua.';
     460               'sed do eiusmod tempor incididunt ut labore et dolore magna ' .
     461               'aliqua.';
    462462        }
    463463        $rnd       = explode( ' ',
     
    541541    }
    542542
     543
     544
     545
     546
     547
     548
     549
     550
     551
    543552    public static function load_template( $template, $require_once = true, $args = [] ) {
    544553        $located = FILTERABLE_PORTFOLIO_TEMPLATES . '/' . $template;
  • filterable-portfolio/trunk/includes/class-filterable-portfolio-shapla-theme.php

    r2789121 r2821867  
    9393            }
    9494
    95             return $single_template;
     95            return ;
    9696        }
    9797
     
    124124            }
    125125
    126             // Load default archive template
    127             return FILTERABLE_PORTFOLIO_TEMPLATES . '/archive-portfolio.php';
     126            // Load default archive template.
     127            return apply_filters(
     128                'filterable_portfolio/archive_template',
     129                FILTERABLE_PORTFOLIO_TEMPLATES . '/archive-portfolio.php'
     130            );
    128131        }
    129132
  • filterable-portfolio/trunk/includes/class-filterable-portfolio-shortcode.php

    r2789121 r2821867  
    4646                'buttons_alignment'  => Filterable_Portfolio_Helper::get_option( 'filter_buttons_alignment', 'end' ),
    4747                'per_page'           => Filterable_Portfolio_Helper::get_option( 'posts_per_page', 100 ),
     48
     49
    4850            ], $attributes, 'filterable_portfolio' );
    4951
    5052            wp_enqueue_script( 'filterable-portfolio' );
    5153
    52             $args = [];
     54            $args = [
     55                'orderby' => $attributes['orderby'],
     56                'order'   => $attributes['order'],
     57            ];
    5358
    5459            if ( isset( $attributes['per_page'] ) && is_numeric( $attributes['per_page'] ) ) {
  • filterable-portfolio/trunk/includes/class-filterable-portfolio-single-post.php

    r2746801 r2821867  
    4747        public function post_thumbnail_html( $html ) {
    4848            if ( Filterable_Portfolio_Helper::is_single_portfolio() ) {
     49
     50
     51
    4952
    5053                if ( Filterable_Portfolio_Helper::has_single_template() || Filterable_Portfolio_Helper::is_shapla_theme_activate() ) {
     
    6972        public function portfolio_content( $content ) {
    7073            if ( Filterable_Portfolio_Helper::is_single_portfolio() ) {
     74
     75
     76
    7177
    7278                if ( Filterable_Portfolio_Helper::has_single_template() || Filterable_Portfolio_Helper::is_shapla_theme_activate() ) {
  • filterable-portfolio/trunk/readme.txt

    r2789121 r2821867  
    55Tested up to: 6.1
    66Requires PHP: 7.0
    7 Stable tag: 1.6.2
     7Stable tag: 1.6.
    88License: GPLv3
    99License URI: https://www.gnu.org/licenses/gpl-3.0.txt
     
    104104
    105105== Changelog ==
     106
     107
     108
     109
    106110
    107111= version 1.6.2 - 2022-09-23 =
Note: See TracChangeset for help on using the changeset viewer.