2&&void 0!==arguments[2]?arguments[2]:/ +/g,o=new RegExp(t.replace(n,"\\$&").replace(a,"|")),i=e.match(o),r=!!i,c=[];if(r)for(var l=0,p=i.length;l=E;z-=1){var q=z-1,A=n[e.charAt(q)];if(A&&(w[q]=1),M[z]=(M[z+1]<<1|1)&A,0!==I&&(M[z]|=(C[z+1]|C[z])<<1|1|C[z+1]),M[z]&R&&(D=a(t,{errors:I,currentLocation:q,expectedLocation:y,distance:p}))<=_){if(_=D,(v=q)<=y)break;E=Math.max(1,2*y-v)}}if(a(t,{errors:I+1,currentLocation:y,expectedLocation:y,distance:p})>_)break;C=M}var H={isMatch:v>=0,score:0===D?.001:D};return h&&(H.matchedIndices=o(w,b)),H}},function(e,t){e.exports=function(e,t){var n=t.errors,a=void 0===n?0:n,o=t.currentLocation,i=void 0===o?0:o,r=t.expectedLocation,c=void 0===r?0:r,l=t.distance,p=void 0===l?100:l,s=a/e.length,d=Math.abs(c-i);return p?s+d/p:d?1:s}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],a=-1,o=-1,i=0,r=e.length;i=t&&n.push([a,o]),a=-1)}return e[i-1]&&i-a>=t&&n.push([a,i-1]),n}},function(e,t){e.exports=function(e){for(var t={},n=e.length,a=0;a .gb-inside-container > .block-editor-inner-blocks > .block-editor-block-list__layout",{"justify-content":l}),"generateblocks.editor.tabletCSS"===Object(c.currentFilter)()&&o(e,".gb-container-"+i+".inline-post-meta-area > .gb-inside-container > .block-editor-inner-blocks > .block-editor-block-list__layout",{"justify-content":p}),"generateblocks.editor.mobileCSS"===Object(c.currentFilter)()&&o(e,".gb-container-"+i+".inline-post-meta-area > .gb-inside-container > .block-editor-inner-blocks > .block-editor-block-list__layout",{"justify-content":s})),e}Object(c.addFilter)("blocks.registerBlockType","gp-premium/dynamic-container/add-attributes",(function(e){return d.includes(e.name)?(void 0!==e.attributes&&(e.attributes=Object.assign(e.attributes,{gpDynamicImageBg:{type:"string",default:""},gpUseFallbackImageBg:{type:"boolean",default:!1},gpDynamicImageCustomField:{type:"string",default:""},gpInlinePostMeta:{type:"boolean",default:!1},gpInlinePostMetaJustify:{type:"string",default:""},gpInlinePostMetaJustifyTablet:{type:"string",default:""},gpInlinePostMetaJustifyMobile:{type:"string",default:""},gpDynamicLinkType:{type:"string",default:""},gpDynamicLinkCustomField:{type:"string",default:""},gpDynamicSource:{type:"string",default:"current-post"},gpRemoveContainerCondition:{type:"string",default:""},gpRemoveContainerConditionPostMeta:{type:"string",default:""},gpAdjacentPostInSameTerm:{type:"boolean",default:!1},gpAdjacentPostInSameTermTax:{type:"string",default:"category"}})),e):e})),Object(c.addFilter)("generateblocks.editor.controls","gp-premium/dynamic-container/add-container-controls",(function(e,t,n,o){if(!gpPremiumBlockElements.isBlockElement)return e;if("containerLayout"!==t&&"containerGridLayout"!==t)return e;var i=function(){var e="Desktop";return void 0!==n.deviceType&&n.deviceType?e=n.deviceType:void 0!==o.selectedDevice&&o.selectedDevice&&(e=o.selectedDevice),e},c=n.attributes,p=n.setAttributes,s=c.gpInlinePostMeta,d=c.gpInlinePostMetaJustify,g=c.gpInlinePostMetaJustifyTablet,u=c.gpInlinePostMetaJustifyMobile,m=c.gpRemoveContainerCondition,b=c.gpRemoveContainerConditionPostMeta,f=c.gpAdjacentPostInSameTerm,h=c.gpAdjacentPostInSameTermTax,y=wp.data.select("core/editor").getEditedPostAttribute("meta"),x=[{label:Object(r.__)("Choose…","gp-premium"),value:"self"},{label:Object(r.__)("No featured image","gp-premium"),value:"no-featured-image"},{label:Object(r.__)("No post meta","gp-premium"),value:"no-post-meta"}];return"post-navigation-template"===y._generate_block_type&&(x.push({label:Object(r.__)("No next post","gp-premium"),value:"no-next-post"}),x.push({label:Object(r.__)("No previous post","gp-premium"),value:"no-previous-post"})),Object(a.createElement)(a.Fragment,null,"Desktop"===i()&&Object(a.createElement)(l.ToggleControl,{label:Object(r.__)("Inline post meta items","gp-premium"),checked:!!s,onChange:function(e){p({gpInlinePostMeta:e})}}),!!s&&Object(a.createElement)(a.Fragment,null,"Desktop"===i()&&Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Inline alignment","gp-premium"),value:d,options:[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Left","gp-premium"),value:"flex-start"},{label:Object(r.__)("Center","gp-premium"),value:"center"},{label:Object(r.__)("Right","gp-premium"),value:"flex-end"},{label:Object(r.__)("Space between","gp-premium"),value:"space-between"}],onChange:function(e){p({gpInlinePostMetaJustify:e})}}),"Tablet"===i()&&Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Inline alignment","gp-premium"),value:g,options:[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Left","gp-premium"),value:"flex-start"},{label:Object(r.__)("Center","gp-premium"),value:"center"},{label:Object(r.__)("Right","gp-premium"),value:"flex-end"},{label:Object(r.__)("Space between","gp-premium"),value:"space-between"}],onChange:function(e){p({gpInlinePostMetaJustifyTablet:e})}}),"Mobile"===i()&&Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Inline alignment","gp-premium"),value:u,options:[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Left","gp-premium"),value:"flex-start"},{label:Object(r.__)("Center","gp-premium"),value:"center"},{label:Object(r.__)("Right","gp-premium"),value:"flex-end"},{label:Object(r.__)("Space between","gp-premium"),value:"space-between"}],onChange:function(e){p({gpInlinePostMetaJustifyMobile:e})}})),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Remove container condition","gp-premium"),value:m,options:x,onChange:function(e){p({gpRemoveContainerCondition:e})}}),"no-post-meta"===m&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Meta field name","gp-premium"),type:"text",value:b,onChange:function(e){p({gpRemoveContainerConditionPostMeta:e})}}),("no-next-post"===m||"no-previous-post"===m)&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.ToggleControl,{label:Object(r.__)("In same term","gp-premium"),help:Object(r.__)("Check for posts with the same term as the current post.","gp-premim"),checked:!!f,onChange:function(e){p({gpAdjacentPostInSameTerm:e})}}),!!f&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Taxonomy","gp-premium"),help:Object(r.__)("The taxonomy to check if in the same term.","gp-premim"),type:"text",value:h,onChange:function(e){p({gpAdjacentPostInSameTermTax:e})}}))),e)})),Object(c.addFilter)("editor.BlockEdit","gp-premium/dynamic-container/toolbar",g),Object(c.addFilter)("generateblocks.frontend.htmlAttributes","gp-premium/dynamic-container/add-html-attributes",(function(e,t,n){return"generateblocks/container"!==t||n.gpInlinePostMeta&&(e=Object.assign(e,{className:e.className+" inline-post-meta-area"})),e})),Object(c.addFilter)("generateblocks.editor.mainCSS","gp-premium/dynamic-container/add-main-css",u),Object(c.addFilter)("generateblocks.editor.tabletCSS","gp-premium/dynamic-container/add-tablet-css",u),Object(c.addFilter)("generateblocks.editor.mobileCSS","gp-premium/dynamic-container/add-mobile-css",u);var m=n(23),b=n.n(m),f=n(6),h=n.n(f),y=n(7),x=n.n(y),_=n(11),v=n.n(_),k=n(8),w=n.n(k),T=n(9),O=n.n(T),j=n(4),C=n.n(j);var D=function(e){w()(o,e);var t,n,a=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=C()(t);if(n){var o=C()(this).constructor;e=Reflect.construct(a,arguments,o)}else e=a.apply(this,arguments);return O()(this,e)});function o(){var e;return h()(this,o),(e=a.apply(this,arguments)).wrapElement=e.wrapElement.bind(v()(e)),e}return x()(o,[{key:"componentDidMount",value:function(){if(this.props.attributes.gpDynamicTextType&&"generateblocks/headline"===this.props.name){var e=document.querySelector(".gb-headline-"+this.props.attributes.uniqueId+" .rich-text");e&&""!==this.props.attributes.gpDynamicTextType&&this.props.attributes.gpDynamicLinkType&&!this.props.attributes.removeText&&this.wrapElement(e)}}},{key:"componentDidUpdate",value:function(){if(this.props.attributes.gpDynamicTextType){var e=this.props.attributes.content;"generateblocks/button"===this.props.name&&(e=this.props.attributes.text),e!==this.props.attributes.gpDynamicTextReplace&&this.props.setAttributes({gpDynamicTextReplace:e})}if(this.props.attributes.gpDynamicTextType&&"generateblocks/headline"===this.props.name){var t=document.querySelector(".gb-headline-"+this.props.attributes.uniqueId+" .rich-text");if(t){var n=t.parentNode;if(n){var a=n.classList.contains("gblocks-faux-headline-link");""!==this.props.attributes.gpDynamicTextType?(a&&!this.props.attributes.gpDynamicLinkType&&n.replaceWith.apply(n,b()(n.childNodes)),a||!this.props.attributes.gpDynamicLinkType||this.props.isSelected||this.wrapElement(t)):a&&n.replaceWith.apply(n,b()(n.childNodes)),(this.props.attributes.removeText||a&&this.props.isSelected)&&n.replaceWith.apply(n,b()(n.childNodes))}}}}},{key:"wrapElement",value:function(e){var t=document.createElement("a");t.classList.add("gblocks-faux-headline-link"),e.parentNode.insertBefore(t,e),t.appendChild(e)}},{key:"render",value:function(){return null}}]),o}(a.Component);var S=function(e){w()(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=C()(t);if(n){var o=C()(this).constructor;e=Reflect.construct(a,arguments,o)}else e=a.apply(this,arguments);return O()(this,e)});function i(){return h()(this,i),o.apply(this,arguments)}return x()(i,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,o=e.name,i=t.gpDynamicTextType,c=t.gpDynamicSource,p=t.gpDynamicTextReplace,s=t.gpDynamicTextTaxonomy,d=t.gpDynamicTextTaxonomySeparator,g=t.gpDynamicTextCustomField,u=t.gpDynamicTextBefore,m=t.gpDynamicDateUpdated,b=t.gpDynamicNoCommentsText,f=t.gpDynamicSingleCommentText,h=t.gpDynamicMultipleCommentsText,y=t.gpDynamicLinkType,x=t.gpDynamicLinkCustomField,_=t.gpDynamicSourceInSameTerm,v=t.gpDynamicSourceInSameTermTaxonomy,k=t.className,w=t.gpDynamicDateType,T=t.gpDynamicUpdatedDateBefore,O=[{label:Object(r.__)("Choose…","gp-premium"),value:""}],j=gpPremiumBlockElements.taxonomies;j&&Object.keys(j).forEach((function(e){O.push({label:j[e],value:j[e]})}));var C=[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Single post","gp-premium"),value:"single-post"},{label:Object(r.__)("Author archives","gp-premium"),value:"author-archives"},{label:Object(r.__)("Comments area","gp-premium"),value:"comments"},{label:Object(r.__)("Next page of posts","gp-premium"),value:"next-posts"},{label:Object(r.__)("Previous page of posts","gp-premium"),value:"previous-posts"},{label:Object(r.__)("Post meta","gp-premium"),value:"post-meta"},{label:Object(r.__)("Author meta","gp-premium"),value:"user-meta"},{label:Object(r.__)("Term meta","gp-premium"),value:"term-meta"}];"terms"===i&&(C=[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Term archives","gp-premium"),value:"term-archives"}]),"generateblocks/headline"!==o||i||(C=[]);var D=!!i||!!y;"post-navigation-template"!==wp.data.select("core/editor").getEditedPostAttribute("meta")._generate_block_type&&(D=!1),"next-posts"!==y&&"previous-posts"!==y||(D=!1);var S=Object(r.__)("Before text","gp-premim");return"post-date"===i&&m&&"published-date"===w&&(S=Object(r.__)("Published date before text","gp-premium")),Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Dynamic text type","gp-premium"),value:i,options:[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Title","gp-premium"),value:"title"},{label:Object(r.__)("Post date","gp-premium"),value:"post-date"},{label:Object(r.__)("Post author name","gp-premium"),value:"post-author"},{label:Object(r.__)("List of terms","gp-premium"),value:"terms"},{label:Object(r.__)("Comments number","gp-premium"),value:"comments-number"},{label:Object(r.__)("Post meta","gp-premium"),value:"post-meta"},{label:Object(r.__)("Term meta","gp-premium"),value:"term-meta"},{label:Object(r.__)("Author meta","gp-premium"),value:"user-meta"}],onChange:function(e){n({gpDynamicTextType:e});var t=[];k&&(t=k.split(" "));var a=["dynamic-term-class"];if(t=t.filter((function(e){return!a.includes(e)})),"terms"===e&&t.push("dynamic-term-class"),t.length>0?n({className:t.join(" ")}):n({className:""}),"generateblocks/headline"===o){var i=Object(r.__)("Hello World","gp-premium");"post-date"===e?i=Object(r.__)("Post date","gp-premium"):"post-author"===e?i=Object(r.__)("Post author name","gp-premium"):"terms"===e?i=Object(r.__)("Terms","gp-premium"):"comments-number"===e?i=Object(r.__)("Comments number","gp-premium"):"post-meta"===e?i=Object(r.__)("Post meta","gp-premium"):"user-meta"===e?i=Object(r.__)("User meta","gp-premium"):"term-meta"===e&&(i=Object(r.__)("Term meta","gp-premium")),n({content:i})}}}),""!==i&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.TextControl,{className:"gpp-blocks-dynamic-text-replace-field",type:"text",value:p}),"post-date"===i&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Date type","gp-premium"),value:w,options:[{label:Object(r.__)("Published date","gp-premim"),value:"published-date"},{label:Object(r.__)("Updated date","gp-premium"),value:"updated-date"}],onChange:function(e){n({gpDynamicDateType:e,gpDynamicTextBefore:"",gpDynamicUpdatedDateBefore:""})}}),"published-date"===w&&Object(a.createElement)(l.ToggleControl,{label:Object(r.__)("Replace with updated date","gp-premium"),checked:!!m,onChange:function(e){n({gpDynamicDateUpdated:e})}})),"terms"===i&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Taxonomy","gp-premium"),value:s,options:O,onChange:function(e){n({gpDynamicTextTaxonomy:e})}}),"generateblocks/headline"===o&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.TextControl,{label:Object(r.__)("Term separator","gp-premium"),type:"text",value:d,onChange:function(e){n({gpDynamicTextTaxonomySeparator:e})}}))),"comments-number"===i&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.TextControl,{label:Object(r.__)("No comments text","gp-premium"),type:"text",value:b,onChange:function(e){n({gpDynamicNoCommentsText:e})}}),Object(a.createElement)(l.TextControl,{label:Object(r.__)("Singular comments text","gp-premium"),type:"text",value:f,onChange:function(e){n({gpDynamicSingleCommentText:e})}}),Object(a.createElement)(l.TextControl,{label:Object(r.__)("Plural comments text","gp-premium"),help:Object(r.__)("Use % in place of the number of comments","gp-premium"),type:"text",value:h,onChange:function(e){n({gpDynamicMultipleCommentsText:e})}})),("post-meta"===i||"term-meta"===i||"user-meta"===i)&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Meta field name","gp-premium"),type:"text",value:g,onChange:function(e){n({gpDynamicTextCustomField:e})}}),"generateblocks/headline"===o&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.TextControl,{label:S,type:"text",value:u,onChange:function(e){n({gpDynamicTextBefore:e})}}),"post-date"===i&&!!m&&"published-date"===w&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Updated date before text","gp-premium"),type:"text",value:T,onChange:function(e){n({gpDynamicUpdatedDateBefore:e})}}))),C.length>1&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Dynamic link type","gp-premium"),value:y,options:C,onChange:function(e){"generateblocks/button"===o&&n(e?{gpDynamicLinkType:e,hasUrl:!0,url:"#"}:{gpDynamicLinkType:e,hasUrl:!1,url:""}),"generateblocks/headline"===o&&n({gpDynamicLinkType:e})}}),("post-meta"===y||"term-meta"===y||"user-meta"===y)&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Meta field name","gp-premium"),type:"text",value:x,onChange:function(e){n({gpDynamicLinkCustomField:e})}})),D&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Source","gp-premium"),value:c,options:[{label:Object(r.__)("Current post","gp-premium"),value:"current-post"},{label:Object(r.__)("Next post","gp-premium"),value:"next-post"},{label:Object(r.__)("Previous post","gp-premium"),value:"previous-post"}],onChange:function(e){n({gpDynamicSource:e})}}),("next-post"===c||"previous-post"===c)&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.ToggleControl,{label:Object(r.__)("In same term","gp-premium"),help:Object(r.__)("Check for posts with the same term as the current post.","gp-premim"),checked:!!_,onChange:function(e){n({gpDynamicSourceInSameTerm:e})}}),!!_&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Taxonomy","gp-premium"),help:Object(r.__)("The taxonomy to check if in the same term.","gp-premim"),type:"text",value:v,onChange:function(e){n({gpDynamicSourceInSameTermTaxonomy:e})}}))))}}]),i}(a.Component),R=(n(41),["generateblocks/headline","generateblocks/button"]),I=Object(p.createHigherOrderComponent)((function(e){return function(t){return R.includes(t.name)?Object(a.createElement)(a.Fragment,null,Object(a.createElement)(D,t),Object(a.createElement)(e,t)):Object(a.createElement)(e,t)}}),"withClientIdClassName"),L=Object(p.createHigherOrderComponent)((function(e){return function(t){var n=t.name,o=t.attributes,c=t.isSelected,p=o.gpDynamicTextType,d=o.gpDynamicLinkType;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(e,t),c&&R.includes(n)&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(s.BlockControls,null,Object(a.createElement)(l.ToolbarGroup,null,Object(a.createElement)(l.Dropdown,{contentClassName:"gpp-dynamic-headline-text-dropdown",popoverProps:{className:"block-editor-block-settings-menu__popover",position:"bottom right"},renderToggle:function(e){var t=e.isOpen,n=e.onToggle;return Object(a.createElement)(l.ToolbarButton,{icon:i("dynamic"),label:Object(r.__)("Dynamic options","gp-premium"),onClick:n,"aria-expanded":t,isPressed:!!p||!!d})},renderContent:function(){return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(S,t))}})))))}}),"addDynamicHeadlineTextToolbar");function B(e,t){return!(void 0===t.attributes.gpDynamicTextType||!t.attributes.gpDynamicTextType)||e}Object(c.addFilter)("blocks.registerBlockType","gp-premium/dynamic-text/add-attributes",(function(e){return R.includes(e.name)?(void 0!==e.attributes&&(e.attributes=Object.assign(e.attributes,{gpDynamicTextType:{type:"string",default:""},gpDynamicLinkType:{type:"string",default:""},gpDynamicTextReplace:{type:"string",default:""},gpDynamicSource:{type:"string",default:"current-post"},gpDynamicSourceInSameTerm:{type:"boolean",default:!1},gpDynamicSourceInSameTermTaxonomy:{type:"string",default:"category"},gpDynamicTextTaxonomy:{type:"string",default:""},gpDynamicTextTaxonomySeparator:{type:"string",default:", "},gpDynamicTextCustomField:{type:"string",default:""},gpDynamicTextBefore:{type:"string",default:""},gpDynamicUpdatedDateBefore:{type:"string",default:""},gpDynamicDateUpdated:{type:"boolean",default:!1},gpDynamicNoCommentsText:{type:"string",default:Object(r.__)("No Comments","gp-premium")},gpDynamicSingleCommentText:{type:"string",default:Object(r.__)("1 Comment","gp-premium")},gpDynamicMultipleCommentsText:{type:"string",default:Object(r.__)("% Comments","gp-premium")},gpDynamicLinkCustomField:{type:"string",default:""},gpDynamicDateType:{type:"string",default:"published-date"}})),e):e})),Object(c.addFilter)("editor.BlockListBlock","my-plugin/with-client-id-class-name",I),Object(c.addFilter)("editor.BlockEdit","gp-premium/dynamic-headline/toolbar",L),Object(c.addFilter)("generateblocks.editor.headlineDisableFormatting","gp-premium/dynamic-headline/disable-headline-formatting",B),Object(c.addFilter)("generateblocks.editor.buttonDisableFormatting","gp-premium/dynamic-headline/disable-button-formatting",B),Object(c.addFilter)("generateblocks.editor.mainCSS","gp-premium/dynamic-headline/headline-css",(function(e,t,n){if(!["headline"].includes(n))return e;var a=t.attributes,i=a.uniqueId,r=a.gpDynamicTextBefore;return a.gpDynamicTextType&&r&&o(e,".gb-headline-"+i+" .gb-headline-text:before, .gb-headline-"+i+".gb-headline-text:before",{content:'"'+r+'"'}),e})),n(42);var E=n(33),P=n.n(E);var M=function(e){w()(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=C()(t);if(n){var o=C()(this).constructor;e=Reflect.construct(a,arguments,o)}else e=a.apply(this,arguments);return O()(this,e)});function i(){return h()(this,i),o.apply(this,arguments)}return x()(i,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,o=t.contentType,i=t.excerptLength,c=t.useThemeMoreLink,p=t.customMoreLink;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(s.InspectorControls,null,Object(a.createElement)(l.PanelBody,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Type","gp-premium"),value:o,options:[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Post content","gp-premium"),value:"post-content"},{label:Object(r.__)("Post excerpt","gp-premium"),value:"post-excerpt"},{label:Object(r.__)("Term description","gp-premium"),value:"term-description"},{label:Object(r.__)("Author description","gp-premium"),value:"author-description"}],onChange:function(e){n({contentType:e})}}),"post-excerpt"===o&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.TextControl,{label:Object(r.__)("Excerpt length","gp-premium"),type:"number",value:i||"",placeholder:gpPremiumBlockElements.excerptLength,onChange:function(e){n({excerptLength:e})},onBlur:function(){n({excerptLength:parseInt(i)})},onClick:function(e){e.currentTarget.focus()}}),Object(a.createElement)(l.ToggleControl,{label:Object(r.__)("Use theme more link","gp-premium"),type:"number",checked:!!c,onChange:function(e){n({useThemeMoreLink:e})}}),!c&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Custom more link","gp-premium"),type:"text",value:p||"",onChange:function(e){n({customMoreLink:e})}})))),!o&&Object(a.createElement)(l.Placeholder,{label:Object(r.__)("Dynamic content","gp-premium"),instructions:Object(r.__)("Choose your dynamic content type.","gp-premium")},Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Type","gp-premium"),value:o,options:[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Post content","gp-premium"),value:"post-content"},{label:Object(r.__)("Post excerpt","gp-premium"),value:"post-excerpt"},{label:Object(r.__)("Term description","gp-premium"),value:"term-description"},{label:Object(r.__)("Author description","gp-premium"),value:"author-description"}],onChange:function(e){n({contentType:e})}})),"post-content"===o&&Object(a.createElement)("div",{className:"gb-entry-content"},Object(a.createElement)("p",null,Object(r.__)("This is a placeholder for your content.","gp-premium")),Object(a.createElement)("p",null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pulvinar ligula augue, quis bibendum tellus scelerisque venenatis. Pellentesque porta nisi mi. In hac habitasse platea dictumst. Etiam risus elit, molestie non volutpat ac, pellentesque sed eros. Nunc leo odio, sodales non tortor at, porttitor posuere dui.")),"post-excerpt"===o&&Object(a.createElement)("div",null,Object(a.createElement)(P.a,{block:"generatepress/dynamic-content",attributes:t})),("author-description"===o||"term-description"===o)&&Object(a.createElement)("div",{className:"gb-description"},Object(a.createElement)("p",null,Object(r.__)("This is a placeholder for your description.","gp-premium")),Object(a.createElement)("p",null,"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pulvinar ligula augue, quis bibendum tellus scelerisque venenatis. Pellentesque porta nisi mi. In hac habitasse platea dictumst. Etiam risus elit, molestie non volutpat ac, pellentesque sed eros. Nunc leo odio, sodales non tortor at, porttitor posuere dui.")))}}]),i}(a.Component),z=n(17);Object(z.registerBlockType)("generatepress/dynamic-content",{title:Object(r.__)("Dynamic Content","gp-premium"),description:Object(r.__)("Displays dynamic content based on your chosen source.","gp-premium"),icon:i("generatepress"),category:"generatepress",keywords:[Object(r.__)("content"),Object(r.__)("dynamic content"),Object(r.__)("gp"),Object(r.__)("generate")],supports:{anchor:!1,className:!1,customClassName:!1},attributes:{contentType:{type:"string",default:""},excerptLength:{type:"number",default:gpPremiumBlockElements.excerptLength},useThemeMoreLink:{type:"boolean",default:!0},customMoreLink:{type:"string",default:""}},edit:M,save:function(){return null}}),n(43);var q=n(34),A=n.n(q);var H=function(e){w()(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=C()(t);if(n){var o=C()(this).constructor;e=Reflect.construct(a,arguments,o)}else e=a.apply(this,arguments);return O()(this,e)});function i(){return h()(this,i),o.apply(this,arguments)}return x()(i,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,o=t.imageSize,i=t.imageType,c=t.imageSource,p=t.customField,d=t.linkTo,g=t.linkToCustomField,u=t.imageWidth,m=t.imageHeight,b=t.avatarSize,f=t.avatarRounded,h=t.gpDynamicSourceInSameTerm,y=t.gpDynamicSourceInSameTermTaxonomy,x=[];Object.keys(gpPremiumBlockElements.imageSizes).forEach((function(e){x.push({label:gpPremiumBlockElements.imageSizes[e],value:gpPremiumBlockElements.imageSizes[e]})}));var _=gpPremiumBlockElements.imageSizeDimensions,v=u,k=m;v||void 0!==_[o]&&_[o].width&&(v=_[o].width),k||void 0!==_[o]&&_[o].height&&(k=_[o].height);var w=gpPremiumBlockElements.featuredImagePlaceholder;"author-avatar"!==i&&v!==k||(w=gpPremiumBlockElements.authorImagePlaceholder);var T=wp.data.select("core/editor").getEditedPostAttribute("meta");return Object(a.createElement)(a.Fragment,null,Object(a.createElement)(s.InspectorControls,null,Object(a.createElement)(l.PanelBody,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Type","gp-premium"),value:i,options:[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Featured image","gp-premium"),value:"featured-image"},{label:Object(r.__)("Author avatar","gp-premium"),value:"author-avatar"},{label:Object(r.__)("Post meta","gp-premium"),value:"post-meta"}],onChange:function(e){n({imageType:e})}}),("featured-image"===i||"post-meta"===i)&&Object(a.createElement)(a.Fragment,null,"post-meta"===i&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Meta field name","gp-premium"),type:"text",value:p,onChange:function(e){n({customField:e})}}),"post-navigation-template"===T._generate_block_type&&Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Source","gp-premium"),value:c,options:[{label:Object(r.__)("Current post","gp-premium"),value:"current-post"},{label:Object(r.__)("Next post","gp-premium"),value:"next-post"},{label:Object(r.__)("Previous post","gp-premium"),value:"previous-post"}],onChange:function(e){n({imageSource:e})}}),("next-post"===c||"previous-post"===c)&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.ToggleControl,{label:Object(r.__)("In same term","gp-premium"),help:Object(r.__)("Check for posts with the same term as the current post.","gp-premim"),checked:!!h,onChange:function(e){n({gpDynamicSourceInSameTerm:e})}}),!!h&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Taxonomy","gp-premium"),help:Object(r.__)("The taxonomy to check if in the same term.","gp-premim"),type:"text",value:y,onChange:function(e){n({gpDynamicSourceInSameTermTaxonomy:e})}})),Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Image size","gp-premium"),value:o,options:x,onChange:function(e){n({imageSize:e})}}),Object(a.createElement)(l.TextControl,{label:Object(r.__)("Image width","gp-premium"),type:"number",value:u||"",placeholder:v,onChange:function(e){n({imageWidth:e})},onBlur:function(){u&&n({imageWidth:parseInt(u)})},onClick:function(e){e.currentTarget.focus()}}),Object(a.createElement)(l.TextControl,{label:Object(r.__)("Image height","gp-premium"),type:"number",value:m||"",placeholder:k,onChange:function(e){n({imageHeight:e})},onBlur:function(){m&&n({imageHeight:parseInt(m)})},onClick:function(e){e.currentTarget.focus()}}),Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Link to","gp-premium"),value:d,options:[{label:Object(r.__)("None","gp-premium"),value:""},{label:Object(r.__)("Single post","gp-premium"),value:"single-post"},{label:Object(r.__)("Custom field","gp-premium"),value:"custom-field"}],onChange:function(e){n({linkTo:e})}}),"custom-field"===d&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Custom field name","gp-premium"),type:"text",value:g,onChange:function(e){n({linkToCustomField:e})}})),"author-avatar"===i&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.TextControl,{label:Object(r.__)("Image size","gp-premium"),type:"number",value:b||"",onChange:function(e){n({avatarSize:parseInt(e)})}}),Object(a.createElement)(l.ToggleControl,{label:Object(r.__)("Make image rounded","gp-premium"),checked:!!f,onChange:function(e){n({avatarRounded:e})}})))),!i&&Object(a.createElement)(l.Placeholder,{label:Object(r.__)("Dynamic image","gp-premium"),instructions:Object(r.__)("Choose your dynamic image type.","gp-premium")},Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Type","gp-premium"),value:i,options:[{label:Object(r.__)("Choose…","gp-premium"),value:""},{label:Object(r.__)("Featured image","gp-premium"),value:"featured-image"},{label:Object(r.__)("Author avatar","gp-premium"),value:"author-avatar"},{label:Object(r.__)("Post meta","gp-premium"),value:"post-meta"}],onChange:function(e){n({imageType:e})}})),Object(a.createElement)("div",{className:"gpp-dynamic-image-preview"},Object(a.createElement)(a.Fragment,null,("featured-image"===i||"post-meta"===i)&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"components-gpp-dynamic-image-placeholder__label"},Object(a.createElement)(l.Icon,{icon:"format-image"})),Object(a.createElement)("img",{src:w,className:"dynamic-featured-image gpp-dynamic-image-placeholder",width:v||"",height:k||"",alt:Object(r.__)("Dynamic image placeholder","gp-premium")})),"author-avatar"===i&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)("div",{className:"components-gpp-dynamic-image-placeholder__label"},Object(a.createElement)(l.Icon,{icon:"admin-users"})),Object(a.createElement)("img",{src:w,className:A()({"dynamic-author-image":!0,"gpp-dynamic-image-placeholder":!0,"dynamic-author-image-rounded":!!f}),width:b||null,height:b||null,alt:Object(r.__)("Dynamic image placeholder","gp-premium")})))))}}]),i}(a.Component);Object(z.registerBlockType)("generatepress/dynamic-image",{title:Object(r.__)("Dynamic Image","gp-premium"),description:Object(r.__)("Displays a dynamic image from your chosen source.","gp-premium"),icon:i("generatepress"),category:"generatepress",keywords:[Object(r.__)("image"),Object(r.__)("dynamic image"),Object(r.__)("gp"),Object(r.__)("generate")],supports:{anchor:!1,className:!1,customClassName:!1},attributes:{imageType:{type:"string",default:""},imageSource:{type:"string",default:"current-post"},customField:{type:"string",default:""},gpDynamicSourceInSameTerm:{type:"boolean",default:!1},gpDynamicSourceInSameTermTaxonomy:{type:"string",default:"category"},imageSize:{type:"string",default:"full"},linkTo:{type:"string",default:""},linkToCustomField:{type:"string",default:""},imageWidth:{type:"number",default:null},imageHeight:{type:"number",default:null},avatarSize:{type:"number",default:30},avatarRounded:{type:"boolean",default:!1}},edit:H,save:function(){return null}});var N=n(35),U=n.n(N),F=n(15),G=n.n(F),W=n(36),V=n.n(W);n(44);var J=function(e){w()(i,e);var t,n,o=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=C()(t);if(n){var o=C()(this).constructor;e=Reflect.construct(a,arguments,o)}else e=a.apply(this,arguments);return O()(this,e)});function i(){return h()(this,i),o.apply(this,arguments)}return x()(i,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.value,o=e.onClick,i=e.units;return Object(a.createElement)("div",{className:"components-generatepress-units-control-header__units"},Object(a.createElement)("div",{className:"components-generatepress-units-control-label__units"},t),Object(a.createElement)("div",{className:"components-generatepress-control__units"},Object(a.createElement)(l.ButtonGroup,{className:"components-generatepress-control-buttons__units","aria-label":Object(r.__)("Select Units","gp-premium")},i.map((function(e){var t=e;return"px"===e&&(t=Object(r._x)("Pixel","A size unit for CSS markup","gp-premium")),"em"===e&&(t=Object(r._x)("Em","A size unit for CSS markup","gp-premium")),"%"===e&&(t=Object(r._x)("Percentage","A size unit for CSS markup","gp-premium")),"deg"===e&&(t=Object(r._x)("Degree","A size unit for CSS markup","gp-premium")),Object(a.createElement)(l.Tooltip
+/* translators: Unit type (px, em, %) */,{text:Object(r.sprintf)(Object(r.__)("%s Units","gp-premium"),t),key:e},Object(a.createElement)(l.Button,{key:e,className:"components-generatepress-control-button__units--"+e,isSmall:!0,isPrimary:n===e,"aria-pressed":n===e
+/* translators: %s: values associated with CSS syntax, 'Pixel', 'Em', 'Percentage' */,"aria-label":Object(r.sprintf)(Object(r.__)("%s Units","gp-premium"),t),onClick:function(){return o(e)}},e))})))))}}]),i}(a.Component),K=n(3),Y=n.n(K);function $(e,t){const{key:n,options:a}=t,o=a.length-1;let i="ArrowDown"===n?e+1:e-1;i<0?i=o:i>o&&(i=0);const r=a[i];return r&&r.disabled?$(i,{key:n,options:a}):i}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function X(e){for(var t=1;tt.find(t=>t.value===e)):t.find(t=>t.value===e)||null}function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function oe(e){for(var t=1;t{}),getOptions:c=null,allowEmpty:l=!0,closeOnSelect:p=!0,closable:s=!0}){const d=Object(K.useRef)(null),g=Object(K.useMemo)(()=>function(e){if(!Array.isArray(e))return[];const t=[];return e.forEach((e,n)=>{if("type"in e&&"group"===e.type){const a=e.name.replace(/\s+/g,"-").toLowerCase()+"-"+n;e.items.forEach(n=>{t.push(X(X({},n),{},{groupId:a,groupName:e.name,_id:""+n.value}))})}else t.push(X(X({},e),{},{_id:""+e.value,index:n}))}),t}(i),[i]),[u,m]=Object(K.useState)({flat:[],addedOptions:[],value:e,search:"",focus:!1,searching:!1,highlighted:-1,changed:!1}),{flat:b,addedOptions:f,value:h,search:y,focus:x,searching:_,highlighted:v}=u,k=Object(K.useMemo)(()=>{let e=ne(h,[...g,...f]);return e||l||n||([e]=g),e},[h,g,f,l,n]),w=Object(K.useMemo)(()=>function(e){const t=[];return e.forEach((e,n)=>{if("groupId"in e){const a=function(e){for(var t=1;t"groupId"in e&&e.groupId===a.groupId);a.index=n,o>-1?t[o].items.push(a):t.push({items:[a],groupId:e.groupId,type:"group",name:e.groupName})}else t.push(e)}),t}(b),[b]),T=Object(K.useMemo)(()=>function(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(e=>e&&e.name).join(", "):e.name:""}(k),[k]),O=Object(K.useCallback)(()=>{m(e=>le(le({},e),{},{focus:!1,search:"",flat:g,highlighted:-1})),d.current&&d.current.blur()},[g,d]),j=e=>m(t=>le(le({},t),{},{focus:e})),C=Object(K.useCallback)(e=>{m(t=>{const{flat:a,highlighted:o}=t,i=e?a.find(t=>t.value==e):a[o];if(!i)return t;const r=function(e,t,n){if(!n)return e;if(!t)return[e];const a=Array.isArray(t)?[...t]:[t],o=a.findIndex(t=>t===e);return o>=0?a.splice(o,1):a.push(e),a}(i.value,t.value,n),c=ne(r,a);return le(le({},t),{},{addedOptions:n?c:[c],value:r,changed:[r,c]})})},[n]),D=Object(K.useCallback)(e=>{e.preventDefault(),p&&d.current&&d.current.blur(),C(e.currentTarget.value)},[C,p]),S=Object(K.useCallback)(e=>{const{key:t}=e;"ArrowDown"!==t&&"ArrowUp"!==t||(e.preventDefault(),m(e=>le(le({},e),{},{highlighted:$(e.highlighted,{key:t,options:e.flat})})))},[]),R=Object(K.useCallback)(({key:e})=>{"Enter"===e&&(C(),s&&p&&O())},[C,p,O,s]),I=Object(K.useCallback)(({key:e})=>{"Escape"===e&&O()},[O]),L={tabIndex:"0",readOnly:!a,onChange:a?({target:e})=>{const{value:t}=e,n={search:t};let a=g;c&&t.length&&(n.searching=!0,a=c(t)),m(e=>le(le({},e),n)),Promise.resolve(a).then(e=>{let n=e;t.length&&(n=function(e,t,n){return!!(e.length&&re&&n)&&function(e,t,n){return new re(t,n).search(e).map((e,t)=>oe(oe({},e),{},{index:t}))}(e,t,n)}(t,e,o)),m(t=>le(le({},t),{},{flat:!1===n?e:n,searching:!1}))}).catch(()=>m(e=>le(le({},e),{},{flat:g,searching:!1})))}:null,disabled:t,onMouseDown:()=>j(!x),onBlur:O,onFocus:()=>j(!0),onKeyPress:R,onKeyDown:S,onKeyUp:I,ref:d},B=Object(K.useMemo)(()=>({tabIndex:"-1",onMouseDown:D,onKeyDown:S,onKeyPress:R,onBlur:O}),[D,S,R,O]);return Object(K.useEffect)(()=>{m(t=>le(le({},t),{},{value:e}))},[e]),Object(K.useEffect)(()=>{m(e=>le(le({},e),{},{flat:g}))},[g]),Object(K.useEffect)(()=>{!1!==u.changed&&(m(e=>le(le({},e),{},{changed:!1})),r(...u.changed))},[u.changed,r]),[{value:k,highlighted:v,options:w,disabled:t,displayValue:T,focus:x,search:y,searching:_},L,B,e=>m(t=>le(le({},t),{},{value:e}))]}var de=n(5),ge=n.n(de);const ue=ge.a.shape({name:ge.a.string.isRequired,value:ge.a.oneOfType([ge.a.string,ge.a.number]).isRequired});function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function be(e){for(var t=1;t{let{optionProps:t,highlighted:n,selected:a,cls:o,renderOption:i}=e,r=function(e,t){if(null==e)return{};var n,a,o=function(e,t){if(null==e)return{};var n,a,o={},i=Object.keys(e);for(a=0;a=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["optionProps","highlighted","selected","cls","renderOption"]);const c=[o("option"),!!a&&o("is-selected"),!!n&&o("is-highlighted")].filter(e=>!!e).join(" "),l=be(be({},t),{},{value:r.value,disabled:r.disabled});return Y.a.createElement("li",{className:o("row"),role:"menuitem","data-index":r.index,"data-value":escape(r.value),key:r.value},i(l,r,{selected:a,highlighted:n},c))};he.defaultProps={disabled:!1,index:null,value:null},he.propTypes={};var ye=Object(K.memo)(he);function xe(){return(xe=Object.assign||function(e){for(var t=1;t{const _=Object(K.useRef)(null),[v,k,w]=se({options:c,value:e,multiple:a,disabled:t,fuse:h,search:o,onChange:p,getOptions:f,closeOnSelect:d,closable:!a||"on-focus"===s,allowEmpty:!!n}),{focus:T,highlighted:O,value:j,options:C,searching:D,displayValue:S,search:R}=v,I=Object(K.useCallback)(e=>"function"==typeof g?g(e):0===e.indexOf("container")?e.replace("container",g):0===e.indexOf("is-")||0===e.indexOf("has-")?e:g.split(" ")[0]+"__"+e,[g]),L=Object(K.useCallback)(()=>{if(null===y)return null;const e="function"==typeof y?y():y;return Y.a.createElement("li",{className:I("not-found")},e)},[y,I]),B=[I("container"),!!t&&I("is-disabled"),!!D&&I("is-loading"),!!T&&I("has-focus")].filter(e=>!!e).join(" "),E=T&&o?R:S;let P;switch(Object(K.useEffect)(()=>{const{current:e}=_;if(!e||a||O<0&&!j)return;const t=O>-1?'[data-index="'+O+'"]':'[data-value="'+escape(j.value)+'"]',n=e.querySelector(t);if(n){const t=e.getBoundingClientRect(),a=n.getBoundingClientRect();e.scrollTop=n.offsetTop-t.height/2+a.height/2}},[T,j,O,_,a]),s){case"never":P=!1;break;case"always":P=!0;break;case"on-focus":P=T;break;default:P=!t&&(T||a)}return Y.a.createElement("div",{ref:x,className:B,id:l},(!a||n||o)&&Y.a.createElement("div",{className:I("value")},u(ve(ve({},k),{},{placeholder:n,autoFocus:i,autoComplete:r,value:E}),v,I("input"))),P&&Y.a.createElement("div",{className:I("select"),ref:_,onMouseDown:e=>e.preventDefault()},Y.a.createElement("ul",{className:I("options")},C.length>0?C.map(e=>{const t="group"===e.type,n=t?e.items:[e],a={cls:I,optionProps:w,renderOption:m},o=n.map(e=>{return Y.a.createElement(ye,xe({key:e.value,selected:(t=e,n=j,!!n&&(Array.isArray(n)?n.findIndex(e=>e.value===t.value)>=0:n.value===t.value)),highlighted:O===e.index},a,e));var t,n});return t?Y.a.createElement("li",{role:"none",className:I("row"),key:e.groupId},Y.a.createElement("div",{className:I("group")},Y.a.createElement("div",{className:I("group-header")},b(e.name)),Y.a.createElement("ul",{className:I("options")},o))):o}):L()||null)))});we.defaultProps={className:"select-search",disabled:!1,search:!1,multiple:!1,placeholder:null,id:null,autoFocus:!1,autoComplete:"on",value:"",onChange:()=>{},printOptions:"auto",closeOnSelect:!0,renderOption:(e,t,n,a)=>Y.a.createElement("button",xe({type:"button",className:a},e),t.name),renderGroupHeader:e=>e,renderValue:(e,t,n)=>Y.a.createElement("input",xe({},e,{className:n})),fuse:{keys:["name","groupName"],threshold:.3},getOptions:null,emptyMessage:null},we.propTypes={};var Te=Object(K.memo)(we),Oe=(n(46),{template_1:{label:Object(r._x)("Two columns with featured image","label","gp-premium"),thumbnail:"post-navigation-featured-images-1.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"99fe8eb7","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"7b27c819","columns":2,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"8e5dc8f7","isGrid":true,"gridId":"ee9eb157","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","marginBottomMobile":"10","isDynamic":true,"gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"e2b84192","columns":2,"horizontalGap":15,"verticalAlignment":"center","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"6aed9546","isGrid":true,"gridId":"fa4d77e4","width":25,"widthMobile":25,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSource":"previous-post","imageSize":"thumbnail","linkTo":"single-post","imageWidth":100,"imageHeight":100,"avatarSize":100} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"d54a6460","isGrid":true,"gridId":"fa4d77e4","width":75,"widthMobile":75,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"0d00c744","element":"p","marginBottom":"5","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Previous post title","gpDynamicSource":"previous-post"} --\x3e Previous post title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"86e1ad46","element":"p","showAdvancedTypography":true,"fontSize":14,"marginBottom":"0","gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author name","gpDynamicSource":"previous-post","gpDynamicTextBefore":"by "} --\x3e Author name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"2540358d","isGrid":true,"gridId":"ee9eb157","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","alignmentMobile":"left","isDynamic":true,"gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"6e69ba24","columns":2,"horizontalGap":15,"verticalAlignment":"center","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"daa456b5","isGrid":true,"gridId":"fa4d77e4","width":75,"widthMobile":75,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","alignment":"right","alignmentMobile":"left","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2883b2a4","element":"p","marginBottom":"5","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Next post title","gpDynamicSource":"next-post"} --\x3e Next post title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"3d2e07c6","element":"p","showAdvancedTypography":true,"fontSize":14,"marginBottom":"0","gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author name","gpDynamicSource":"next-post","gpDynamicTextBefore":"by "} --\x3e Author name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"2634cdf9","isGrid":true,"gridId":"fa4d77e4","width":25,"widthMobile":25,"orderMobile":-1,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSource":"next-post","imageSize":"thumbnail","linkTo":"single-post","imageWidth":100,"imageHeight":100,"avatarSize":100} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!0}]},template_2:{label:Object(r._x)("Two columns with arrows","label","gp-premium"),thumbnail:"post-navigation-arrows-1.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"d1dd99b1","paddingTop":"20","paddingRight":"0","paddingBottom":"20","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"a4b97d6a","columns":2,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9c89f761","isGrid":true,"gridId":"ee9eb157","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","marginBottomMobile":"10","isDynamic":true,"gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"c04126aa","columns":2,"horizontalGap":15,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9cf413a8","isGrid":true,"gridId":"fa4d77e4","width":15,"widthTablet":25,"widthMobile":15,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"38a2c075","fillHorizontalSpace":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"bec8d56e","hasUrl":true,"hasIcon":true,"removeText":true,"backgroundColor":"#000000","textColor":"#ffffff","backgroundColorHover":"#abb8c3","textColorHover":"","paddingTop":"10","paddingRight":"10","paddingBottom":"10","paddingLeft":"10","iconSize":1.5,"gpDynamicLinkType":"single-post","gpDynamicSource":"previous-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"625f3305","isGrid":true,"gridId":"fa4d77e4","width":85,"widthTablet":75,"widthMobile":85,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"a6f36397","element":"p","marginBottom":"0","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Previous post title","gpDynamicSource":"previous-post"} --\x3e Previous post title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"3d262c0b","element":"p","showAdvancedTypography":true,"fontSize":14,"marginBottom":"0","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicSource":"previous-post","gpDynamicDateUpdated":true} --\x3e Date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"5d70717c","isGrid":true,"gridId":"ee9eb157","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","alignment":"right","alignmentMobile":"left","isDynamic":true,"gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"ee647ff2","columns":2,"horizontalGap":15,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"78f3ead4","isGrid":true,"gridId":"fa4d77e4","width":85,"widthTablet":75,"widthMobile":85,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"643cf12f","element":"p","marginBottom":"0","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Next post title","gpDynamicSource":"next-post"} --\x3e Next post title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8ac35083","element":"p","showAdvancedTypography":true,"fontSize":14,"marginBottom":"0","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicSource":"next-post","gpDynamicDateUpdated":true} --\x3e Date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"780c810b","isGrid":true,"gridId":"fa4d77e4","width":15,"widthTablet":25,"widthMobile":15,"orderMobile":-1,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"fe863527","fillHorizontalSpace":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"122d9fa4","hasUrl":true,"hasIcon":true,"removeText":true,"backgroundColor":"#000000","textColor":"#ffffff","backgroundColorHover":"#abb8c3","textColorHover":"","paddingTop":"10","paddingRight":"10","paddingBottom":"10","paddingLeft":"10","iconSize":1.5,"gpDynamicLinkType":"single-post","gpDynamicSource":"next-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!0}]},template_3:{label:Object(r._x)("Two columns with background overlays","label","gp-premium"),thumbnail:"post-navigation-overlay.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"aadd0a6f","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"fe8855c5","columns":2,"horizontalGap":0,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"59edc08b","isGrid":true,"gridId":"fe8855c5","paddingTop":"40","paddingRight":"40","paddingBottom":"40","paddingLeft":"40","paddingSyncUnits":true,"backgroundColor":"#000000","textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#e3e3e3","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"bgOptions":{"selector":"pseudo-element","opacity":0.4,"overlay":false,"position":"center center","size":"cover","repeat":"no-repeat","attachment":""},"isDynamic":true,"gpDynamicImageBg":"featured-image","gpDynamicSource":"previous-post","gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8d3d4c12","element":"p","backgroundColor":"#cf2e2e","showAdvancedTypography":true,"fontSize":14,"textTransform":"uppercase","paddingTop":"5","paddingRight":"10","paddingBottom":"5","paddingLeft":"10","inlineWidth":true} --\x3e Previous
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"352592d1","element":"h3","showAdvancedTypography":true,"fontSize":25,"marginBottom":"0","className":"","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"previous-post"} --\x3e Hello World
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"993a41e4","isGrid":true,"gridId":"fe8855c5","paddingTop":"40","paddingRight":"40","paddingBottom":"40","paddingLeft":"40","paddingSyncUnits":true,"backgroundColor":"#000000","textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#e3e3e3","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"bgOptions":{"selector":"pseudo-element","opacity":0.4,"overlay":false,"position":"center center","size":"cover","repeat":"no-repeat","attachment":""},"isDynamic":true,"gpDynamicImageBg":"featured-image","gpDynamicSource":"next-post","gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"49c8845f","element":"p","backgroundColor":"#cf2e2e","showAdvancedTypography":true,"fontSize":14,"textTransform":"uppercase","paddingTop":"5","paddingRight":"10","paddingBottom":"5","paddingLeft":"10","inlineWidth":true} --\x3e Next
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"6ba8079e","element":"h3","showAdvancedTypography":true,"fontSize":25,"marginBottom":"0","className":"","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"next-post"} --\x3e Hello World
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!1}]},template_4:{label:Object(r._x)("Two columns with arrows","label","gp-premium"),thumbnail:"post-navigation-arrows-2.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"96f5f0fa","innerContainer":"full","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"4785bcc3","columns":2,"horizontalGap":0,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"5287d6da","isGrid":true,"gridId":"4785bcc3","paddingTop":"30","paddingRight":"0","paddingBottom":"25","paddingLeft":"25","backgroundColor":"#ffffff","isDynamic":true,"gpRemoveContainerCondition":"no-previous-post","opacities":[],"textShadows":[{"state":"normal","target":"self","customSelector":"","color":"#000000","colorOpacity":0.5,"xOffset":5,"yOffset":5,"blur":10}]} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"261aea9d","columns":2,"horizontalGap":0,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"eb3b7005","isGrid":true,"gridId":"261aea9d","width":75,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","alignment":"left","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"0a2d5bfc","element":"h3","alignment":"left","textColor":"#000000","linkColor":"#000000","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"previous-post"} --\x3e Hello World
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"164ae39e","element":"p","showAdvancedTypography":true,"fontSize":14,"marginBottom":"0","hasIcon":true,"gpDynamicTextType":"comments-number","gpDynamicLinkType":"comments","gpDynamicTextReplace":"Comments number","gpDynamicSource":"previous-post"} --\x3e Comments number
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"75cd654a","isGrid":true,"gridId":"261aea9d","width":25,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","alignment":"right","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"2cf8ccdf","alignment":"right","stack":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"6acb0e83","hasUrl":true,"hasIcon":true,"removeText":true,"backgroundColor":"#0366d6","textColor":"#ffffff","backgroundColorHover":"#222222","textColorHover":"#ffffff","paddingTop":"15","paddingRight":"20","paddingBottom":"15","paddingLeft":"20","gpDynamicLinkType":"single-post","gpDynamicSource":"previous-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7af8fa61","isGrid":true,"gridId":"4785bcc3","paddingTop":"30","paddingRight":"25","paddingBottom":"25","paddingLeft":"0","backgroundColor":"#0366d6","isDynamic":true,"gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"1161e4d4","columns":2,"horizontalGap":0,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"045e1698","isGrid":true,"gridId":"261aea9d","width":25,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","alignment":"left","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"b5e0b3c6","alignment":"left","stack":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"557abb73","hasUrl":true,"hasIcon":true,"removeText":true,"backgroundColor":"#ffffff","textColor":"#0693e3","backgroundColorHover":"#222222","textColorHover":"#ffffff","paddingTop":"15","paddingRight":"20","paddingBottom":"15","paddingLeft":"20","gpDynamicLinkType":"single-post","gpDynamicSource":"next-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9ad09f6f","isGrid":true,"gridId":"261aea9d","width":75,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","alignment":"right","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"9ba9e9d1","element":"h3","alignment":"right","textColor":"#ffffff","linkColor":"#ffffff","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"next-post"} --\x3e Hello World
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8ebf8dbe","element":"p","alignment":"right","textColor":"#ffffff","linkColor":"#ffffff","showAdvancedTypography":true,"fontSize":14,"marginBottom":"0","hasIcon":true,"gpDynamicTextType":"comments-number","gpDynamicLinkType":"comments","gpDynamicTextReplace":"Comments number","gpDynamicSource":"next-post"} --\x3e Comments number
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!1}]},template_5:{label:Object(r._x)("Two columsn with featured image offset","label","gp-premim"),thumbnail:"post-navigation-offset.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"52018004","innerContainer":"full","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","marginRight":"30","marginLeft":"30","marginLeftTablet":"30","marginRightMobile":"25","marginLeftMobile":"25","alignment":"right","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"7bdd6853","columns":4,"horizontalGap":0,"verticalGapMobile":0,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4138dd74","isGrid":true,"gridId":"7bdd6853","width":25,"widthTablet":50,"widthMobile":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","borderRadiusBottomLeft":"10","borderRadiusTopLeft":"10","borderRadiusBottomLeftTablet":"0","borderRadiusBottomLeftMobile":"0","borderRadiusTopLeftMobile":"5","bgImage":{"id":"","image":{"url":"https://generatepress.local/wp-content/plugins/gp-premium/elements/assets/admin/background-image-fallback.jpg"}},"verticalAlignment":"center","isDynamic":true,"gpDynamicImageBg":"featured-image","gpDynamicLinkType":"post","gpDynamicSource":"previous-post","gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"776ec4d6","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"a3aaad4c","hasUrl":true,"hasIcon":true,"removeText":true,"backgroundColor":"#b5b5b5","textColor":"#ffffff","backgroundColorHover":"#222222","textColorHover":"#ffffff","borderColor":"#f9f9f9","marginRight":"1.5","marginLeft":"-1.5","marginUnit":"em","paddingTop":"15","paddingRight":"15","paddingBottom":"15","paddingLeft":"15","borderSizeTop":"7","borderSizeRight":"7","borderSizeBottom":"7","borderSizeLeft":"7","borderRadiusTopRight":"100","borderRadiusBottomRight":"100","borderRadiusBottomLeft":"100","borderRadiusTopLeft":"100","borderRadiusUnit":"%","iconSizeMobile":0.8,"gpDynamicLinkType":"single-post","gpDynamicSource":"previous-post"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"18430adf","isGrid":true,"gridId":"7bdd6853","width":25,"widthTablet":50,"widthMobile":50,"paddingTop":"30","paddingRight":"30","paddingBottom":"30","paddingLeft":"30","paddingSyncUnits":true,"paddingTopMobile":"10","paddingRightMobile":"10","paddingBottomMobile":"10","paddingLeftMobile":"10","marginRight":"10","marginRightTablet":"0","marginRightMobile":"0","borderRadiusTopRight":"10","borderRadiusBottomRight":"10","borderRadiusBottomRightTablet":"0","borderRadiusTopRightMobile":"5","borderRadiusBottomRightMobile":"0","backgroundColor":"#ffffff","zindex":2,"alignment":"center","isDynamic":true,"gpDynamicImageBg":"featured-image","gpDynamicSource":"previous-post","gpRemoveContainerCondition":"no-previous-post"} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2acc62a4","element":"h3","alignment":"left","backgroundColor":"#ffffff","textColor":"#000000","linkColor":"#000000","showAdvancedTypography":true,"fontSize":25,"fontSizeMobile":17,"marginBottom":"0","marginLeft":"-4","marginUnit":"em","marginLeftMobile":"-3","paddingTop":"10","paddingRight":"10","paddingBottom":"10","paddingLeft":"10","paddingSyncUnits":true,"borderRadiusBottomLeft":"10","borderRadiusTopLeft":"10","borderRadiusTopRightMobile":"5","borderRadiusBottomRightMobile":"5","borderRadiusBottomLeftMobile":"5","borderRadiusTopLeftMobile":"5","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"previous-post"} --\x3e Hello World
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ce9878f4","isGrid":true,"gridId":"7bdd6853","width":25,"widthTablet":50,"widthMobile":50,"paddingTop":"30","paddingRight":"30","paddingBottom":"30","paddingLeft":"30","paddingSyncUnits":true,"paddingTopMobile":"10","paddingRightMobile":"10","paddingBottomMobile":"10","paddingLeftMobile":"10","marginLeft":"10","marginLeftTablet":"0","marginLeftMobile":"0","borderRadiusBottomLeft":"10","borderRadiusTopLeft":"10","borderRadiusTopLeftTablet":"0","borderRadiusBottomLeftMobile":"5","borderRadiusTopLeftMobile":"0","backgroundColor":"#ffffff","zindex":1,"alignment":"center","isDynamic":true,"gpDynamicImageBg":"featured-image","gpDynamicSource":"next-post","gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"9d97a37f","element":"h3","alignment":"right","backgroundColor":"#ffffff","textColor":"#000000","linkColor":"#000000","showAdvancedTypography":true,"fontSize":25,"fontSizeMobile":17,"marginRight":"-4","marginBottom":"0","marginUnit":"em","marginRightMobile":"-3","paddingTop":"10","paddingRight":"10","paddingBottom":"10","paddingLeft":"10","paddingSyncUnits":true,"borderRadiusTopRight":"10","borderRadiusBottomRight":"10","borderRadiusTopRightMobile":"5","borderRadiusBottomRightMobile":"5","borderRadiusBottomLeftMobile":"5","borderRadiusTopLeftMobile":"5","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World","gpDynamicSource":"next-post"} --\x3e Hello World
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"6c856070","isGrid":true,"gridId":"7bdd6853","width":25,"widthTablet":50,"widthMobile":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","borderRadiusTopRight":"10","borderRadiusBottomRight":"10","borderRadiusTopRightTablet":"0","borderRadiusTopRightMobile":"0","borderRadiusBottomRightMobile":"5","bgImage":{"id":"","image":{"url":"https://generatepress.local/wp-content/plugins/gp-premium/elements/assets/admin/background-image-fallback.jpg"}},"verticalAlignment":"center","isDynamic":true,"gpDynamicImageBg":"featured-image","gpDynamicSource":"next-post","gpRemoveContainerCondition":"no-next-post"} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"ad40b681","alignment":"right","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"139d60e4","hasUrl":true,"hasIcon":true,"removeText":true,"backgroundColor":"#b5b5b5","textColor":"#ffffff","backgroundColorHover":"#222222","textColorHover":"#ffffff","borderColor":"#f9f9f9","marginRight":"-1.5","marginLeft":"1.5","marginUnit":"em","paddingTop":"15","paddingRight":"15","paddingBottom":"15","paddingLeft":"15","borderSizeTop":"7","borderSizeRight":"7","borderSizeBottom":"7","borderSizeLeft":"7","borderRadiusTopRight":"100","borderRadiusBottomRight":"100","borderRadiusBottomLeft":"100","borderRadiusTopLeft":"100","borderRadiusUnit":"%","iconSizeMobile":0.8,"gpDynamicLinkType":"single-post","gpDynamicSource":"next-post","opacities":[],"transitions":[],"boxShadows":[],"transforms":[],"textShadows":[],"filters":[]} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_do_template_part"},{key:"_generate_hook_priority",value:"1"},{key:"_generate_disable_post_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!1}]}}),je={basic_1:{label:Object(r._x)("Inline with avatar","label","gp-premium"),thumbnail:"post-meta-inline.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"8a25fc79","paddingTop":"15","paddingRight":"0","paddingBottom":"15","paddingLeft":"0","marginTop":"20","marginBottom":"20","borderSizeTop":"1","borderSizeBottom":"1","borderColor":"#e8edf0","showAdvancedTypography":true,"fontSize":14,"isDynamic":true,"gpInlinePostMeta":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarRounded":true} /--\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"3fb4928a","element":"div","marginLeft":"10","paddingRight":"10","inlineWidth":true,"gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author Name"} --\x3e Author Name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"f9b55781","element":"div","borderColor":"#e8edf0","paddingLeft":"10","borderSizeLeft":"1","inlineWidth":true,"gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date"} --\x3e Date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8fca9ec9","element":"div","borderColor":"#e8edf0","marginLeft":"10","paddingLeft":"10","borderSizeLeft":"1","hasIcon":true,"inlineWidth":true,"gpDynamicTextType":"comments-number","gpDynamicLinkType":"comments","gpDynamicTextReplace":"Comments","gpDynamicTextTaxonomy":"category","gpDynamicNoCommentsText":"0","gpDynamicSingleCommentText":"1","gpDynamicMultipleCommentsText":"%"} --\x3e \x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_post_meta_location",value:"after-post-title"},{key:"_generate_disable_primary_post_meta",value:!0}]},basic_2:{label:Object(r._x)("Stacked with avatar","label","gp-premium"),thumbnail:"post-meta-avatar-stacked.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"a745be15","paddingTop":"20","paddingRight":"0","paddingBottom":"20","paddingLeft":"0","showAdvancedTypography":true,"fontSize":14,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"fe4d27a3","columns":2,"horizontalGap":15,"verticalAlignment":"center","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"fd4592f4","isGrid":true,"gridId":"fe4d27a3","width":10,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarSize":120} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"137e86ad","isGrid":true,"gridId":"fe4d27a3","width":90,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"d7bb0434","element":"p","marginBottom":"5","gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author Name"} --\x3e Author Name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"759ebd2f","element":"p","marginBottom":"0","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3e Date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_post_meta_location",value:"after-post-title"},{key:"_generate_disable_primary_post_meta",value:!0}]},basic_3:{label:Object(r._x)("Term buttons","label","gp-premium"),thumbnail:"post-meta-term-buttons.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"7134d7c2","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"621d2c31","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"e378fc0b","hasUrl":true,"backgroundColor":"#000000","textColor":"#ffffff","backgroundColorHover":"#222222","textColorHover":"#ffffff","showAdvancedTypography":true,"fontSize":13,"marginTop":"5","marginRight":"5","marginBottom":"5","marginLeft":"5","paddingTop":"10","paddingRight":"10","paddingBottom":"10","paddingLeft":"10","borderRadiusTopRight":"20","borderRadiusBottomRight":"20","borderRadiusBottomLeft":"20","borderRadiusTopLeft":"20","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Terms","gpDynamicTextTaxonomy":"category"} --\x3e Terms \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_post_meta_location",value:"before-post-title"},{key:"_generate_disable_primary_post_meta",value:!1}]}},Ce={template_1:{label:Object(r._x)("Full footer 1","label","gp-premium"),thumbnail:"site-footer-full-1.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"73cd57e1","paddingTop":"140","paddingRight":"30","paddingBottom":"60","paddingLeft":"30","backgroundColor":"#1b1b42","shapeDividers":[],"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"b76f312f","columns":3,"horizontalGap":80,"verticalAlignment":"center","verticalGapTablet":40,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"53cb46e2","isGrid":true,"gridId":"41f809a3","width":60,"widthTablet":100,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"aa19f1fb","element":"h3","textColor":"#ffffff"} --\x3e Reach out to us for a consultation.
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"41582601","element":"p","textColor":"#ffffff","paddingRight":"100","paddingRightTablet":"0"} --\x3e Semper blandit suspendisse faucibus metus lobortis morbi magna vivamus per risus fermentum dapibus imperdiet praesent magnis.
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"a8276863","marginTop":"30","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"529d5dda","hasUrl":true,"backgroundColor":"","textColor":"#ffffff","backgroundColorHover":"#6212b3","backgroundColorHoverOpacity":0,"textColorHover":"#f2f5fa","borderColor":"#ffffff","borderColorHover":"#f2f5fa","borderColorHoverOpacity":0.8,"fontWeight":"600","marginRight":"20","marginBottomMobile":"20","paddingTop":"10","paddingRight":"20","paddingBottom":"10","paddingLeft":"20","borderSizeTop":"3","borderSizeRight":"3","borderSizeBottom":"3","borderSizeLeft":"3","borderRadiusTopRight":"2","borderRadiusBottomRight":"2","borderRadiusBottomLeft":"2","borderRadiusTopLeft":"2"} --\x3e Contact Us \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"e1bd60bb","isGrid":true,"gridId":"41f809a3","width":20,"widthTablet":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","removeVerticalGapTablet":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"37420255","element":"p","textColor":"#ffffff"} --\x3e Company Name
Address Here
Address Here
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"bf8e162e","element":"p","textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#f2f5fa","marginBottom":"0","hasIcon":true,"iconPaddingTop":".1"} --\x3e +1 000 000 0000
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"c762d353","isGrid":true,"gridId":"41f809a3","width":20,"widthTablet":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","removeVerticalGapTablet":true,"removeVerticalGapMobile":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"08544617","alignment":"right","alignmentTablet":"right","alignmentMobile":"left","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"13c371f8","hasUrl":true,"hasIcon":true,"removeText":true,"ariaLabel":"instagram link","backgroundColor":"","textColor":"#ffffff","backgroundColorHover":"#222222","textColorHover":"#f2f5fa","borderColor":"#ffffff","borderColorHover":"#f2f5fa","marginRight":"20","paddingTop":"6","paddingRight":"6","paddingBottom":"6","paddingLeft":"6","borderSizeTop":"2","borderSizeRight":"2","borderSizeBottom":"2","borderSizeLeft":"2","borderRadiusTopRight":"50","borderRadiusBottomRight":"50","borderRadiusBottomLeft":"50","borderRadiusTopLeft":"50","iconSize":0.8} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"926332bd","hasUrl":true,"hasIcon":true,"removeText":true,"ariaLabel":"twitter link","backgroundColor":"","textColor":"#ffffff","backgroundColorHover":"#222222","textColorHover":"#f2f5fa","borderColor":"#ffffff","borderColorHover":"#f2f5fa","marginRight":"20","paddingTop":"6","paddingRight":"6","paddingBottom":"6","paddingLeft":"6","borderSizeTop":"2","borderSizeRight":"2","borderSizeBottom":"2","borderSizeLeft":"2","borderRadiusTopRight":"50","borderRadiusBottomRight":"50","borderRadiusBottomLeft":"50","borderRadiusTopLeft":"50","iconSize":0.8} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"d957854e","hasUrl":true,"hasIcon":true,"removeText":true,"ariaLabel":"facebook link","backgroundColor":"","textColor":"#ffffff","backgroundColorHover":"#222222","textColorHover":"#f2f5fa","borderColor":"#ffffff","borderColorHover":"#f2f5fa","paddingTop":"6","paddingRight":"6","paddingBottom":"6","paddingLeft":"6","borderSizeTop":"2","borderSizeRight":"2","borderSizeBottom":"2","borderSizeLeft":"2","borderRadiusTopRight":"50","borderRadiusBottomRight":"50","borderRadiusBottomLeft":"50","borderRadiusTopLeft":"50","iconSize":0.8} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"0f87c806","paddingTop":"60","paddingRight":"0","paddingBottom":"60","paddingLeft":"0","marginTop":"60","borderSizeTop":"1","borderColor":"#ffffff","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"9cc30ed9","columns":2,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"e6861bde","isGrid":true,"gridId":"60ab45cf","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"97c10964","element":"p","textColor":"#ffffff","showAdvancedTypography":true,"fontSize":17} --\x3e © Company Name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7c528044","isGrid":true,"gridId":"60ab45cf","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"d060803e","alignment":"right","alignmentMobile":"left","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"907cc664","hasUrl":true,"backgroundColor":"","textColor":"#ffffff","backgroundColorHover":"","textColorHover":"#f2f5fa","showAdvancedTypography":true,"fontSize":17,"marginRight":"30"} --\x3e Privacy Policy \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"a6a340bc","hasUrl":true,"backgroundColor":"","textColor":"#ffffff","backgroundColorHover":"","textColorHover":"#f2f5fa","showAdvancedTypography":true,"fontSize":17} --\x3e Terms of Service \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e'},template_2:{label:Object(r._x)("Full footer 2","label","gp-premium"),thumbnail:"site-footer-full-2.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"e224c1dd","paddingTop":"80","paddingRight":"20","paddingBottom":"80","paddingLeft":"20","backgroundColor":"#fafbfc","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"34307d45","element":"p","alignment":"center","textColor":"#2e3d4d","showAdvancedTypography":true,"fontWeight":"bold","fontSize":14,"textTransform":"uppercase","letterSpacing":0.3,"marginTop":"10"} --\x3e Your Company Name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4068688a","paddingTop":"60","paddingRight":"20","paddingBottom":"60","paddingLeft":"20","marginTop":"60","marginBottom":"60","borderSizeTop":"1","borderSizeBottom":"1","borderColor":"#5c7a99","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"690686fb","columns":3,"horizontalGap":0,"verticalAlignment":"center","verticalGapMobile":40,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"12d457ad","isGrid":true,"gridId":"f5b096f9","width":32,"paddingTop":"0","paddingRight":"20","paddingBottom":"0","paddingLeft":"20","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8818b435","element":"p","alignment":"center","showAdvancedTypography":true,"fontWeight":"bold","fontSize":13,"textTransform":"uppercase","letterSpacing":0.2,"marginBottom":"0"} --\x3e PH +1 000 000 0000
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"68ec175a","isGrid":true,"gridId":"f5b096f9","width":36,"paddingTop":"0","paddingRight":"20","paddingBottom":"0","paddingLeft":"20","borderSizeRight":"1","borderSizeLeft":"1","borderSizeTopMobile":"0","borderSizeRightMobile":"0","borderSizeBottomMobile":"0","borderSizeLeftMobile":"0","borderColor":"#5c7a99","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"cf4dcfab","element":"p","alignment":"center","showAdvancedTypography":true,"fontWeight":"bold","fontSize":13,"textTransform":"uppercase","letterSpacing":0.2,"marginBottom":"0"} --\x3e 24 M Drive
East Hampton, NY 11937
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"47f78435","isGrid":true,"gridId":"f5b096f9","width":32,"paddingTop":"0","paddingRight":"20","paddingBottom":"0","paddingLeft":"20","removeVerticalGapMobile":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"fd601b43","alignment":"center","marginBottom":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"2800ad9a","hasUrl":false,"hasIcon":true,"removeText":true,"textColor":"#2e3d4d","textColorHover":"#5c7a99","marginRight":"20","iconSize":0.9} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"eb98a6f6","hasUrl":false,"hasIcon":true,"removeText":true,"textColor":"#2e3d4d","textColorHover":"#5c7a99","marginRight":"20","iconSize":0.9} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"ab839eb9","hasUrl":false,"hasIcon":true,"removeText":true,"textColor":"#2e3d4d","textColorHover":"#5c7a99","marginRight":"20","iconSize":0.8} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"5b757c38","hasUrl":false,"hasIcon":true,"removeText":true,"textColor":"#2e3d4d","textColorHover":"#5c7a99","marginRight":"20","iconSize":0.8} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"424f95c0","columns":2,"verticalGapMobile":30,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"cc32f783","isGrid":true,"gridId":"90341e96","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"1e50faeb","element":"p","alignment":"left","alignmentMobile":"center","showAdvancedTypography":true,"fontWeight":"bold","fontSize":12,"textTransform":"uppercase","letterSpacing":0.2} --\x3e © Your Copyright Message
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"b706d851","isGrid":true,"gridId":"90341e96","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","removeVerticalGapMobile":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"b4f65930","alignment":"right","alignmentMobile":"center","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"373aae0d","hasUrl":false,"textColor":"#2e3d4d","textColorHover":"#5c7a99","showAdvancedTypography":true,"fontWeight":"bold","fontSize":12,"textTransform":"uppercase","letterSpacing":0.2,"marginRight":"30"} --\x3e PRIVACY POLICY \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"3cd1cf71","hasUrl":false,"textColor":"#2e3d4d","textColorHover":"#5c7a99","showAdvancedTypography":true,"fontWeight":"bold","fontSize":12,"textTransform":"uppercase","letterSpacing":0.2} --\x3e terms of service \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e'}},De={template_1:{label:Object(r._x)("Basic layout with term buttons","label","gp-premium"),thumbnail:"content-template-basic.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"d2cafe96","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"6d7bfb40","marginBottom":"15","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"38620841","hasUrl":true,"backgroundColor":"#000000","textColor":"#ffffff","backgroundColorHover":"#222222","textColorHover":"#ffffff","showAdvancedTypography":true,"fontSize":13,"paddingTop":"5","paddingRight":"10","paddingBottom":"5","paddingLeft":"10","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Terms","gpDynamicTextTaxonomy":"category"} --\x3e Terms \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"f593ba8c","linkColor":"#000000","linkColorHover":"#858585","showAdvancedTypography":true,"fontWeight":"bold","marginBottom":"30","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Post Title"} --\x3e Post Title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"1ed16867","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","showAdvancedTypography":true,"fontSize":14,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"27f5a324","columns":2,"verticalAlignment":"center","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"dc72dc13","isGrid":true,"gridId":"10064c4d","widthMobile":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true,"gpInlinePostMeta":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarRounded":true} /--\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"c7b33e8b","element":"p","marginBottom":"0","marginLeft":"10","gpDynamicTextType":"post-author","gpDynamicLinkType":"author-archives","gpDynamicTextReplace":"Author name"} --\x3e Author name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ec93a944","isGrid":true,"gridId":"10064c4d","widthMobile":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","alignment":"right","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"af8af68e","element":"p","marginBottom":"0","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicDateUpdated":true} --\x3e Post date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"b70b46a6","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"marginTop":"30","marginBottom":"30","isDynamic":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"medium_large","linkTo":"single-post"} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt"} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"750"},{key:"_generate_use_theme_post_container",value:!0}]},template_2:{label:Object(r._x)("Layout with offset content","label","gp-premium"),thumbnail:"content-template-offset.jpg",content:'\x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"large","linkTo":"single-post"} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"05e7d83e","paddingTop":"20","paddingRight":"20","paddingBottom":"20","paddingLeft":"20","paddingSyncUnits":true,"marginTop":"-65","marginRight":"40","marginBottom":"20","marginLeft":"0","backgroundColor":"#ffffff","zindex":1,"showAdvancedTypography":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"83898f1c","element":"p","linkColor":"#000000","linkColorHover":"#abb8c3","showAdvancedTypography":true,"fontWeight":"700","fontSize":14,"textTransform":"uppercase","marginBottom":"20","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category"} --\x3e Category
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"98a0e67b","showAdvancedTypography":true,"fontSize":28,"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Title"} --\x3e Title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":25,"useThemeMoreLink":false} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"fed802f7","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"marginTop":"20","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"ee363d21","columns":2,"horizontalGap":0,"verticalAlignment":"flex-end","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"74fcc8db","isGrid":true,"gridId":"b23efd25","width":66.66,"widthMobile":66.66,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","marginTop":"15","isDynamic":true,"gpInlinePostMeta":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarSize":35,"avatarRounded":true} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"33ed7660","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","marginLeft":"10","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2def9732","element":"p","borderColor":"","showAdvancedTypography":true,"fontSize":15,"marginBottom":"0","borderSizeRight":"0","gpDynamicTextType":"post-author","gpDynamicTextReplace":"Post author name"} --\x3e Post author name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"dd34513e","element":"p","showAdvancedTypography":true,"fontSize":12,"marginRight":"10","marginBottom":"0","borderSizeBottom":"0","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3e Date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"6d144082","isGrid":true,"gridId":"b23efd25","width":33.33,"widthMobile":33.33,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","marginTop":"15","verticalAlignment":"center","alignment":"right","isDynamic":true,"gpInlinePostMetaJustify":"flex-end"} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"ee5c36a9","alignment":"right","marginTop":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"7c89fc64","hasUrl":true,"backgroundColor":"","textColor":"#000000","backgroundColorHover":"","textColorHover":"#abb8c3","fontWeight":"700","textTransform":"uppercase","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","gpDynamicLinkType":"single-post"} --\x3e More \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_3:{label:Object(r._x)("Layout with featured image overlay","label","gp-premim"),thumbnail:"content-template-overlay.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"99e0f8fe","minHeight":420,"paddingTop":"20","paddingRight":"20","paddingBottom":"20","paddingLeft":"20","borderRadiusTopRight":"12","borderRadiusBottomRight":"12","borderRadiusBottomLeft":"12","borderRadiusTopLeft":"12","gradient":true,"gradientDirection":180,"gradientColorOne":"#000000","gradientColorOneOpacity":0.62,"gradientColorTwoOpacity":0,"gradientSelector":"pseudo-element","textColor":"#ffffff","linkColor":"#ffffff","linkColorHover":"#ffffff","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"isDynamic":true,"gpDynamicImageBg":"featured-image"} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"864271b1","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"marginBottom":"10","isDynamic":true,"gpInlinePostMeta":true,"gpInlinePostMetaJustify":"space-between"} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"bc0ec4fa","element":"p","showAdvancedTypography":true,"fontWeight":"700","fontSize":13,"textTransform":"uppercase","marginRight":"10","marginBottom":"0","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category","gpDynamicTextTaxonomySeparator":" / "} --\x3e Category
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"5e2dac4c","element":"p","alignment":"right","showAdvancedTypography":true,"fontSize":12,"marginBottom":"0","hasIcon":true,"iconSize":1.4,"gpDynamicTextType":"comments-number","gpDynamicTextReplace":"COMMENTS","gpDynamicNoCommentsText":"0","gpDynamicSingleCommentText":"1","gpDynamicMultipleCommentsText":"%"} --\x3e COMMENTS
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"b1e898af","showAdvancedTypography":true,"fontSize":24,"marginUnit":"%","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Title"} --\x3e Title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"3413b754","alignment":"right","marginTop":"300","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"95f40917","hasUrl":true,"backgroundColor":"#ffffff","textColor":"#000000","backgroundColorHover":"#ffffff","backgroundColorHoverOpacity":0.75,"textColorHover":"#000000","borderColor":"#ffffff","borderColorHover":"#ffffff","showAdvancedTypography":true,"fontWeight":"700","fontSize":12,"textTransform":"uppercase","paddingTop":"10","paddingRight":"20","paddingBottom":"10","paddingLeft":"20","borderSizeTop":"1","borderSizeRight":"1","borderSizeBottom":"1","borderSizeLeft":"1","borderRadiusTopRight":"8","borderRadiusBottomRight":"8","borderRadiusBottomLeft":"8","borderRadiusTopLeft":"8","gpDynamicLinkType":"single-post"} --\x3e Read More \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_4:{label:Object(r._x)("Layout with slanted shape divider","label","gp-premim"),thumbnail:"content-template-slant.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"0af7ec3a","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"borderSizeTop":"0","borderSizeRight":"0","borderSizeBottom":"0","borderSizeLeft":"0","borderColor":"#000000","isDynamic":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"large"} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"cc5683f8","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"marginTop":"0","marginBottom":"0","zindex":1,"showAdvancedTypography":true,"fontSize":14,"shapeDividers":[{"shape":"gb-angle-1","color":"#ffffff","colorOpacity":1,"location":"bottom","height":50,"heightTablet":"","heightMobile":"","width":100,"widthTablet":"","widthMobile":"","flipHorizontally":false,"zindex":""}],"isDynamic":true} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"7f6bf8cd","paddingTop":"0","paddingRight":"25","paddingBottom":"15","paddingLeft":"25","marginTop":"0","marginRight":"0","marginBottom":"0","marginLeft":"0","backgroundColor":"#ffffff","zindex":1,"showAdvancedTypography":true,"shapeDividers":[],"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"7fd9c317","element":"p","showAdvancedTypography":true,"fontSize":14,"marginBottom":"5","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicDateUpdated":true} --\x3e Post date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"a8ee15fd","showAdvancedTypography":true,"fontSize":30,"marginBottom":"15","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World"} --\x3e Hello World
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":25,"useThemeMoreLink":false} /--\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"bc9ef703","alignment":"right","marginTop":"15","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"120ee35e","hasUrl":true,"backgroundColor":"","textColor":"#000000","backgroundColorHover":"#222222","textColorHover":"#ffffff","showAdvancedTypography":true,"fontWeight":"700","textTransform":"uppercase","paddingTop":"15","paddingRight":"20","paddingBottom":"15","paddingLeft":"20","gpDynamicLinkType":"single-post"} --\x3e Read More \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_5:{label:Object(r._x)("Layout with centered content","label","gp-premim"),thumbnail:"content-template-centered.jpg",content:'\x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"large"} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"5a785d21","paddingTop":"25","paddingRight":"25","paddingBottom":"25","paddingLeft":"25","paddingSyncUnits":true,"backgroundColor":"#ffffff","alignment":"center","showAdvancedTypography":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"82629d5c","linkColor":"#000000","showAdvancedTypography":true,"fontWeight":"700","fontSize":25,"gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World"} --\x3e Hello World
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":15,"useThemeMoreLink":false} /--\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"ad806696","alignment":"center","marginTop":"20","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"a1b8a609","hasUrl":true,"backgroundColor":"#cf2e2e","textColor":"#ffffff","backgroundColorHover":"#222222","textColorHover":"#ffffff","showAdvancedTypography":true,"fontSize":15,"textTransform":"uppercase","paddingTop":"8","paddingRight":"20","paddingBottom":"8","paddingLeft":"20","borderRadiusTopRight":"50","borderRadiusBottomRight":"50","borderRadiusBottomLeft":"50","borderRadiusTopLeft":"50","gpDynamicLinkType":"single-post"} --\x3e Read more \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_6:{label:Object(r._x)("Layout with borders","label","gp-premim"),thumbnail:"content-template-borders.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"0af4cc7c","paddingTop":"5","paddingRight":"5","paddingBottom":"5","paddingLeft":"5","paddingSyncUnits":true,"borderSizeTop":"1","borderSizeRight":"1","borderSizeBottom":"1","borderSizeLeft":"1","borderRadiusTopRight":"2","borderRadiusBottomRight":"2","borderRadiusBottomLeft":"2","borderRadiusTopLeft":"2","borderColor":"#b6b6b6","backgroundColor":"#ffffff","isDynamic":true} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"large"} /--\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"b69b5c43","paddingTop":"30","paddingRight":"30","paddingBottom":"30","paddingLeft":"30","paddingSyncUnits":true,"showAdvancedTypography":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"8dfa4238","element":"p","textColor":"#0693e3","showAdvancedTypography":true,"fontWeight":"700","fontSize":14,"textTransform":"uppercase","marginBottom":"5","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Terms","gpDynamicTextTaxonomy":"category"} --\x3e Terms
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"29491daa","showAdvancedTypography":true,"fontSize":30,"marginBottom":"15","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Hello World"} --\x3e Hello World
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":25,"useThemeMoreLink":false} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"d5dadc43","paddingTop":"15","paddingRight":"10","paddingBottom":"10","paddingLeft":"10","borderSizeTop":"1","borderColor":"#b6b6b6","showAdvancedTypography":true,"fontSize":14,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"3da68acd","columns":2,"verticalAlignment":"center","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"2c30b1f9","isGrid":true,"gridId":"3da68acd","widthMobile":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"fc06eba3","element":"p","textColor":"#b6b6b6","showAdvancedTypography":true,"fontSize":14,"marginBottom":"0","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicTextTaxonomy":"category","gpDynamicDateUpdated":true} --\x3e Post date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"9bb8c373","isGrid":true,"gridId":"3da68acd","widthMobile":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"afc412f8","alignment":"right","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"0fcad1cd","hasUrl":true,"backgroundColor":"","textColor":"#0693e3","backgroundColorHover":"#222222","textColorHover":"#ffffff","borderColor":"#0693e3","borderColorHover":"#222222","textTransform":"uppercase","paddingTop":"8","paddingRight":"12","paddingBottom":"8","paddingLeft":"12","borderSizeTop":"2","borderSizeRight":"2","borderSizeBottom":"2","borderSizeLeft":"2","borderRadiusTopRight":"2","borderRadiusBottomRight":"2","borderRadiusBottomLeft":"2","borderRadiusTopLeft":"2","gpDynamicLinkType":"single-post"} --\x3e Read more \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"500"},{key:"_generate_use_theme_post_container",value:!1}]},template_7:{label:Object(r._x)("Landscape layout","label","gp-premium"),thumbnail:"content-template-landscape.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"918d68ce","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"ae18e4a9","columns":2,"verticalGapMobile":10,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ff15641f","isGrid":true,"gridId":"ae18e4a9","width":40,"widthTablet":40,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true,"gpRemoveContainerCondition":"no-featured-image"} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"featured-image","imageSize":"medium_large","linkTo":"single-post"} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"64596747","isGrid":true,"gridId":"ae18e4a9","width":60,"widthTablet":60,"paddingTop":"0","paddingRight":"20","paddingBottom":"10","paddingLeft":"0","paddingTopMobile":"10","paddingRightMobile":"10","paddingBottomMobile":"10","paddingLeftMobile":"10","verticalAlignment":"center","showAdvancedTypography":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"ce3f6f48","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","marginBottom":"10","showAdvancedTypography":true,"isDynamic":true,"gpInlinePostMeta":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"fdbba1f9","element":"p","showAdvancedTypography":true,"fontWeight":"900","fontSize":14,"textTransform":"uppercase","marginRight":"10","marginBottom":"0","paddingRight":"10","borderSizeRight":"1","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category"} --\x3e Category
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"6df4d39e","element":"p","showAdvancedTypography":true,"fontSize":14,"marginRight":"10","marginBottom":"0","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3e Date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"84923e14","showAdvancedTypography":true,"fontSize":28,"marginBottom":"20","gpDynamicTextType":"title","gpDynamicLinkType":"single-post","gpDynamicTextReplace":"Title"} --\x3e Title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","excerptLength":20} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_block_element_editor_width_unit",value:"px"},{key:"_generate_block_element_editor_width",value:"800"},{key:"_generate_use_theme_post_container",value:!0}]}},Se={template_1:{label:Object(r._x)("Default next and previous buttons","label","gp-premium"),thumbnail:"archive-navigation-buttons-2.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"fb6c192f","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"fe27e101","columns":2,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"af38c5d0","isGrid":true,"gridId":"fe27e101","widthMobile":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"9396ea35","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"aa4ef21a","hasUrl":true,"hasIcon":true,"backgroundColor":"","textColor":"","backgroundColorHover":"","textColorHover":"","className":"button","gpDynamicLinkType":"previous-posts"} --\x3e Previous \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4f3ab895","isGrid":true,"gridId":"fe27e101","widthMobile":50,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"8fcd7911","alignment":"right","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"84010058","hasUrl":true,"hasIcon":true,"iconLocation":"right","backgroundColor":"","textColor":"","backgroundColorHover":"","textColorHover":"","iconPaddingRight":"","iconPaddingLeft":"0.5","className":"button","gpDynamicLinkType":"next-posts"} --\x3e Next \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_main_content"},{key:"_generate_hook_priority",value:"20"},{key:"_generate_disable_archive_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!0}]},template_2:{label:Object(r._x)("Rounded buttons with icon","label","gp-premium"),thumbnail:"archive-navigation-buttons-1.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"5edb5029","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button-container {"uniqueId":"c7866401","alignment":"center","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"4c23c469","hasUrl":true,"hasIcon":true,"removeText":true,"ariaLabel":"Previous page","backgroundColor":"#ffffff","textColor":"#000000","backgroundColorHover":"#222222","textColorHover":"#ffffff","borderColor":"#000000","marginTop":"5","marginRight":"5","marginBottom":"5","marginLeft":"5","paddingTop":"20","paddingRight":"20","paddingBottom":"20","paddingLeft":"20","borderSizeTop":"1","borderSizeRight":"1","borderSizeBottom":"1","borderSizeLeft":"1","borderRadiusTopRight":"100","borderRadiusBottomRight":"100","borderRadiusBottomLeft":"100","borderRadiusTopLeft":"100","gpDynamicLinkType":"previous-posts"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- wp:generateblocks/button {"uniqueId":"55622f43","hasUrl":true,"hasIcon":true,"removeText":true,"ariaLabel":"Next page","backgroundColor":"#ffffff","textColor":"#000000","backgroundColorHover":"#222222","textColorHover":"#ffffff","borderColor":"#000000","marginTop":"5","marginRight":"5","marginBottom":"5","marginLeft":"5","paddingTop":"20","paddingRight":"20","paddingBottom":"20","paddingLeft":"20","borderSizeTop":"1","borderSizeRight":"1","borderSizeBottom":"1","borderSizeLeft":"1","borderRadiusTopRight":"100","borderRadiusBottomRight":"100","borderRadiusBottomLeft":"100","borderRadiusTopLeft":"100","gpDynamicLinkType":"next-posts"} --\x3e \x3c!-- /wp:generateblocks/button --\x3e \x3c!-- /wp:generateblocks/button-container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_main_content"},{key:"_generate_hook_priority",value:"20"},{key:"_generate_disable_archive_navigation",value:!0},{key:"_generate_use_archive_navigation_container",value:!1}]}},Re={template_1:{label:Object(r._x)("Basic single post page hero","label","gp-premium"),thumbnail:"page-hero-basic.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"8b6d1c4b","paddingTop":"150","paddingBottom":"150","backgroundColor":"#000000","textColor":"#ffffff","linkColor":"#ffffff","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"bgOptions":{"selector":"pseudo-element","opacity":0.3,"overlay":false,"position":"center center","size":"cover","repeat":"no-repeat","attachment":""},"alignment":"center","isDynamic":true,"gpDynamicImageBg":"featured-image"} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"62a8b2cc","element":"h1","showAdvancedTypography":true,"fontSize":50,"gpDynamicTextType":"title","gpDynamicTextReplace":"Page Title"} --\x3e Page Title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"f49b9f49","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"isDynamic":true,"gpInlinePostMeta":true,"gpInlinePostMetaJustify":"center"} --\x3e \x3c!-- wp:generatepress/dynamic-image {"imageType":"author-avatar","avatarRounded":true} /--\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"2e715b13","element":"p","marginBottom":"0","marginLeft":"10","gpDynamicTextType":"post-author","gpDynamicTextReplace":"Author name"} --\x3e Author name
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"dedbe2c8","element":"p","marginBottom":"0","marginLeft":"20","paddingLeft":"20","borderSizeLeft":"1","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Post date","gpDynamicDateUpdated":true} --\x3e Post date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_header"},{key:"_generate_disable_title",value:!0},{key:"_generate_disable_featured_image",value:!0},{key:"_generate_disable_primary_post_meta",value:!0}]},template_2:{label:Object(r._x)("Single post hero with excerpt","label","gp-premium"),thumbnail:"page-hero-excerpt.jpg",content:'\x3c!-- wp:generateblocks/container {"uniqueId":"70385d72","paddingTop":"80","paddingRight":"40","paddingBottom":"80","paddingLeft":"40","isDynamic":true} --\x3e \x3c!-- wp:generateblocks/grid {"uniqueId":"5dc55b95","columns":2,"horizontalGap":80,"verticalGap":20,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"579e5b87","isGrid":true,"gridId":"fde86e48","width":45,"widthTablet":60,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","verticalAlignment":"center","showAdvancedTypography":true,"fontSize":14,"isDynamic":true} --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"d909e043","paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","paddingSyncUnits":true,"marginBottom":"10","isDynamic":true,"gpInlinePostMeta":true} --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"9fdb86dc","element":"p","textColor":"#000000","linkColor":"#000000","showAdvancedTypography":true,"fontWeight":"900","fontSize":14,"textTransform":"uppercase","marginRight":"10","marginBottom":"0","paddingRight":"10","borderSizeRight":"1","className":"dynamic-term-class","gpDynamicTextType":"terms","gpDynamicLinkType":"term-archives","gpDynamicTextReplace":"Category","gpDynamicTextTaxonomy":"category"} --\x3e Category
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"1ee4cbcf","element":"p","showAdvancedTypography":true,"fontSize":14,"marginRight":"10","marginBottom":"0","gpDynamicTextType":"post-date","gpDynamicTextReplace":"Date","gpDynamicDateUpdated":true} --\x3e Date
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/headline {"uniqueId":"56c7eb13","marginBottom":"10","gpDynamicTextType":"title","gpDynamicTextReplace":"Title"} --\x3e Title
\x3c!-- /wp:generateblocks/headline --\x3e \x3c!-- wp:generatepress/dynamic-content {"contentType":"post-excerpt","useThemeMoreLink":false} /--\x3e \x3c!-- /wp:generateblocks/container --\x3e \x3c!-- wp:generateblocks/container {"uniqueId":"4e92c4e8","isGrid":true,"gridId":"fde86e48","width":55,"widthTablet":40,"minHeight":400,"minHeightMobile":250,"paddingTop":"0","paddingRight":"0","paddingBottom":"0","paddingLeft":"0","bgImage":{"id":"","image":{"url":"#dynamic-background-image"}},"bgOptions":{"selector":"element","opacity":1,"overlay":false,"position":"center center","size":"cover","repeat":"no-repeat","attachment":""},"isDynamic":true,"gpDynamicImageBg":"featured-image","gpUseFallbackImageBg":true} /--\x3e \x3c!-- /wp:generateblocks/grid --\x3e \x3c!-- /wp:generateblocks/container --\x3e',meta:[{key:"_generate_hook",value:"generate_after_header"},{key:"_generate_disable_title",value:!0},{key:"_generate_disable_featured_image",value:!0},{key:"_generate_disable_primary_post_meta",value:!0}]}},Ie=n(20),Le=n(21),Be=n(32);function Ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Pe(e){for(var t=1;t0&&j(i)}},void 0!==P[e].thumbnail&&!!P[e].thumbnail&&Object(a.createElement)(G.a,{overflow:!0,once:!0},Object(a.createElement)("img",{src:gpPremiumBlockElements.templateImageUrl+"/"+P[e].thumbnail,alt:P[e].label})),Object(a.createElement)("div",{className:"gpp-block-template-label"},P[e].label))})))),("right-sidebar"===c||"left-sidebar"===c)&&Object(a.createElement)(l.Notice,{status:"info",isDismissible:!1,className:"gpp-block-element-notice"},Object(r.__)("This will remove the current sidebar widgets for the selected sidebar. Your layout must have a sidebar set for this Element to show.","gp-premium")),"site-footer"===c&&Object(a.createElement)(l.BaseControl,null,Object(a.createElement)(l.Notice,{status:"info",isDismissible:!1,className:"gpp-block-element-notice"},Object(r.__)("This Element will replace your site footer area that holds your copyright message. It will not replace footer widgets if they exist.","gp-premium"))),"post-meta-template"===c&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Location","gp-premium"),value:u,options:[{label:Object(r.__)("After post title","gp-premium"),value:"after-post-title"},{label:Object(r.__)("Before post title","gp-premium"),value:"before-post-title"},{label:Object(r.__)("After content","gp-premium"),value:"after-content"},{label:Object(r.__)("Custom","gp-premium"),value:"custom"}],onChange:function(e){j({_generate_post_meta_location:e})}})),E.length>1&&Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Quick hook select","gp-premium"),value:p||"",options:E,onChange:function(e){j({_generate_hook:e})}}),(!c||"hook"===c||"page-hero"===c||"post-navigation-template"===c||"archive-navigation-template"===c||"post-meta-template"===c&&"custom"===u)&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.BaseControl,{id:"gpp-hook-select",label:Object(r.__)("Hook name","gp-premium"),className:"gpp-hook-select"},Object(a.createElement)(Te,{options:I,className:function(e){return"container"===e?"gpp-block-element-search-select":"input"===e?"components-text-control__input":"select-search__"+e},value:p,placeholder:Object(r.__)("Choose your hook","gp-premium"),search:!0,onChange:function(e){j({_generate_hook:e||""})}})),"custom"===p&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Custom hook name","gp-premium"),type:"text",onChange:function(e){j({_generate_custom_hook:e||""})},value:s||""}),!!p&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Priority","gp-premium"),type:"text",onChange:function(e){j({_generate_hook_priority:e||""})},value:d||"",placeholder:"10"})),"post-meta-template"===c&&Object(a.createElement)(a.Fragment,null,(""===u||"after-post-title"===u||"before-post-title"===u||"custom"===u)&&Object(a.createElement)(l.ToggleControl,{checked:!!m,label:Object(r.__)("Replace default primary post meta","gp-premium"),onChange:function(e){j({_generate_disable_primary_post_meta:e})}}),("after-content"===u||"custom"===u)&&Object(a.createElement)(l.ToggleControl,{checked:!!b,label:Object(r.__)("Replace default secondary post meta","gp-premium"),onChange:function(e){j({_generate_disable_secondary_post_meta:e})}})),"content-template"===c&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Tag name","gp-premium"),value:g,options:[{label:"article",value:"article"},{label:"div",value:"div"},{label:"section",value:"section"},{label:"aside",value:"aside"}],onChange:function(e){j({_generate_post_loop_item_tagname:e})}}),Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Apply to","gp-premium"),value:x,options:[{label:Object(r.__)("All posts","gp-premium"),value:""},{label:Object(r.__)("Posts with term","gp-premium"),value:"has-term"},{label:Object(r.__)("Posts with custom field","gp-premium"),value:"has-post-meta"},{label:Object(r.__)("First post","gp-premium"),value:"is-first-post"}],onChange:function(e){j({_generate_post_loop_item_display:e})}}),""!==x&&Object(a.createElement)(a.Fragment,null,"has-term"===x&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.SelectControl,{label:Object(r.__)("Taxonomy","gp-premium"),value:_,options:L,onChange:function(e){j({_generate_post_loop_item_display_tax:e})}}),!!_&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Term name","gp-premium"),type:"text",onChange:function(e){j({_generate_post_loop_item_display_term:e||""})},value:v||""})),"has-post-meta"===x&&Object(a.createElement)(l.TextControl,{label:Object(r.__)("Post meta name","gp-premium"),type:"text",onChange:function(e){j({_generate_post_loop_item_display_post_meta:e||""})},value:k||""}),M.length>0&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.BaseControl,null,Object(a.createElement)(l.ComboboxControl,{className:"editor-page-attributes__parent",label:Object(r.__)("Parent Element","gp-premium"),help:Object(r.__)("Set a parent Element to inherit in case the above conditions do not apply.","gp-premim"),value:S,options:M,onFilterValueChange:function(e){e&&V()(C(e),300)},onChange:function(e){C(e)}})),!!S&&Object(a.createElement)(l.TextControl,{type:"number",label:Object(r.__)("Display Order","gp-premium"),onChange:function(e){D(e)},value:R}))),Object(a.createElement)(l.ToggleControl,{checked:!!y,label:Object(r.__)("Keep default post container","gp-premium"),onChange:function(e){j({_generate_use_theme_post_container:e})}})),"page-hero"===c&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.ToggleControl,{checked:!!f,label:Object(r.__)("Disable title","gp-premium"),onChange:function(e){j({_generate_disable_title:e})}}),Object(a.createElement)(l.ToggleControl,{checked:!!h,label:Object(r.__)("Disable featured image","gp-premium"),onChange:function(e){j({_generate_disable_featured_image:e})}}),Object(a.createElement)(l.ToggleControl,{checked:!!m,label:Object(r.__)("Disable primary post meta","gp-premium"),onChange:function(e){j({_generate_disable_primary_post_meta:e})}})),"site-footer"===c&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.TextControl,{className:"gpp-block-dynamic-year",type:"text",readOnly:!0,value:"{{current_year}}",label:Object(r.__)("Current year template tag","gp-premium"),help:Object(r.__)("Use the above template tag to add the current year to your footer.","gp-premium")})),"post-navigation-template"===c&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.ToggleControl,{checked:!!w,label:Object(r.__)("Disable default post navigation","gp-premium"),onChange:function(e){j({_generate_disable_post_navigation:e})}}),Object(a.createElement)(l.ToggleControl,{checked:!!O,label:Object(r.__)("Add default archive navigation container","gp-premium"),onChange:function(e){j({_generate_use_archive_navigation_container:e})}})),"archive-navigation-template"===c&&Object(a.createElement)(a.Fragment,null,Object(a.createElement)(l.ToggleControl,{checked:!!T,label:Object(r.__)("Disable default pagination","gp-premium"),onChange:function(e){j({_generate_disable_archive_navigation:e})}}),Object(a.createElement)(l.ToggleControl,{checked:!!O,label:Object(r.__)("Keep default archive navigation container","gp-premium"),onChange:function(e){j({_generate_use_archive_navigation_container:e})}}))))}}]),c}(a.Component),ze=Object(Be.withSelect)((function(e){var t=e("core/editor").getEditedPostAttribute;return{meta:t("meta"),elementParent:t("parent"),elementMenuOrder:t("menu_order")}})),qe=Object(Be.withDispatch)((function(e,t){var n=t.meta,a=e("core/editor").editPost;return{updateMeta:function(e){a({meta:Pe(Pe({},n),e)})},updateParentId:function(e){a({parent:e})},updateOrder:function(e){a({menu_order:e})}}})),Ae=Object(p.compose)([ze,qe])(Me);Object(Ie.registerPlugin)("generatepress-block-element",{icon:null,render:Ae})}]);
\ No newline at end of file
diff --git a/wp-content/plugins/gp-premium/dist/editor.asset.php b/wp-content/plugins/gp-premium/dist/editor.asset.php
new file mode 100644
index 00000000..f62c15ef
--- /dev/null
+++ b/wp-content/plugins/gp-premium/dist/editor.asset.php
@@ -0,0 +1 @@
+ array('wp-edit-post', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-plugins', 'wp-polyfill'), 'version' => 'bd343256121c2eef56d86e2530482c0e');
\ No newline at end of file
diff --git a/wp-content/plugins/gp-premium/dist/editor.css b/wp-content/plugins/gp-premium/dist/editor.css
new file mode 100644
index 00000000..1f941b91
--- /dev/null
+++ b/wp-content/plugins/gp-premium/dist/editor.css
@@ -0,0 +1,2 @@
+.gpp-active-element-type{color:#555;font-size:11px;text-transform:uppercase}
+
diff --git a/wp-content/plugins/gp-premium/dist/editor.js b/wp-content/plugins/gp-premium/dist/editor.js
new file mode 100644
index 00000000..0defa84c
--- /dev/null
+++ b/wp-content/plugins/gp-premium/dist/editor.js
@@ -0,0 +1 @@
+!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=54)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},11:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},16:function(e,t){e.exports=window.wp.htmlEntities},18:function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},19:function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},20:function(e,t){e.exports=window.wp.plugins},21:function(e,t){e.exports=window.wp.editPost},4:function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},51:function(e,t,n){},54:function(e,t,n){"use strict";n.r(t);var r=n(6),o=n.n(r),c=n(7),i=n.n(c),u=n(8),l=n.n(u),f=n(9),p=n.n(f),a=n(4),s=n.n(a),m=n(0),b=(n(51),n(1)),y=n(20),d=n(21),g=n(16);var O=function(e){l()(c,e);var t,n,r=(t=c,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=s()(t);if(n){var o=s()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return p()(this,e)});function c(){return o()(this,c),r.apply(this,arguments)}return i()(c,[{key:"render",value:function(){var e=gpPremiumEditor.activeElements;return!e||e.length<1?null:gpPremiumEditor.postTypeIsPublic?Object(m.createElement)(d.PluginDocumentSettingPanel,{name:"generatepress-elements-info",title:Object(b.__)("Active Elements","gp-premium"),className:"gpp-element-info-panel gpp-element-panel-label"},Object(m.createElement)(m.Fragment,null,Object(m.createElement)("ul",{className:"gpp-active-elements"},Object.keys(e).map((function(t,n){return Object(m.createElement)("li",{key:"gpp-active-block-element-".concat(n)},Object(m.createElement)("a",{href:e[t].url+"&action=edit"},Object(g.decodeEntities)(e[t].name))," ",Object(m.createElement)("span",{className:"gpp-active-element-type"},"- ",e[t].type))}))),Object(m.createElement)("a",{href:gpPremiumEditor.elementsUrl,className:"components-button is-secondary"},Object(b.__)("All Elements","gp-premium")))):null}}]),c}(m.Component);Object(y.registerPlugin)("generatepress-elements-info-panel",{icon:null,render:O})},6:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},7:function(e,t){function n(e,t){for(var n=0;n array('react', 'wp-api-fetch', 'wp-components', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => 'fce74c8619052abc4fcc40dbeb6704bb');
\ No newline at end of file
diff --git a/wp-content/plugins/gp-premium/dist/site-library.css b/wp-content/plugins/gp-premium/dist/site-library.css
new file mode 100644
index 00000000..ff235671
--- /dev/null
+++ b/wp-content/plugins/gp-premium/dist/site-library.css
@@ -0,0 +1,2 @@
+.generatepress-site-library{max-width:1200px;margin:0 auto;padding:0 20px;box-sizing:border-box}.generatepress-site-library .generatepress-site-library-opened{width:100%;height:100vh;display:flex;position:fixed;top:0;right:0;bottom:0;left:0;z-index:99999}.generatepress-site-library .generatepress-site-library-info{width:300px;background:#fff;border-left:1px solid #ddd;position:relative;padding-bottom:50px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-header{display:flex;justify-content:space-between;padding-left:20px;border-bottom:1px solid #ddd}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-header button{height:auto;border-left:1px solid #ddd}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-footer{position:absolute;bottom:0;left:0;right:0;display:flex;border-top:1px solid #ddd}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-footer button{flex-grow:1;justify-content:center;height:50px;font-size:20px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-footer button:not(:last-child){border-right:1px solid #ddd}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-content{padding:20px;height:calc(100% - 53px);overflow-y:auto;box-sizing:border-box}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-content>p:first-child{margin-top:0}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-content h3{margin-top:30px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-content h3+.gpp-library-action-button{margin-top:10px}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-plugins{list-style-type:disc;margin-left:1.5em;font-size:12px;margin-bottom:0}.generatepress-site-library .generatepress-site-library-info .generatepress-site-library-plugins li{margin-bottom:0}.generatepress-site-library .generatepress-site-library-iframe{background:#fff;width:calc(100% - 300px);display:flex;justify-content:center}.generatepress-site-library .generatepress-site-library-iframe iframe{width:100%;height:100%}.generatepress-site-library .gpp-library-action-button{display:flex;align-items:center;margin-top:30px}.generatepress-site-library .gpp-library-action-button button .components-spinner{margin:0;background:#000}.generatepress-site-library .gpp-library-action-button .gpp-library-action-message{padding-left:10px}.generatepress-site-library .generatepress-site-library-filter{display:flex;padding:20px;background:#fff;border:1px solid #ddd;margin-bottom:40px;border-radius:4px}.generatepress-site-library .generatepress-site-library-filter>.components-base-control{margin-right:20px}.generatepress-site-library .generatepress-site-library-filter>.components-base-control .components-base-control__field{margin-bottom:0}.generatepress-site-library .generatepress-site-library-filter .components-select-control label{font-size:11px}.generatepress-site-library-list{display:flex;flex-wrap:wrap;padding:0;list-style:none;margin-left:-30px}.generatepress-site-library-list>.generatepress-site-library-list-item{flex:0 0 33.333%;width:33.333%;padding-left:30px;padding-bottom:30px;box-sizing:border-box}@media screen and (max-width: 840px){.generatepress-site-library-list>.generatepress-site-library-list-item{flex:0 0 50%;width:50%}}@media screen and (max-width: 450px){.generatepress-site-library-list>.generatepress-site-library-list-item{flex:0 0 100%;width:100%}}.generatepress-site-library-list>.generatepress-site-library-list-item>button{display:block;width:100%;cursor:pointer;padding:5px;text-align:center;background-color:#fff;border:1px solid #ddd;border-radius:4px;box-shadow:0 0 0 2px transparent;transition:.2s border-color, .2s box-shadow}.generatepress-site-library-list>.generatepress-site-library-list-item>button:hover,.generatepress-site-library-list>.generatepress-site-library-list-item>button:focus,.generatepress-site-library-list>.generatepress-site-library-list-item>button:active{box-shadow:0 0 0 2px #216eb7}.generatepress-site-library-list>.generatepress-site-library-list-item>button .generatepress-site-library-list-item-image{position:relative;display:block}.generatepress-site-library-list>.generatepress-site-library-list-item>button .generatepress-site-library-list-item-image img{display:block;width:100%;height:auto;border-top-left-radius:4px;border-top-right-radius:4px}.generatepress-site-library-list>.generatepress-site-library-list-item .generatepress-site-library-list-item-title{padding:20px 20px 10px;font-size:20px}.generatepress-site-library-list>.generatepress-site-library-list-item .generatepress-site-library-list-item-title .generatepress-site-library-required-version{font-size:12px;color:#000;display:block;padding-top:5px}.generatepress-site-library-restore{background:#fff;padding:40px;border:1px solid #ddd}.generatepress-site-library-restore h2{margin-top:0;font-size:25px}.components-placeholder.gpp-library-placeholder{background:transparent;border:0;box-shadow:0 0 0}.components-placeholder.gpp-library-placeholder .components-placeholder__fieldset{justify-content:center}.generatepress-site-library-no-results{padding:50px;text-align:center}.generatepress-site-library-refresh button .components-spinner,.generatepress-site-library-no-results button .components-spinner{margin:0;background:#000}.generatepress-site-library-refresh{text-align:center}.appearance_page_generatepress-library #wpcontent,.appearance_page_generatepress-library #wpbody-content .metabox-holder{padding:0}.site-library-header{background-color:#fff;box-shadow:0 1px 0 rgba(200,215,225,0.5),0 1px 2px #DDD;margin-bottom:40px;padding:20px}.site-library-header .site-library-container{max-width:1200px;margin:0 auto;padding:0 20px;box-sizing:border-box;display:flex}.site-library-header .library-links{margin-left:auto}.site-library-header .library-links a{display:inline-block;margin:0 10px}.site-library-header .library-title{font-size:20px;color:#000;font-weight:500}.generatepress-dashboard-tabs{max-width:1200px;margin:0 auto;padding:0 20px;box-sizing:border-box}
+
diff --git a/wp-content/plugins/gp-premium/dist/site-library.js b/wp-content/plugins/gp-premium/dist/site-library.js
new file mode 100644
index 00000000..07f5997d
--- /dev/null
+++ b/wp-content/plugins/gp-premium/dist/site-library.js
@@ -0,0 +1,5 @@
+!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=53)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.components},function(e,t){e.exports=window.React},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){e.exports=n(26)()},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n=0&&y-j[0]<=f&&y+h+j[1]>=0}(e,n):function(e){var t=e.ref;if(!(t.offsetWidth||t.offsetHeight||t.getClientRects().length))return!1;var n=void 0,r=void 0;try{var i=t.getBoundingClientRect();n=i.top,r=i.height}catch(e){n=0,r=0}var s=window.innerHeight||document.documentElement.clientHeight,a=Array.isArray(e.props.offset)?e.props.offset:[e.props.offset,e.props.offset];return n-a[0]<=s&&n+r+a[1]>=0}(e))?e.visible||(e.props.once&&h.push(e),e.visible=!0,e.forceUpdate()):e.props.once&&e.visible||(e.visible=!1,e.props.unmountIfInvisible&&e.forceUpdate())}},_=function(){h.forEach((function(e){var t=b.indexOf(e);-1!==t&&b.splice(t,1)})),h=[]},E=function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{};return function(t){return function(n){function i(){m(this,i);var e=f(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return e.displayName="LazyLoad"+k(t),e}return g(i,n),r(i,[{key:"render",value:function(){return s.default.createElement(C,e,s.default.createElement(t,this.props))}}]),i}(i.Component)}},t.default=C,t.forceCheck=E,t.forceVisible=function(){for(var e=0;ee.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?r=setTimeout(l,t-c):(r=null,n||(o=e.apply(s,i),r||(s=null,i=null)))};return function(){s=this,i=arguments,a=+new Date;var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(o=e.apply(s,i),s=null,i=null),o}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){var r,i;return t||(t=250),function(){var s=n||this,a=+new Date,o=arguments;r&&a0?t.installPlugins(n):t.importContent(n):(n.textContent=Object(y.__)("Import Complete","gp-premium"),t.setState({isAPIWorking:!1,importComplete:!0,hasBackup:!0}))}),2e3)}))}},{key:"installPlugins",value:function(e){var t=this;void 0!==e.target&&(e=e.target.nextElementSibling),e.classList.add("gpp-library-action-message--show"),e.textContent=Object(y.__)("Installing plugins","gp-premium"),Object.entries(this.state.hasData.plugin_data).forEach((function(n){var r=i()(n,2),s=r[0],a=r[1],o=a.slug.split("/")[0],l=a.name;a.installed?(delete t.state.hasData.plugin_data[s],0===Object.keys(t.state.hasData.plugin_data).length&&t.activatePlugins(e)):("bb-plugin"===o&&(o="beaver-builder-lite-version",l="Beaver Builder Lite"),e.textContent=Object(y.sprintf)(
+/* translators: Installing "Plugin Name" */
+Object(y.__)("Installing %s","gp-premium"),l),wp.updates.installPlugin({slug:o,success:function(n){console.log(n),delete t.state.hasData.plugin_data[s],0===Object.keys(t.state.hasData.plugin_data).length&&t.activatePlugins(e)},error:function(n){console.log(n),delete t.state.hasData.plugin_data[s],0===Object.keys(t.state.hasData.plugin_data).length&&t.activatePlugins(e)}}))}))}},{key:"activatePlugins",value:function(e){var t=this;e.classList.add("gpp-library-action-message--show"),e.textContent=Object(y.__)("Activating plugins","gp-premium"),w()({path:"/generatepress-site-library/v1/activate_plugins",method:"POST",data:{siteData:this.state.siteData,siteSlug:this.state.siteData.name.replace(/\s+/g,"_").toLowerCase(),importOptions:this.state.importOptions,importContent:this.state.importContent}}).then((function(n){e.textContent=n.response,n.success&&n.response||e.classList.add("gblocks-action-message--error"),setTimeout((function(){t.importContent(e)}),2e3)}))}},{key:"importContent",value:function(e){var t=this;e.classList.add("gpp-library-action-message--show"),e.textContent=Object(y.__)("Importing content","gp-premium"),w()({path:"/generatepress-site-library/v1/import_content",method:"POST",data:{siteData:this.state.siteData,siteSlug:this.state.siteData.name.replace(/\s+/g,"_").toLowerCase(),importOptions:this.state.importOptions,importContent:this.state.importContent}}).then((function(n){e.textContent=n.response,n.success&&n.response||e.classList.add("gblocks-action-message--error"),setTimeout((function(){t.importSiteOptions(e)}),2e3)}))}},{key:"importSiteOptions",value:function(e){var t=this;e.classList.add("gpp-library-action-message--show"),e.textContent=Object(y.__)("Importing site options","gp-premium"),w()({path:"/generatepress-site-library/v1/import_site_options",method:"POST",data:{siteData:this.state.siteData,siteSlug:this.state.siteData.name.replace(/\s+/g,"_").toLowerCase(),importOptions:this.state.importOptions,importContent:this.state.importContent}}).then((function(n){e.textContent=n.response,n.success&&n.response||e.classList.add("gblocks-action-message--error"),setTimeout((function(){t.state.hasWidgets?t.importWidgets(e):(e.textContent=Object(y.__)("Import Complete","gp-premium"),t.setState({isAPIWorking:!1,importComplete:!0,hasBackup:!0}))}),2e3)}))}},{key:"importWidgets",value:function(e){var t=this;e.classList.add("gpp-library-action-message--show"),e.textContent=Object(y.__)("Importing widgets","gp-premium"),w()({path:"/generatepress-site-library/v1/import_widgets",method:"POST",data:{siteData:this.state.siteData,siteSlug:this.state.siteData.name.replace(/\s+/g,"_").toLowerCase(),importOptions:this.state.importOptions,importContent:this.state.importContent}}).then((function(n){e.textContent=n.response,n.success&&n.response||e.classList.add("gblocks-action-message--error"),setTimeout((function(){e.textContent=Object(y.__)("Import Complete","gp-premium"),t.setState({isAPIWorking:!1,importComplete:!0,hasBackup:!0})}),2e3)}))}},{key:"restoreBackup",value:function(e){var t=this,n=e.target.nextElementSibling;n.classList.add("gpp-library-action-message--show"),n.textContent=Object(y.__)("Restoring theme options","gp-premium"),w()({path:"/generatepress-site-library/v1/restore_theme_options",method:"POST"}).then((function(e){n.textContent=e.response,e.success&&e.response||n.classList.add("gblocks-action-message--error"),setTimeout((function(){n.textContent=Object(y.__)("Restoring content","gp-premium"),w()({path:"/generatepress-site-library/v1/restore_content",method:"POST"}).then((function(e){n.textContent=e.response,e.success&&e.response||n.classList.add("gblocks-action-message--error"),t.setState({isAPIWorking:!1,hasBackup:!1})}))}),2e3)}))}},{key:"render",value:function(){var e=this;if(!this.state.isAPILoaded)return Object(h.createElement)(j.Placeholder,{className:"gpp-library-placeholder"},Object(h.createElement)(j.Spinner,null));var t=this.state.allSites;if(!t||"no results"===t)return Object(h.createElement)("div",{className:"generatepress-site-library-no-results"},Object(h.createElement)("p",null,Object(y.__)("No sites were found.","gp-premium")," ",Object(h.createElement)("a",{href:"https://docs.generatepress.com/article/site-library-unavailable/",target:"_blank",rel:"noreferrer noopener"},Object(y.__)("Why?","gp-premium"))),Object(h.createElement)(j.Button,{isPrimary:!0,onClick:function(){e.setState({refreshingSites:!0}),w()({path:"/generatepress-site-library/v1/get_sites",method:"POST",data:{forceRefresh:!0}}).then((function(t){e.setState({isAPILoaded:!0,allSites:t.response,refreshingSites:!1})}))}},this.state.refreshingSites&&Object(h.createElement)(j.Spinner,null),!this.state.refreshingSites&&Object(y.__)("Try again","gp-premium")));var n=[{label:Object(y.__)("None","gp-premium"),value:""}],r=[];t&&Object.keys(t).forEach((function(e){t[e].page_builder.forEach((function(e){if(!r.includes(e)){if("No Page Builder"===e)return;n.push({label:e,value:e}),r.push(e)}}))}));var s=[{label:Object(y.__)("All","gp-premium"),value:""}],a=[];t&&Object.keys(t).forEach((function(e){t[e].category.forEach((function(e){a.includes(e)||(s.push({label:e,value:e}),a.push(e))}))}));var o="";return"tablet"===this.state.device&&(o="768px"),"mobile"===this.state.device&&(o="480px"),Object(h.createElement)(h.Fragment,null,Object(h.createElement)("div",{className:"generatepress-site-library"},!!this.state.hasBackup&&Object(h.createElement)("div",{className:"generatepress-site-library-restore"},Object(h.createElement)("h2",null,Object(y.__)("Existing Site Import Detected","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("It is highly recommended that you remove the last site you imported before importing a new one.","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("This process restores your previous options, widgets and active plugins. It will also remove your imported content and CSS.","gp-premium")),Object(h.createElement)("div",{className:"gpp-library-action-button"},Object(h.createElement)(j.Button,{isPrimary:!0,onClick:function(t){window.confirm(Object(y.__)("This process makes changes to your website. If it contains important data, we suggest backing it up before proceeding.","gp-premium"))&&(e.setState({isAPIWorking:!0}),e.restoreBackup(t))}},this.state.isAPIWorking&&Object(h.createElement)(j.Spinner,null),!this.state.isAPIWorking&&Object(y.__)("Remove imported site","gp-premium")),Object(h.createElement)("span",{className:"gpp-library-action-message"}),!this.state.isAPIWorking&&Object(h.createElement)(j.Button,{onClick:function(){e.setState({hasBackup:!1})}},Object(y.__)("No thanks","gp-premium")))),!this.state.siteOpened&&!this.state.hasBackup&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("div",{className:"generatepress-site-library-filter"},"No Page Builder"===this.state.pageBuilder&&Object(h.createElement)(j.SelectControl,{label:Object(y.__)("Category","gp-premium"),options:s,value:this.state.category,onChange:function(t){e.setState({category:t,pageBuilder:"No Page Builder"}),setTimeout((function(){Object(O.forceCheck)()}),100)}}),""===this.state.category&&Object(h.createElement)(j.SelectControl,{label:Object(y.__)("Page Builder","gp-premium"),options:n,value:this.state.pageBuilder,onChange:function(t){""===t&&(t="No Page Builder"),e.setState({pageBuilder:t,category:""}),setTimeout((function(){Object(O.forceCheck)()}),100)}})),Object(h.createElement)("ul",{className:"generatepress-site-library-list"},Object.keys(t).map((function(n){if(!t[n].page_builder.includes(e.state.pageBuilder))return null;if(""!==e.state.category&&!t[n].category.includes(e.state.category))return null;var r=t[n].directory+"/screenshot.png",i=t[n].name,s=Object(_.decodeEntities)(i),a=gppSiteLibrary.gppVersion.split("-")[0],o=function(e,t,n){var r=e.split("."),i=t.split(".");function s(e){return/^\d+$/.test(e)}if(!r.every(s)||!i.every(s))return NaN;r=r.map(Number),i=i.map(Number);for(var a=0;ai[a]?1:-1}return r.length!==i.length?-1:0}(t[n].min_version.split("-")[0],a)>0,l=t[n].image_width,c=t[n].image_height;return Object(h.createElement)("li",{className:"generatepress-site-library-list-item",key:i+":"+n},Object(h.createElement)("button",{disabled:o,onClick:function(){e.setState({siteOpened:!0,siteData:t[n],sitePlugins:JSON.parse(t[n].plugins)})}},Object(h.createElement)("div",{className:"generatepress-site-library-list-item-image"},Object(h.createElement)(v.a,{offset:100,once:!0},Object(h.createElement)("img",{src:r,alt:i,width:l,height:c}))),Object(h.createElement)("div",{className:"generatepress-site-library-list-item-title"},s,!!o&&Object(h.createElement)("span",{className:"generatepress-site-library-required-version"},Object(y.sprintf)(
+/* translators: Version number */
+Object(y.__)("Requires GP Premium %s.","gp-premium"),t[n].min_version)))))}))),Object(h.createElement)("div",{className:"generatepress-site-library-refresh"},Object(h.createElement)(j.Button,{isPrimary:!0,onClick:function(){e.setState({refreshingSites:!0}),w()({path:"/generatepress-site-library/v1/get_sites",method:"POST",data:{forceRefresh:!0}}).then((function(t){e.setState({isAPILoaded:!0,allSites:t.response,refreshingSites:!1})}))}},this.state.refreshingSites&&Object(h.createElement)(j.Spinner,null),!this.state.refreshingSites&&Object(y.__)("Refresh sites","gp-premium")))),this.state.siteOpened&&Object(h.createElement)("div",{className:"generatepress-site-library-opened"},Object(h.createElement)("div",{className:"generatepress-site-library-iframe"},Object(h.createElement)("iframe",{title:"gpp-site-library-frame",src:this.state.siteData.preview_url,style:{width:o}})),Object(h.createElement)("div",{className:"generatepress-site-library-info"},Object(h.createElement)("div",{className:"generatepress-site-library-header"},Object(h.createElement)("h2",null,Object(_.decodeEntities)(this.state.siteData.name)),Object(h.createElement)(j.Button,{onClick:function(){e.setState({isAPIWorking:!1,siteOpened:!1,siteData:{},siteSlug:"",sitePlugins:{},hasData:{},hasWidgets:!1,importOptions:!0,importContent:!0,confirmImport:!1,importComplete:!1,installablePlugins:[],activePlugins:[],manualPlugins:[]})}},Object(h.createElement)("svg",{width:"35",height:"35",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},Object(h.createElement)("path",{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})))),Object(h.createElement)("div",{className:"generatepress-site-library-content"},Object(h.createElement)("p",null,Object(_.decodeEntities)(this.state.siteData.description)),!this.state.importComplete&&Object(h.createElement)(h.Fragment,null,0===Object.keys(this.state.hasData).length&&Object(h.createElement)(h.Fragment,null,gppSiteLibrary.isDebugEnabled&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("h3",null,Object(y.__)("Debug Mode Enabled","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("WordPress debug mode is currently enabled. With this, any errors from third-party plugins might affect the import process.","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("To disable it, find WP_DEBUG in your wp-config.php file and set it to false like the below.","gp-premium")),Object(h.createElement)("code",null,"define( 'WP_DEBUG', false );"),Object(h.createElement)("p",null,Object(h.createElement)("a",{href:"https://docs.generatepress.com/article/debug-mode-enabled/",target:"_blank",rel:"noreferrer noopener"},Object(y.__)("Learn more here","gp-premium")))),Object.keys(this.state.sitePlugins).length>0&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("h3",null,Object(y.__)("Plugins","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("This site uses the following plugins.","gp-premium")),Object(h.createElement)("ul",{className:"generatepress-site-library-plugins"},Object.entries(this.state.sitePlugins).map((function(e){var t=i()(e,1)[0];return Object(h.createElement)("li",{key:t},t)})))),Object(h.createElement)("div",{className:"gpp-library-action-button"},Object(h.createElement)(j.Button,{isPrimary:!0,disabled:this.state.isAPIWorking,onClick:function(t){e.setState({isAPIWorking:!0});var n=t.target.nextElementSibling;n.textContent=Object(y.__)("Gathering information","gp-premium"),w()({path:"/generatepress-site-library/v1/get_site_data",method:"POST",data:{siteData:e.state.siteData}}).then((function(t){var r=[],s=[],a=[];Object.entries(t.response.plugin_data).forEach((function(e){var n=i()(e,1)[0],o=t.response.plugin_data[n];o.repo&&!o.installed?r.push(o.name):o.installed||o.active?s.push(o.name):a.push(o.name)})),e.setState({isAPIWorking:!1,hasData:t.response,sitePlugins:t.response.plugins,hasWidgets:t.response.widgets,installablePlugins:r,activePlugins:s,manualPlugins:a}),n.classList.add("gpp-library-action-message--show"),n.textContent=t.response,t.success&&t.response?setTimeout((function(){n.classList.remove("gpp-library-action-message--show")}),3e3):n.classList.add("gpp-library-action-message--error")}))}},this.state.isAPIWorking&&Object(h.createElement)(j.Spinner,null),!this.state.isAPIWorking&&Object(y.__)("Get Started","gp-premium")),Object(h.createElement)("span",{className:"gpp-library-action-message"}))),Object.keys(this.state.hasData).length>0&&Object.keys(this.state.sitePlugins).length>0&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("h3",null,Object(y.__)("Plugins","gp-premium")),this.state.installablePlugins.length>0&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("p",null,Object(y.__)("These plugins can be installed automatically.","gp-premium")),Object(h.createElement)("ul",{className:"generatepress-site-library-plugins"},this.state.installablePlugins.map((function(e){return Object(h.createElement)("li",{key:e},e)})))),this.state.activePlugins.length>0&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("p",null,Object(y.__)("These plugins are already installed.","gp-premium")),Object(h.createElement)("ul",{className:"generatepress-site-library-plugins"},this.state.activePlugins.map((function(e){return Object(h.createElement)("li",{key:e},e)})))),this.state.manualPlugins.length>0&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("p",null,Object(y.__)("These plugins need to be installed manually.","gp-premium")),Object(h.createElement)("ul",{className:"generatepress-site-library-plugins"},this.state.manualPlugins.map((function(e){return Object(h.createElement)("li",{key:e},e)}))))),Object.keys(this.state.hasData).length>0&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("h3",null,Object(y.__)("Import","gp-premium")),this.state.hasData.options&&!this.state.isAPIWorking&&Object(h.createElement)(j.Tooltip,{text:Object(y.__)("This will import the options from the Customizer.","gp-premium")},Object(h.createElement)(j.ToggleControl,{checked:!!this.state.importOptions,label:Object(y.__)("Import Theme Options","gp-premium"),onChange:function(t){e.setState({importOptions:t})}})),this.state.hasData.content&&!this.state.isAPIWorking&&Object(h.createElement)(j.Tooltip,{text:Object(y.__)("This will install and activate needed plugins, import demo content, and import site options.","gp-premium")},Object(h.createElement)(j.ToggleControl,{checked:!!this.state.importContent,label:Object(y.__)("Import Demo Content","gp-premium"),onChange:function(t){e.setState({importContent:t})}})),(!!this.state.importOptions||!!this.state.importContent)&&Object(h.createElement)(h.Fragment,null,!this.state.isAPIWorking&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("h3",null,Object(y.__)("Confirm Import","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("This process makes changes to your website. If it contains important data, we suggest backing it up before proceeding.","gp-premium")),Object(h.createElement)(j.ToggleControl,{checked:!!this.state.confirmImport,label:Object(y.__)("I understand","gp-premium"),onChange:function(t){e.setState({confirmImport:t})}})),!!this.state.confirmImport&&!this.state.importComplete&&Object(h.createElement)("div",{className:"gpp-library-action-button"},Object(h.createElement)(j.Button,{isPrimary:!0,disabled:this.state.isAPIWorking,onClick:function(t){e.setState({isAPIWorking:!0}),e.state.importOptions?e.importThemeOptions(t):e.state.importContent&&e.installPlugins(t)}},this.state.isAPIWorking&&Object(h.createElement)(j.Spinner,null),!this.state.isAPIWorking&&Object(y.__)("Begin Import","gp-premium")),Object(h.createElement)("span",{className:"gpp-library-action-message"}))))),!!this.state.importComplete&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("h3",null,Object(y.__)("Import Complete","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("Check out your new site and start making it yours!","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("Note: We do our best to ensure all imported images are licensed for open use. However, image licenses can change, so we strongly advise that you replace all imported images with your own.","gp-premium")),Object(h.createElement)("a",{className:"components-button is-primary",href:gppSiteLibrary.homeUrl},Object(y.__)("View Site","gp-premium")),this.state.siteData.uploads_url&&Object.values(this.state.sitePlugins).includes("elementor/elementor.php")&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("h3",null,Object(y.__)("Additional Cleanup","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("This site is using Elementor which means you will want to replace the imported image URLs.","gp-premium")),Object(h.createElement)("p",null,Object(y.__)("Take note of the old and new URLs below, then head over to the Elementor Tools area to replace them.","gp-premium")),Object(h.createElement)(j.TextControl,{label:Object(y.__)("Old URL","gp-premium"),readOnly:!0,value:this.state.siteData.uploads_url}),Object(h.createElement)(j.TextControl,{label:Object(y.__)("New URL","gp-premium"),readOnly:!0,value:gppSiteLibrary.uploadsUrl}),Object(h.createElement)("a",{href:gppSiteLibrary.elementorReplaceUrls,className:"components-button is-primary",target:"_blank",rel:"noopener noreferrer"},Object(y.__)("Elementor Tools","gp-premium")))),Object(h.createElement)("div",{className:"generatepress-site-library-footer"},Object(h.createElement)(j.Tooltip,{text:Object(y.__)("Preview desktop","gp-premium")},Object(h.createElement)(j.Button,{isPrimary:"desktop"===this.state.device,onClick:function(){e.setState({device:"desktop"})}},Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24"},Object(h.createElement)("path",{d:"M21 14H3V4h18m0-2H3c-1.11 0-2 .89-2 2v12a2 2 0 002 2h7l-2 3v1h8v-1l-2-3h7a2 2 0 002-2V4a2 2 0 00-2-2z",fill:"currentColor"})))),Object(h.createElement)(j.Tooltip,{text:Object(y.__)("Preview tablet","gp-premium")},Object(h.createElement)(j.Button,{isPrimary:"tablet"===this.state.device,onClick:function(){e.setState({device:"tablet"})}},Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24"},Object(h.createElement)("path",{d:"M19 19H4V3h15m-7.5 20a1.5 1.5 0 01-1.5-1.5 1.5 1.5 0 011.5-1.5 1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m7-23h-14A2.5 2.5 0 002 2.5v19A2.5 2.5 0 004.5 24h14a2.5 2.5 0 002.5-2.5v-19A2.5 2.5 0 0018.5 0z",fill:"currentColor"})))),Object(h.createElement)(j.Tooltip,{text:Object(y.__)("Preview mobile","gp-premium")},Object(h.createElement)(j.Button,{isPrimary:"mobile"===this.state.device,onClick:function(){e.setState({device:"mobile"})}},Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24"},Object(h.createElement)("path",{d:"M17 19H7V5h10m0-4H7c-1.11 0-2 .89-2 2v18a2 2 0 002 2h10a2 2 0 002-2V3a2 2 0 00-2-2z",fill:"currentColor"}))))))))))}}]),s}(h.Component);Object(h.render)(Object(h.createElement)(P,null),document.getElementById("gpp-site-library"))}]);
\ No newline at end of file
diff --git a/wp-content/plugins/gp-premium/elements/assets/admin/author-image-placeholder.png b/wp-content/plugins/gp-premium/elements/assets/admin/author-image-placeholder.png
new file mode 100644
index 00000000..f8bdda75
Binary files /dev/null and b/wp-content/plugins/gp-premium/elements/assets/admin/author-image-placeholder.png differ
diff --git a/wp-content/plugins/gp-premium/elements/assets/admin/background-image-fallback.jpg b/wp-content/plugins/gp-premium/elements/assets/admin/background-image-fallback.jpg
new file mode 100644
index 00000000..ae5ef65d
Binary files /dev/null and b/wp-content/plugins/gp-premium/elements/assets/admin/background-image-fallback.jpg differ
diff --git a/wp-content/plugins/gp-premium/elements/assets/admin/elements.js b/wp-content/plugins/gp-premium/elements/assets/admin/elements.js
index a82f1241..b050de5b 100644
--- a/wp-content/plugins/gp-premium/elements/assets/admin/elements.js
+++ b/wp-content/plugins/gp-premium/elements/assets/admin/elements.js
@@ -1,4 +1,4 @@
-jQuery( document ).ready( function( $ ) {
+jQuery( function( $ ) {
$( '.post-type-gp_elements .page-title-action:not(.legacy-button)' ).on( 'click', function( e ) {
e.preventDefault();
@@ -10,4 +10,9 @@ jQuery( document ).ready( function( $ ) {
$( '.choose-element-type-parent' ).hide();
} );
+
+ // Don't allow Elements to quick edit parents.
+ $( '.inline-edit-gp_elements select#post_parent, .inline-edit-gp_elements .inline-edit-menu-order-input, .bulk-edit-gp_elements select#post_parent' ).each( function() {
+ $( this ).closest( 'label' ).remove();
+ } );
} );
diff --git a/wp-content/plugins/gp-premium/elements/assets/admin/featured-image-placeholder.png b/wp-content/plugins/gp-premium/elements/assets/admin/featured-image-placeholder.png
new file mode 100644
index 00000000..500f8c9c
Binary files /dev/null and b/wp-content/plugins/gp-premium/elements/assets/admin/featured-image-placeholder.png differ
diff --git a/wp-content/plugins/gp-premium/elements/assets/admin/metabox.css b/wp-content/plugins/gp-premium/elements/assets/admin/metabox.css
index c1a7e3d2..e793bcaa 100644
--- a/wp-content/plugins/gp-premium/elements/assets/admin/metabox.css
+++ b/wp-content/plugins/gp-premium/elements/assets/admin/metabox.css
@@ -188,18 +188,25 @@ ul.element-metabox-tabs li.is-selected a {
display: block;
}
-.element-settings.header table[data-tab="hero"],
+.element-settings.header:not(.has-page-hero) table[data-tab="site-header"],
+.element-settings.header.has-page-hero table[data-tab="hero"],
.element-settings.hook table[data-tab="hook-settings"],
.element-settings.block table[data-tab="hook-settings"],
.element-settings.layout table[data-tab="sidebars"] {
display: table;
}
-.element-settings.layout #generate-element-content,
-.element-settings.block #generate-element-content {
+.element-settings.header:not(.has-page-hero) #generate-element-content {
display: none;
}
+.element-settings.header:not(.has-page-hero) #generate-element-content + .CodeMirror:not(.gpp-elements-show-codemirror) {
+ height: 0;
+ overflow: hidden;
+ opacity: 0;
+ margin: 0;
+}
+
.padding-container {
display: flex;
}
@@ -337,7 +344,8 @@ span.tip {
font-size: 10px;
}
-body:not(.header-element-type) #generate_page_hero_template_tags {
+body:not(.header-element-type) #generate_page_hero_template_tags,
+.header-element-type:not(.element-has-page-hero) #generate_page_hero_template_tags {
display: none;
}
diff --git a/wp-content/plugins/gp-premium/elements/assets/admin/metabox.js b/wp-content/plugins/gp-premium/elements/assets/admin/metabox.js
index b85de674..c003b0df 100644
--- a/wp-content/plugins/gp-premium/elements/assets/admin/metabox.js
+++ b/wp-content/plugins/gp-premium/elements/assets/admin/metabox.js
@@ -1,8 +1,8 @@
-jQuery(document).ready(function( $ ) {
+jQuery( function( $ ) {
if ( $( '.element-settings' ).hasClass( 'header' ) || $( '.element-settings' ).hasClass( 'hook' ) ) {
$( function() {
- if ( elements.settings) {
- wp.codeEditor.initialize( "generate-element-content", elements.settings );
+ if ( elements.settings ) {
+ wp.codeEditor.initialize( 'generate-element-content', elements.settings );
}
} );
}
@@ -51,7 +51,7 @@ jQuery(document).ready(function( $ ) {
} );
$( '#_generate_hook' ).select2( {
- width: '100%'
+ width: '100%',
} );
$( '.element-metabox-tabs li' ).on( 'click', function() {
@@ -63,15 +63,17 @@ jQuery(document).ready(function( $ ) {
$( '.generate-elements-settings' ).hide();
$( '.generate-elements-settings[data-tab="' + tab + '"]' ).show();
- if ( $( '.element-settings' ).hasClass( 'block' ) & 'hook-settings' === tab ) {
+ if ( $( '.element-settings' ).hasClass( 'block' ) && 'hook-settings' === tab ) {
$( '.generate-elements-settings[data-tab="display-rules"]' ).show();
}
if ( $( '.element-settings' ).hasClass( 'header' ) ) {
if ( 'hero' !== tab ) {
- $( '#generate-element-content' ).next( '.CodeMirror' ).hide();
+ $( '#generate-element-content' ).next( '.CodeMirror' ).removeClass( 'gpp-elements-show-codemirror' );
+ $( '#generate_page_hero_template_tags' ).css( 'display', '' );
} else {
- $( '#generate-element-content' ).next( '.CodeMirror' ).show();
+ $( '#generate-element-content' ).next( '.CodeMirror' ).addClass( 'gpp-elements-show-codemirror' );
+ $( '#generate_page_hero_template_tags' ).css( 'display', 'block' );
}
}
} );
@@ -82,7 +84,7 @@ jQuery(document).ready(function( $ ) {
selects.each( function() {
var select = $( this ),
config = {
- width: 'style'
+ width: 'style',
};
select.select2( config );
@@ -95,82 +97,70 @@ jQuery(document).ready(function( $ ) {
$( '.add-condition' ).on( 'click', function() {
var _this = $( this );
- var row = _this.closest( '.generate-element-row-content' ).find( '.condition.hidden.screen-reader-text' ).clone(true);
+ var row = _this.closest( '.generate-element-row-content' ).find( '.condition.hidden.screen-reader-text' ).clone( true );
row.removeClass( 'hidden screen-reader-text' );
row.insertBefore( _this.closest( '.generate-element-row-content' ).find( '.condition:last' ) );
select2Init();
return false;
- });
+ } );
- $( '.remove-condition' ).on('click', function() {
- $(this).parents('.condition').remove();
+ $( '.remove-condition' ).on( 'click', function() {
+ $( this ).parents( '.condition' ).remove();
select2Init();
return false;
- });
+ } );
- var get_location_objects = function( _this, onload = false ) {
- var select = _this,
- parent = select.parent(),
- location = select.val(),
- object_select = parent.find( '.condition-object-select' ),
- locationString = '',
- actionType = 'terms';
-
- if ( '' == location ) {
+ var getLocationObjects = function( _this, onload = false, data = '' ) {
+ var select = _this,
+ parent = select.parent(),
+ location = select.val(),
+ objectSelect = parent.find( '.condition-object-select' ),
+ locationType = '',
+ actionType = 'terms';
+ if ( '' === location ) {
parent.removeClass( 'generate-elements-rule-objects-visible' );
select.closest( '.generate-element-row-content' ).find( '.generate-element-row-loading' ).remove();
-
} else {
if ( location.indexOf( ':taxonomy:' ) > 0 ) {
- var locationType = 'taxonomy';
+ locationType = 'taxonomy';
} else {
- var locationType = location.substr( 0, location.indexOf( ':' ) );
+ locationType = location.substr( 0, location.indexOf( ':' ) );
}
var locationID = location.substr( location.lastIndexOf( ':' ) + 1 );
- locationString = location;
-
- if ( 'taxonomy' == locationType || 'post' == locationType ) {
-
+ if ( 'taxonomy' === locationType || 'post' === locationType ) {
if ( ! ( '.generate-element-row-loading' ).length ) {
select.closest( '.generate-element-row-content' ).prepend( '' );
}
- if ( 'post' == locationType ) {
- if ( 'taxonomy' == locationType ) {
- actionType = 'terms';
- } else {
- actionType = 'posts';
- }
- }
-
- $.post( ajaxurl, {
- action : 'generate_elements_get_location_' + actionType,
- id : locationID,
- nonce : elements.nonce
- }, function( response ) {
- response = $.parseJSON( response );
- var objects = response.objects;
+ var fillObjects = function( response ) {
+ var objects = response[ locationID ].objects;
var blank = {
- 'id': '',
- 'name': 'All ' + response.label,
+ id: '',
+ name: 'All ' + response[ locationID ].label,
};
if ( location.indexOf( ':taxonomy:' ) > 0 ) {
blank.name = elements.choose;
}
- objects.unshift( blank );
- object_select.empty();
+ objectSelect.empty();
+
+ objectSelect.append( $( '' );
- object_select.val( '0' );
+ objectSelect.empty().append( '' );
+ objectSelect.val( '0' );
}
-
- //remove.show();
}
};
$( '.condition select.condition-select' ).on( 'change', function() {
- get_location_objects( $( this ) );
+ getLocationObjects( $( this ) );
$( '.elements-no-location-error' ).hide();
} );
+ var postObjects = [];
+ var termObjects = [];
+
$( '.generate-elements-rule-objects-visible' ).each( function() {
var _this = $( this ),
- select = _this.find( 'select.condition-select' );
+ select = _this.find( 'select.condition-select' ),
+ location = select.val(),
+ locationID = location.substr( location.lastIndexOf( ':' ) + 1 ),
+ locationType = '';
- $( '' ).insertBefore( _this );
+ if ( location.indexOf( ':taxonomy:' ) > 0 ) {
+ locationType = 'taxonomy';
+ } else {
+ locationType = location.substr( 0, location.indexOf( ':' ) );
+ }
- get_location_objects( select, true );
+ if ( 'post' === locationType ) {
+ if ( ! postObjects.includes( locationID ) ) {
+ postObjects.push( locationID );
+ }
+ } else if ( 'taxonomy' === locationType && ! termObjects.includes( locationID ) ) {
+ termObjects.push( locationID );
+ }
} );
+ if ( postObjects.length > 0 || termObjects.length > 0 ) {
+ $.post( ajaxurl, {
+ action: 'generate_elements_get_location_objects',
+ posts: postObjects,
+ terms: termObjects,
+ nonce: elements.nonce,
+ }, function( response ) {
+ response = JSON.parse( response );
+
+ $( '.generate-elements-rule-objects-visible' ).each( function() {
+ var _this = $( this ),
+ select = _this.find( 'select.condition-select' );
+
+ $( '' ).insertBefore( _this );
+
+ getLocationObjects( select, true, response );
+ } );
+ } );
+ }
+
$( '.set-featured-image a, .change-featured-image a:not(.remove-image)' ).on( 'click', function( event ) {
event.preventDefault();
@@ -237,7 +282,7 @@ jQuery(document).ready(function( $ ) {
$( '.change-featured-image' ).hide();
$( '.image-preview' ).empty();
return false;
- });
+ } );
$( '.remove-image' ).on( 'click', function( e ) {
e.preventDefault();
@@ -257,12 +302,12 @@ jQuery(document).ready(function( $ ) {
var frame = wp.media( {
title: _this.data( 'title' ),
multiple: false,
- library: { type : _this.data( 'type' ) },
- button: { text : _this.data( 'insert' ) }
+ library: { type: _this.data( 'type' ) },
+ button: { text: _this.data( 'insert' ) },
} );
frame.on( 'select', function() {
- var attachment = frame.state().get('selection').first().toJSON();
+ var attachment = frame.state().get( 'selection' ).first().toJSON();
container.find( '.media-field' ).val( attachment.id );
container.find( '.remove-field' ).show();
@@ -293,11 +338,11 @@ jQuery(document).ready(function( $ ) {
$( '.requires-background-image' ).hide();
}
- if ( 'featured-image' == _this.val() ) {
+ if ( 'featured-image' === _this.val() ) {
$( '.image-text' ).text( elements.fallback_image );
}
- if ( 'custom-image' == _this.val() ) {
+ if ( 'custom-image' === _this.val() ) {
$( '.image-text' ).text( elements.custom_image );
}
} );
@@ -308,10 +353,10 @@ jQuery(document).ready(function( $ ) {
var _this = $( this ),
control = _this.attr( 'data-control' ),
- control_area = _this.closest( '.generate-element-row-content' );
+ controlArea = _this.closest( '.generate-element-row-content' );
- control_area.find( '.padding-container' ).hide();
- control_area.find( '.padding-container.' + control ).show();
+ controlArea.find( '.padding-container' ).hide();
+ controlArea.find( '.padding-container.' + control ).show();
_this.siblings().removeClass( 'is-selected' );
_this.addClass( 'is-selected' );
} );
diff --git a/wp-content/plugins/gp-premium/elements/class-block-elements.php b/wp-content/plugins/gp-premium/elements/class-block-elements.php
new file mode 100644
index 00000000..3c2145e7
--- /dev/null
+++ b/wp-content/plugins/gp-premium/elements/class-block-elements.php
@@ -0,0 +1,1758 @@
+ true,
+ )
+ );
+
+ $parent_elements = get_posts(
+ array(
+ 'post_type' => 'gp_elements',
+ 'post_parent' => 0,
+ 'no_found_rows' => true,
+ 'post_status' => 'publish',
+ 'numberposts' => 100,
+ 'fields' => 'ids',
+ 'exclude' => array( get_the_ID() ),
+ 'meta_query' => array(
+ array(
+ 'key' => '_generate_block_type',
+ 'value' => 'content-template',
+ 'compare' => '=',
+ ),
+ ),
+ )
+ );
+
+ $parent_elements_data = array();
+
+ foreach ( (array) $parent_elements as $element ) {
+ $parent_elements_data[] = array(
+ 'label' => get_the_title( $element ),
+ 'id' => $element,
+ );
+ }
+
+ $image_sizes = get_intermediate_image_sizes();
+ $image_sizes = array_diff( $image_sizes, array( '1536x1536', '2048x2048' ) );
+ $image_sizes[] = 'full';
+
+ $containerWidth = function_exists( 'generate_get_option' ) ? generate_get_option( 'container_width' ) : 1100;
+ $rightSidebarWidth = apply_filters( 'generate_right_sidebar_width', '25' );
+ $leftSidebarWidth = apply_filters( 'generate_left_sidebar_width', '25' );
+
+ $containerWidth = floatval( $containerWidth );
+ $leftSidebarWidth = '0.' . $leftSidebarWidth;
+ $rightSidebarWidth = '0.' . $rightSidebarWidth;
+
+ $leftSidebarWidth = $containerWidth - ( $containerWidth * $leftSidebarWidth );
+ $rightSidebarWidth = $containerWidth - ( $containerWidth * $rightSidebarWidth );
+
+ $leftSidebarWidth = $containerWidth - $leftSidebarWidth;
+ $rightSidebarWidth = $containerWidth - $rightSidebarWidth;
+
+ $contentWidth = $containerWidth - $rightSidebarWidth;
+
+ wp_localize_script(
+ 'gp-premium-block-elements',
+ 'gpPremiumBlockElements',
+ array(
+ 'isBlockElement' => 'gp_elements' === get_post_type(),
+ 'taxonomies' => $taxonomies,
+ 'rightSidebarWidth' => $rightSidebarWidth,
+ 'leftSidebarWidth' => $leftSidebarWidth,
+ 'contentWidth' => $contentWidth,
+ 'hooks' => GeneratePress_Elements_Helper::get_available_hooks(),
+ 'excerptLength' => apply_filters( 'excerpt_length', 55 ), // phpcs:ignore -- Core filter.
+ 'isGenerateBlocksActive' => function_exists( 'generateblocks_load_plugin_textdomain' ),
+ 'isGenerateBlocksInstalled' => file_exists( WP_PLUGIN_DIR . '/generateblocks/plugin.php' ) ? true : false,
+ 'isGenerateBlocksProActive' => function_exists( 'generateblocks_pro_init' ),
+ 'installLink' => wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=generateblocks' ), 'install-plugin_generateblocks' ),
+ 'activateLink' => wp_nonce_url( 'plugins.php?action=activate&plugin=generateblocks/plugin.php&plugin_status=all&paged=1&s', 'activate-plugin_generateblocks/plugin.php' ),
+ 'imageSizes' => $image_sizes,
+ 'imageSizeDimensions' => $this->get_image_Sizes(),
+ 'featuredImagePlaceholder' => GP_PREMIUM_DIR_URL . 'elements/assets/admin/featured-image-placeholder.png',
+ 'authorImagePlaceholder' => GP_PREMIUM_DIR_URL . 'elements/assets/admin/author-image-placeholder.png',
+ 'bgImageFallback' => GP_PREMIUM_DIR_URL . 'elements/assets/admin/background-image-fallback.jpg',
+ 'templateImageUrl' => 'https://gpsites.co/files/element-library',
+ 'parentElements' => $parent_elements_data,
+ )
+ );
+
+ wp_enqueue_style(
+ 'gp-premium-block-elements',
+ GP_PREMIUM_DIR_URL . 'dist/block-elements.css',
+ array( 'wp-edit-blocks' ),
+ filemtime( GP_PREMIUM_DIR_PATH . 'dist/block-elements.css' )
+ );
+ }
+
+ /**
+ * Add our block category.
+ *
+ * @param array $categories The existing categories.
+ */
+ public function add_block_category( $categories ) {
+ return array_merge(
+ array(
+ array(
+ 'slug' => 'generatepress',
+ 'title' => __( 'GeneratePress', 'gp-premium' ),
+ ),
+ ),
+ $categories
+ );
+ }
+
+ /**
+ * Register our dynamic blocks.
+ */
+ public function register_dynamic_blocks() {
+ if ( ! function_exists( 'register_block_type' ) ) {
+ return;
+ }
+
+ register_block_type(
+ 'generatepress/dynamic-content',
+ array(
+ 'render_callback' => array( $this, 'do_dynamic_content_block' ),
+ 'attributes' => array(
+ 'contentType' => array(
+ 'type' => 'string',
+ 'default' => '',
+ ),
+ 'excerptLength' => array(
+ 'type' => 'number',
+ 'default' => apply_filters( 'excerpt_length', 55 ), // phpcs:ignore -- Core filter.
+ ),
+ 'useThemeMoreLink' => array(
+ 'type' => 'boolean',
+ 'defaut' => true,
+ ),
+ 'customMoreLink' => array(
+ 'type' => 'string',
+ 'default' => '',
+ ),
+ ),
+ )
+ );
+
+ register_block_type(
+ 'generatepress/dynamic-image',
+ array(
+ 'render_callback' => array( $this, 'do_dynamic_image_block' ),
+ 'attributes' => array(
+ 'imageType' => array(
+ 'type' => 'string',
+ 'default' => '',
+ ),
+ 'imageSource' => array(
+ 'type' => 'string',
+ 'default' => 'current-post',
+ ),
+ 'customField' => array(
+ 'type' => 'string',
+ 'default' => '',
+ ),
+ 'gpDynamicSourceInSameTerm' => array(
+ 'type' => 'boolean',
+ 'default' => false,
+ ),
+ 'gpDynamicSourceInSameTermTaxonomy' => array(
+ 'tyoe' => 'string',
+ 'default' => 'category',
+ ),
+ 'imageSize' => array(
+ 'type' => 'string',
+ 'default' => 'full',
+ ),
+ 'linkTo' => array(
+ 'type' => 'string',
+ 'default' => '',
+ ),
+ 'linkToCustomField' => array(
+ 'type' => 'string',
+ 'default' => '',
+ ),
+ 'imageWidth' => array(
+ 'type' => 'number',
+ 'default' => null,
+ ),
+ 'imageHeight' => array(
+ 'type' => 'number',
+ 'default' => null,
+ ),
+ 'avatarSize' => array(
+ 'type' => 'number',
+ 'default' => 30,
+ ),
+ 'avatarRounded' => array(
+ 'type' => 'boolean',
+ 'default' => false,
+ ),
+ ),
+ )
+ );
+ }
+
+ /**
+ * Do our dynamic content block.
+ *
+ * @param array $attributes The attributes from this block.
+ */
+ public function do_dynamic_content_block( $attributes ) {
+ if ( empty( $attributes['contentType'] ) ) {
+ return;
+ }
+
+ if ( 'post-content' === $attributes['contentType'] ) {
+ return $this->do_content_block();
+ }
+
+ if ( 'post-excerpt' === $attributes['contentType'] ) {
+ return $this->do_excerpt_block( $attributes );
+ }
+
+ if ( 'term-description' === $attributes['contentType'] ) {
+ return sprintf(
+ '%s
',
+ term_description()
+ );
+ }
+
+ if ( 'author-description' === $attributes['contentType'] ) {
+ return sprintf(
+ '%s
',
+ get_the_author_meta( 'description' )
+ );
+ }
+ }
+
+ /**
+ * Build our content block.
+ */
+ public function do_content_block() {
+ if ( 'gp_elements' !== get_post_type() && ! is_admin() ) {
+ return sprintf(
+ '%s
',
+ apply_filters( 'the_content', str_replace( ']]>', ']]>', get_the_content() ) ) // phpcs:ignore -- Core filter.
+ );
+ }
+ }
+
+ /**
+ * Build our excerpt block.
+ *
+ * @param array $attributes The block attributes.
+ */
+ public function do_excerpt_block( $attributes ) {
+ if ( version_compare( PHP_VERSION, '5.6', '>=' ) ) {
+ $filter_excerpt_length = function( $length ) use ( $attributes ) {
+ return isset( $attributes['excerptLength'] ) ? $attributes['excerptLength'] : $length;
+ };
+
+ add_filter(
+ 'excerpt_length',
+ $filter_excerpt_length,
+ 100
+ );
+
+ if ( isset( $attributes['useThemeMoreLink'] ) && ! $attributes['useThemeMoreLink'] ) {
+ $filter_more_text = function() use ( $attributes ) {
+ if ( empty( $attributes['customMoreLink'] ) ) {
+ return ' ...';
+ }
+
+ return apply_filters(
+ 'generate_excerpt_block_more_output',
+ sprintf(
+ ' ... %3$s',
+ the_title_attribute( 'echo=0' ),
+ esc_url( get_permalink( get_the_ID() ) ),
+ wp_kses_post( $attributes['customMoreLink'] ),
+ sprintf(
+ /* translators: Aria-label describing the read more button */
+ _x( 'More on %s', 'more on post title', 'gp-premium' ),
+ the_title_attribute( 'echo=0' )
+ )
+ )
+ );
+ };
+
+ add_filter(
+ 'excerpt_more',
+ $filter_more_text,
+ 100
+ );
+ }
+ }
+
+ if ( 'gp_elements' === get_post_type() || is_admin() ) {
+ $post = get_posts(
+ array(
+ 'post_type' => 'post',
+ 'numberposts' => 1,
+ )
+ );
+
+ if ( ! empty( $post[0] ) ) {
+ return sprintf(
+ '%s
',
+ apply_filters( 'the_excerpt', get_the_excerpt( $post[0]->ID ) ) // phpcs:ignore -- Core filter.
+ );
+ } else {
+ return sprintf(
+ '%s
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed pulvinar ligula augue, quis bibendum tellus scelerisque venenatis. Pellentesque porta nisi mi. In hac habitasse platea dictumst. Etiam risus elit, molestie non volutpat ac, pellentesque sed eros. Nunc leo odio, sodales non tortor at, porttitor posuere dui.
',
+ __( 'This is a placeholder for your content.', 'gp-premium' )
+ );
+ }
+ }
+
+ $excerpt = apply_filters( 'the_excerpt', get_the_excerpt() ); // phpcs:ignore -- Core filter.
+
+ if ( isset( $filter_excerpt_length ) ) {
+ remove_filter(
+ 'excerpt_length',
+ $filter_excerpt_length,
+ 100
+ );
+ }
+
+ if ( isset( $filter_more_text ) ) {
+ remove_filter(
+ 'excerpt_more',
+ $filter_more_text,
+ 100
+ );
+ }
+
+ return sprintf(
+ '%s
',
+ $excerpt
+ );
+ }
+
+ /**
+ * Build our dynamic image block.
+ *
+ * @param array $attributes The block attributes.
+ */
+ public function do_dynamic_image_block( $attributes ) {
+ if ( empty( $attributes['imageType'] ) ) {
+ return;
+ }
+
+ if ( 'featured-image' === $attributes['imageType'] ) {
+ $image_source = ! empty( $attributes['imageSource'] ) ? $attributes['imageSource'] : 'current-post';
+ $id = $this->get_source_id( $image_source, $attributes );
+
+ if ( ! $id ) {
+ return;
+ }
+
+ if ( has_post_thumbnail( $id ) ) {
+ $size = ! empty( $attributes['imageSize'] ) ? $attributes['imageSize'] : 'full';
+ $featured_image = get_the_post_thumbnail( $id, $size, array( 'class' => 'dynamic-featured-image' ) );
+
+ // We can't alter the width/height generated by get_the_post_thumbnail(), so we need to resort to this.
+ if ( ! empty( $attributes['imageWidth'] ) ) {
+ $featured_image = preg_replace( '/width=[\"\'][0-9]+[\"\']/i', 'width="' . absint( $attributes['imageWidth'] ) . '"', $featured_image );
+ }
+
+ if ( ! empty( $attributes['imageHeight'] ) ) {
+ $featured_image = preg_replace( '/height=[\"\'][0-9]+[\"\']/i', 'height="' . absint( $attributes['imageHeight'] ) . '"', $featured_image );
+ }
+
+ if ( $featured_image ) {
+ if ( ! empty( $attributes['linkTo'] ) ) {
+ if ( 'single-post' === $attributes['linkTo'] ) {
+ $featured_image = sprintf(
+ '%s',
+ esc_url( get_permalink( $id ) ),
+ $featured_image
+ );
+ }
+
+ if ( 'custom-field' === $attributes['linkTo'] ) {
+ $custom_field = get_post_meta( $id, $attributes['linkToCustomField'], true );
+
+ if ( $custom_field ) {
+ $featured_image = sprintf(
+ '%s',
+ esc_url( $custom_field ),
+ $featured_image
+ );
+ }
+ }
+ }
+
+ return $featured_image;
+ }
+ }
+ }
+
+ if ( 'post-meta' === $attributes['imageType'] ) {
+ $image_source = ! empty( $attributes['imageSource'] ) ? $attributes['imageSource'] : 'current-post';
+ $id = $this->get_source_id( $image_source, $attributes );
+
+ if ( ! $id ) {
+ return;
+ }
+
+ $image_field_name = ! empty( $attributes['customField'] ) ? $attributes['customField'] : '';
+
+ if ( $image_field_name ) {
+ $image = get_post_meta( $id, $image_field_name, true );
+
+ if ( ctype_digit( $image ) ) {
+ $size = ! empty( $attributes['imageSize'] ) ? $attributes['imageSize'] : 'full';
+ $image_output = wp_get_attachment_image( $image, $size, false, array( 'class' => 'dynamic-meta-image' ) );
+
+ // We can't alter the width/height generated by get_the_post_thumbnail(), so we need to resort to this.
+ if ( ! empty( $attributes['imageWidth'] ) ) {
+ $image_output = preg_replace( '/width=[\"\'][0-9]+[\"\']/i', 'width="' . absint( $attributes['imageWidth'] ) . '"', $image_output );
+ }
+
+ if ( ! empty( $attributes['imageHeight'] ) ) {
+ $image_output = preg_replace( '/height=[\"\'][0-9]+[\"\']/i', 'height="' . absint( $attributes['imageHeight'] ) . '"', $image_output );
+ }
+ } else {
+ $image_output = apply_filters(
+ 'generate_dynamic_custom_field_image',
+ sprintf(
+ '',
+ $image,
+ ! empty( $attributes['imageWidth'] ) ? absint( $attributes['imageWidth'] ) : '',
+ ! empty( $attributes['imageHeight'] ) ? absint( $attributes['imageHeight'] ) : ''
+ )
+ );
+ }
+
+ if ( ! empty( $image_output ) ) {
+ if ( ! empty( $attributes['linkTo'] ) ) {
+ if ( 'single-post' === $attributes['linkTo'] ) {
+ $image_output = sprintf(
+ '%s',
+ esc_url( get_permalink( $id ) ),
+ $image_output
+ );
+ }
+
+ if ( 'custom-field' === $attributes['linkTo'] ) {
+ $custom_field = get_post_meta( $id, $attributes['linkToCustomField'], true );
+
+ if ( $custom_field ) {
+ $image_output = sprintf(
+ '%s',
+ esc_url( $custom_field ),
+ $image_output
+ );
+ }
+ }
+ }
+
+ return $image_output;
+ }
+ }
+ }
+
+ if ( 'author-avatar' === $attributes['imageType'] ) {
+ global $post;
+ $author_id = $post->post_author;
+ $size = ! empty( $attributes['avatarSize'] ) ? $attributes['avatarSize'] : 30;
+ $image_alt = apply_filters( 'generate_dynamic_author_image_alt', __( 'Photo of author', 'gp-premium' ) );
+
+ $classes = array(
+ 'dynamic-author-image',
+ );
+
+ if ( ! empty( $attributes['avatarRounded'] ) ) {
+ $classes[] = 'dynamic-author-image-rounded';
+ }
+
+ $avatar = get_avatar(
+ $author_id,
+ $size,
+ '',
+ esc_attr( $image_alt ),
+ array(
+ 'class' => implode( ' ', $classes ),
+ )
+ );
+
+ if ( $avatar ) {
+ return $avatar;
+ }
+ }
+ }
+
+ /**
+ * Get our dynamic URL.
+ *
+ * @param string $link_type The kind of link to add.
+ * @param string $source The source of the dynamic data.
+ * @param array $block The block we're working with.
+ */
+ public function get_dynamic_url( $link_type, $source, $block ) {
+ $id = $this->get_source_id( $source, $block['attrs'] );
+ $author_id = $this->get_author_id( $source, $block['attrs'] );
+ $url = '';
+
+ if ( 'single-post' === $link_type ) {
+ $url = get_permalink( $id );
+ }
+
+ if ( 'post-meta' === $link_type ) {
+ $url = get_post_meta( $id, $block['attrs']['gpDynamicLinkCustomField'], true );
+ }
+
+ if ( 'user-meta' === $link_type ) {
+ $url = $this->get_user_data( $author_id, $block['attrs']['gpDynamicLinkCustomField'] );
+ }
+
+ if ( 'term-meta' === $link_type ) {
+ $url = get_term_meta( get_queried_object_id(), $block['attrs']['gpDynamicTextCustomField'], true );
+ }
+
+ if ( 'author-archives' === $link_type ) {
+ $url = get_author_posts_url( $author_id );
+ }
+
+ if ( 'comments' === $link_type ) {
+ $url = get_comments_link( $id );
+ }
+
+ if ( 'next-posts' === $link_type ) {
+ global $paged, $wp_query;
+
+ $max_page = 0;
+
+ if ( ! $max_page ) {
+ $max_page = $wp_query->max_num_pages;
+ }
+
+ $paged_num = isset( $paged ) && $paged ? $paged : 1;
+ $nextpage = (int) $paged_num + 1;
+
+ if ( ! is_single() && ( $nextpage <= $max_page ) ) {
+ $url = next_posts( $max_page, false );
+ }
+ }
+
+ if ( 'previous-posts' === $link_type ) {
+ global $paged;
+
+ if ( ! is_single() && (int) $paged > 1 ) {
+ $url = previous_posts( false );
+ }
+ }
+
+ return apply_filters( 'generate_dynamic_element_url', $url, $link_type, $source, $block );
+ }
+
+ /**
+ * Wrap our dynamic text in a link.
+ *
+ * @param string $text The text to wrap.
+ * @param string $link_type The kind of link to add.
+ * @param string $source The source of the dynamic data.
+ * @param array $block The block we're working with.
+ */
+ public function add_dynamic_link( $text, $link_type, $source, $block ) {
+ if ( 'generateblocks/headline' === $block['blockName'] ) {
+ $url = $this->get_dynamic_url( $link_type, $source, $block );
+
+ if ( ! $url ) {
+ return $text;
+ }
+
+ return sprintf(
+ '%s',
+ esc_url( $url ),
+ $text
+ );
+ }
+
+ if ( 'generateblocks/button' === $block['blockName'] ) {
+ $url = $this->get_dynamic_url( $link_type, $source, $block );
+
+ // Since this is a button, we want to scrap the whole block if we don't have a link.
+ if ( ! $url ) {
+ return '';
+ }
+
+ $dynamic_url = sprintf(
+ 'href="%s"',
+ esc_url( $url )
+ );
+
+ return str_replace( 'href="#"', $dynamic_url, $text );
+ }
+ }
+
+ /**
+ * Get user data.
+ *
+ * @since 2.0.0
+ * @param int $author_id The ID of the user.
+ * @param string $field The field to look up.
+ */
+ public function get_user_data( $author_id, $field ) {
+ $data = get_user_meta( $author_id, $field, true );
+
+ if ( ! $data ) {
+ $user_data_names = array(
+ 'user_nicename',
+ 'user_email',
+ 'user_url',
+ 'display_name',
+ );
+
+ if ( in_array( $field, $user_data_names ) ) {
+ $user_data = get_userdata( $author_id );
+
+ if ( $user_data ) {
+ switch ( $field ) {
+ case 'user_nicename':
+ $data = $user_data->user_nicename;
+ break;
+
+ case 'user_email':
+ $data = $user_data->user_email;
+ break;
+
+ case 'user_url':
+ $data = $user_data->user_url;
+ break;
+
+ case 'display_name':
+ $data = $user_data->display_name;
+ break;
+ }
+ }
+ }
+ }
+
+ return $data;
+ }
+
+ /**
+ * Add the dynamic bits to our blocks.
+ *
+ * @param string $block_content The block content.
+ * @param array $block The block info.
+ */
+ public function render_blocks( $block_content, $block ) {
+ if ( 'gp_elements' === get_post_type() || is_admin() ) {
+ return $block_content;
+ }
+
+ if ( 'generateblocks/headline' === $block['blockName'] || 'generateblocks/button' === $block['blockName'] ) {
+ if ( ! empty( $block['attrs']['gpDynamicTextType'] ) && ! empty( $block['attrs']['gpDynamicTextReplace'] ) ) {
+ $text_to_replace = $block['attrs']['gpDynamicTextReplace'];
+ $text_type = $block['attrs']['gpDynamicTextType'];
+ $link_type = ! empty( $block['attrs']['gpDynamicLinkType'] ) ? $block['attrs']['gpDynamicLinkType'] : '';
+ $source = ! empty( $block['attrs']['gpDynamicSource'] ) ? $block['attrs']['gpDynamicSource'] : 'current-post';
+ $id = $this->get_source_id( $source, $block['attrs'] );
+
+ if ( ! $id ) {
+ return '';
+ }
+
+ if ( 'title' === $text_type ) {
+ $post_title = get_the_title( $id );
+
+ if ( ! in_the_loop() ) {
+ if ( is_tax() || is_category() || is_tag() ) {
+ $post_title = get_queried_object()->name;
+ } elseif ( is_post_type_archive() ) {
+ $post_title = post_type_archive_title( '', false );
+ } elseif ( is_archive() && function_exists( 'get_the_archive_title' ) ) {
+ $post_title = get_the_archive_title();
+ } elseif ( is_home() ) {
+ $page_for_posts = get_option( 'page_for_posts' );
+
+ if ( ! empty( $page_for_posts ) ) {
+ $post_title = get_the_title( $page_for_posts );
+ } else {
+ $post_title = __( 'Blog', 'gp-premium' );
+ }
+ }
+ }
+
+ $post_title = apply_filters( 'generate_dynamic_element_text', $post_title, $block );
+
+ if ( $link_type ) {
+ $post_title = $this->add_dynamic_link( $post_title, $link_type, $source, $block );
+ }
+
+ if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) {
+ $post_title = $block['attrs']['gpDynamicTextBefore'] . $post_title;
+ }
+
+ $post_title = apply_filters( 'generate_dynamic_element_text_output', $post_title, $block );
+ $block_content = str_replace( $text_to_replace, $post_title, $block_content );
+ }
+
+ if ( 'post-date' === $text_type ) {
+ $updated_time = get_the_modified_time( 'U', $id );
+ $published_time = get_the_time( 'U', $id ) + 1800;
+
+ $post_date = sprintf(
+ '',
+ esc_attr( get_the_date( 'c', $id ) ),
+ esc_html( get_the_date( '', $id ) )
+ );
+
+ $is_updated_date = isset( $block['attrs']['gpDynamicDateType'] ) && 'updated-date' === $block['attrs']['gpDynamicDateType'];
+
+ if ( ! empty( $block['attrs']['gpDynamicDateUpdated'] ) || $is_updated_date ) {
+ if ( $updated_time > $published_time ) {
+ $post_date = sprintf(
+ '',
+ esc_attr( get_the_modified_date( 'c', $id ) ),
+ esc_html( get_the_modified_date( '', $id ) )
+ );
+ } elseif ( $is_updated_date ) {
+ // If we're showing the updated date but no updated date exists, don't display anything.
+ return '';
+ }
+ }
+
+ $post_date = apply_filters( 'generate_dynamic_element_text', $post_date, $block );
+
+ if ( $link_type ) {
+ $post_date = $this->add_dynamic_link( $post_date, $link_type, $source, $block );
+ }
+
+ $before_text = '';
+
+ if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) {
+ $before_text = $block['attrs']['gpDynamicTextBefore'];
+ }
+
+ // Use the updated date before text if we're set to replace the published date with updated date.
+ if ( ! empty( $block['attrs']['gpDynamicUpdatedDateBefore'] ) && ! empty( $block['attrs']['gpDynamicDateUpdated'] ) && $updated_time > $published_time ) {
+ $before_text = $block['attrs']['gpDynamicUpdatedDateBefore'];
+ }
+
+ if ( ! empty( $before_text ) ) {
+ $post_date = $before_text . $post_date;
+ }
+
+ $post_date = apply_filters( 'generate_dynamic_element_text_output', $post_date, $block );
+ $block_content = str_replace( $text_to_replace, $post_date, $block_content );
+ }
+
+ if ( 'post-author' === $text_type ) {
+ $author_id = $this->get_author_id( $source, $block['attrs'] );
+ $post_author = get_the_author_meta( 'display_name', $author_id );
+ $post_author = apply_filters( 'generate_dynamic_element_text', $post_author, $block );
+
+ if ( empty( $post_author ) ) {
+ return '';
+ }
+
+ if ( $link_type ) {
+ $post_author = $this->add_dynamic_link( $post_author, $link_type, $source, $block );
+ }
+
+ if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) {
+ $post_author = $block['attrs']['gpDynamicTextBefore'] . $post_author;
+ }
+
+ $post_author = apply_filters( 'generate_dynamic_element_text_output', $post_author, $block );
+ $block_content = str_replace( $text_to_replace, $post_author, $block_content );
+ }
+
+ if ( 'terms' === $text_type && 'generateblocks/headline' === $block['blockName'] ) {
+ if ( ! empty( $block['attrs']['gpDynamicTextTaxonomy'] ) ) {
+ $terms = get_the_terms( $id, $block['attrs']['gpDynamicTextTaxonomy'] );
+
+ if ( is_wp_error( $terms ) ) {
+ return $block_content;
+ }
+
+ $term_items = array();
+
+ foreach ( (array) $terms as $term ) {
+ if ( ! isset( $term->name ) ) {
+ continue;
+ }
+
+ if ( 'term-archives' === $link_type ) {
+ $term_link = get_term_link( $term, $block['attrs']['gpDynamicTextTaxonomy'] );
+
+ if ( ! is_wp_error( $term_link ) ) {
+ $term_items[] = sprintf(
+ '%2$s',
+ esc_url( get_term_link( $term, $block['attrs']['gpDynamicTextTaxonomy'] ) ),
+ $term->name,
+ $term->slug
+ );
+ }
+ } else {
+ $term_items[] = sprintf(
+ '%1$s',
+ $term->name,
+ $term->slug
+ );
+ }
+ }
+
+ if ( empty( $term_items ) ) {
+ return '';
+ }
+
+ $sep = isset( $block['attrs']['gpDynamicTextTaxonomySeparator'] ) ? $block['attrs']['gpDynamicTextTaxonomySeparator'] : ', ';
+ $term_output = implode( $sep, $term_items );
+
+ if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) {
+ $term_output = $block['attrs']['gpDynamicTextBefore'] . $term_output;
+ }
+
+ $term_output = apply_filters( 'generate_dynamic_element_text_output', $term_output, $block );
+ $block_content = str_replace( $text_to_replace, $term_output, $block_content );
+ } else {
+ return '';
+ }
+ }
+
+ if ( 'comments-number' === $text_type ) {
+ if ( ! post_password_required( $id ) && ( comments_open( $id ) || get_comments_number( $id ) ) ) {
+ if ( ! isset( $block['attrs']['gpDynamicNoCommentsText'] ) ) {
+ $block['attrs']['gpDynamicNoCommentsText'] = __( 'No Comments', 'gp-premium' );
+ }
+
+ if ( '' === $block['attrs']['gpDynamicNoCommentsText'] && get_comments_number( $id ) < 1 ) {
+ return '';
+ }
+
+ $comments_text = get_comments_number_text(
+ $block['attrs']['gpDynamicNoCommentsText'],
+ ! empty( $block['attrs']['gpDynamicSingleCommentText'] ) ? $block['attrs']['gpDynamicSingleCommentText'] : __( '1 Comment', 'gp-premium' ),
+ ! empty( $block['attrs']['gpDynamicMultipleCommentsText'] ) ? $block['attrs']['gpDynamicMultipleCommentsText'] : __( '% Comments', 'gp-premium' )
+ );
+
+ $comments_text = apply_filters( 'generate_dynamic_element_text', $comments_text, $block );
+
+ if ( '' === $comments_text ) {
+ return '';
+ }
+
+ if ( $link_type ) {
+ $comments_text = $this->add_dynamic_link( $comments_text, $link_type, $source, $block );
+ }
+
+ if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) {
+ $comments_text = $block['attrs']['gpDynamicTextBefore'] . $comments_text;
+ }
+
+ $comments_text = apply_filters( 'generate_dynamic_element_text_output', $comments_text, $block );
+ $block_content = str_replace( $text_to_replace, $comments_text, $block_content );
+ } else {
+ return '';
+ }
+ }
+
+ if ( 'post-meta' === $text_type || 'term-meta' === $text_type || 'user-meta' === $text_type ) {
+ if ( ! empty( $block['attrs']['gpDynamicTextCustomField'] ) ) {
+ $custom_field = get_post_meta( $id, $block['attrs']['gpDynamicTextCustomField'], true );
+
+ if ( 'term-meta' === $text_type ) {
+ $custom_field = get_term_meta( get_queried_object_id(), $block['attrs']['gpDynamicTextCustomField'], true );
+ }
+
+ if ( 'user-meta' === $text_type ) {
+ $author_id = $this->get_author_id( $source, $block['attrs'] );
+ $custom_field = $this->get_user_data( $author_id, $block['attrs']['gpDynamicTextCustomField'] );
+ }
+
+ $custom_field = apply_filters( 'generate_dynamic_element_text', $custom_field, $block );
+
+ if ( $custom_field ) {
+ if ( $link_type ) {
+ $custom_field = $this->add_dynamic_link( $custom_field, $link_type, $source, $block );
+ }
+
+ if ( ! empty( $block['attrs']['gpDynamicTextBefore'] ) ) {
+ $custom_field = $block['attrs']['gpDynamicTextBefore'] . $custom_field;
+ }
+
+ $custom_field = apply_filters( 'generate_dynamic_element_text_output', $custom_field, $block );
+ $block_content = str_replace( $text_to_replace, $custom_field, $block_content );
+ } else {
+ $block_content = '';
+ }
+ } else {
+ $block_content = '';
+ }
+ }
+ }
+ }
+
+ if ( 'generateblocks/button' === $block['blockName'] ) {
+ $link_type = ! empty( $block['attrs']['gpDynamicLinkType'] ) ? $block['attrs']['gpDynamicLinkType'] : '';
+
+ if ( ! empty( $link_type ) && 'term-archives' !== $link_type ) {
+ $source = ! empty( $block['attrs']['gpDynamicSource'] ) ? $block['attrs']['gpDynamicSource'] : 'current-post';
+ $id = $this->get_source_id( $source, $block['attrs'] );
+
+ if ( ! $id ) {
+ return '';
+ }
+
+ if ( $link_type ) {
+ $block_content = $this->add_dynamic_link( $block_content, $link_type, $source, $block );
+ }
+ }
+
+ if ( ! empty( $block['attrs']['gpDynamicTextType'] ) && ! empty( $block['attrs']['gpDynamicTextReplace'] ) ) {
+ $text_to_replace = $block['attrs']['gpDynamicTextReplace'];
+ $text_type = $block['attrs']['gpDynamicTextType'];
+ $link_type = ! empty( $block['attrs']['gpDynamicLinkType'] ) ? $block['attrs']['gpDynamicLinkType'] : '';
+ $source = ! empty( $block['attrs']['gpDynamicSource'] ) ? $block['attrs']['gpDynamicSource'] : 'current-post';
+ $id = $this->get_source_id( $source, $block['attrs'] );
+
+ if ( ! $id ) {
+ return '';
+ }
+
+ if ( 'terms' === $text_type ) {
+ if ( ! empty( $block['attrs']['gpDynamicTextTaxonomy'] ) ) {
+ $terms = get_the_terms( $id, $block['attrs']['gpDynamicTextTaxonomy'] );
+
+ if ( is_wp_error( $terms ) ) {
+ return '';
+ }
+
+ $term_buttons = array();
+
+ foreach ( (array) $terms as $term ) {
+ if ( ! isset( $term->name ) ) {
+ continue;
+ }
+
+ $term_button = str_replace( $text_to_replace, $term->name, $block_content );
+
+ if ( isset( $term->slug ) ) {
+ $term_button = str_replace( 'dynamic-term-class', 'post-term-item term-' . $term->slug, $term_button );
+ }
+
+ if ( 'term-archives' === $link_type ) {
+ $term_link = get_term_link( $term, $block['attrs']['gpDynamicTextTaxonomy'] );
+
+ if ( ! is_wp_error( $term_link ) ) {
+ $term_url = sprintf(
+ 'href="%s"',
+ esc_url( $term_link )
+ );
+
+ $term_button = str_replace( 'href="#"', $term_url, $term_button );
+ }
+ }
+
+ $term_buttons[] = $term_button;
+ }
+
+ if ( empty( $term_buttons ) ) {
+ return '';
+ }
+
+ $block_content = implode( '', $term_buttons );
+ } else {
+ return '';
+ }
+ }
+ }
+ }
+
+ if ( 'generateblocks/container' === $block['blockName'] ) {
+ if ( ! empty( $block['attrs']['gpRemoveContainerCondition'] ) ) {
+ $in_same_term = ! empty( $block['attrs']['gpAdjacentPostInSameTerm'] ) ? true : false;
+ $term_taxonomy = ! empty( $block['attrs']['gpAdjacentPostInSameTermTax'] ) ? $block['attrs']['gpAdjacentPostInSameTermTax'] : 'category';
+
+ if ( 'no-next-post' === $block['attrs']['gpRemoveContainerCondition'] ) {
+ $next_post = get_next_post( $in_same_term, '', $term_taxonomy );
+
+ if ( ! is_object( $next_post ) ) {
+ if ( ! empty( $block['attrs']['isGrid'] ) && ! empty( $block['attrs']['uniqueId'] ) ) {
+ return '';
+ } else {
+ return '';
+ }
+ }
+ }
+
+ if ( 'no-previous-post' === $block['attrs']['gpRemoveContainerCondition'] ) {
+ $previous_post = get_previous_post( $in_same_term, '', $term_taxonomy );
+
+ if ( ! is_object( $previous_post ) ) {
+ if ( ! empty( $block['attrs']['isGrid'] ) && ! empty( $block['attrs']['uniqueId'] ) ) {
+ return '';
+ } else {
+ return '';
+ }
+ }
+ }
+
+ if ( 'no-featured-image' === $block['attrs']['gpRemoveContainerCondition'] ) {
+ if ( ! has_post_thumbnail() ) {
+ return '';
+ }
+ }
+
+ if ( 'no-post-meta' === $block['attrs']['gpRemoveContainerCondition'] && ! empty( $block['attrs']['gpRemoveContainerConditionPostMeta'] ) ) {
+ $post_meta_check = get_post_meta( get_the_ID(), $block['attrs']['gpRemoveContainerConditionPostMeta'], true );
+
+ if ( ! $post_meta_check ) {
+ return '';
+ }
+ }
+ } elseif ( ! empty( $block['attrs']['url'] ) && ! empty( $block['attrs']['gpDynamicLinkType'] ) ) {
+ $source = ! empty( $block['attrs']['gpDynamicSource'] ) ? $block['attrs']['gpDynamicSource'] : 'current-post';
+
+ $id = $this->get_source_id( $source, $block['attrs'] );
+
+ if ( ! $id ) {
+ return '';
+ }
+ }
+ }
+
+ return $block_content;
+ }
+
+ /**
+ * Set the featured image as a GB background.
+ *
+ * @param string $url The current URL.
+ * @param array $settings The current settings.
+ */
+ public function set_background_image_url( $url, $settings ) {
+ if ( ! empty( $settings['gpDynamicImageBg'] ) ) {
+ $custom_field = '';
+ $source = ! empty( $settings['gpDynamicSource'] ) ? $settings['gpDynamicSource'] : 'current-post';
+ $id = $this->get_source_id( $source, $settings );
+
+ if ( ! $id ) {
+ return '';
+ }
+
+ if ( 'post-meta' === $settings['gpDynamicImageBg'] ) {
+ $custom_field = get_post_meta( $id, $settings['gpDynamicImageCustomField'], true );
+ }
+
+ if ( 'term-meta' === $settings['gpDynamicImageBg'] ) {
+ $custom_field = get_term_meta( get_queried_object_id(), $settings['gpDynamicImageCustomField'], true );
+ }
+
+ if ( 'user-meta' === $settings['gpDynamicImageBg'] ) {
+ $author_id = $this->get_author_id( $source, $block['attrs'] );
+ $custom_field = $this->get_user_data( $author_id, $block['attrs']['gpDynamicImageCustomField'] );
+ }
+
+ if ( 'featured-image' === $settings['gpDynamicImageBg'] && has_post_thumbnail( $id ) ) {
+ $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full';
+ $url = get_the_post_thumbnail_url( $id, $image_size );
+ } elseif ( ! empty( $custom_field ) ) {
+ if ( is_numeric( $custom_field ) ) {
+ $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full';
+ $url = wp_get_attachment_image_url( $custom_field, $image_size );
+ } else {
+ $url = $custom_field;
+ }
+ } elseif ( empty( $settings['gpUseFallbackImageBg'] ) ) {
+ $url = '';
+ }
+ }
+
+ return $url;
+ }
+
+ /**
+ * Set the attributes for our main Container wrapper.
+ *
+ * @param array $attributes The existing attributes.
+ * @param array $settings The settings for the block.
+ */
+ public function set_container_attributes( $attributes, $settings ) {
+ if ( ! empty( $settings['bgImage'] ) && in_the_loop() ) {
+ if ( ! empty( $settings['gpDynamicImageBg'] ) ) {
+ $custom_field = '';
+ $source = ! empty( $settings['gpDynamicSource'] ) ? $settings['gpDynamicSource'] : 'current-post';
+ $id = $this->get_source_id( $source, $settings );
+
+ if ( ! $id ) {
+ return $attributes;
+ }
+
+ if ( 'post-meta' === $settings['gpDynamicImageBg'] ) {
+ $custom_field = get_post_meta( $id, $settings['gpDynamicImageCustomField'], true );
+ }
+
+ if ( 'term-meta' === $settings['gpDynamicImageBg'] ) {
+ $custom_field = get_term_meta( get_queried_object_id(), $settings['gpDynamicImageCustomField'], true );
+ }
+
+ if ( 'user-meta' === $settings['gpDynamicImageBg'] ) {
+ $author_id = $this->get_author_id( $source, $block['attrs'] );
+ $custom_field = $this->get_user_data( $author_id, $block['attrs']['gpDynamicImageCustomField'] );
+ }
+
+ if ( 'featured-image' === $settings['gpDynamicImageBg'] && has_post_thumbnail( $id ) ) {
+ $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full';
+ $url = get_the_post_thumbnail_url( $id, $image_size );
+ } elseif ( ! empty( $custom_field ) ) {
+ if ( is_numeric( $custom_field ) ) {
+ $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full';
+ $url = wp_get_attachment_image_url( $custom_field, $image_size );
+ } else {
+ $url = $custom_field;
+ }
+ } elseif ( ! empty( $settings['gpUseFallbackImageBg'] ) ) {
+ if ( isset( $settings['bgImage']['id'] ) ) {
+ $image_size = ! empty( $settings['bgImageSize'] ) ? $settings['bgImageSize'] : 'full';
+ $image_src = wp_get_attachment_image_src( $settings['bgImage']['id'], $image_size );
+
+ if ( is_array( $image_src ) ) {
+ $url = $image_src[0];
+ } else {
+ $url = $settings['bgImage']['image']['url'];
+ }
+ } else {
+ $url = $settings['bgImage']['image']['url'];
+ }
+ }
+
+ if ( ! empty( $url ) ) {
+ $attributes['style'] = '--background-url:url(' . esc_url( $url ) . ')';
+ $attributes['class'] .= ' gb-has-dynamic-bg';
+ } else {
+ $attributes['class'] .= ' gb-no-dynamic-bg';
+ }
+ }
+ }
+
+ if ( ! empty( $settings['gpInlinePostMeta'] ) ) {
+ $attributes['class'] .= ' inline-post-meta-area';
+ }
+
+ return $attributes;
+ }
+
+ /**
+ * Set GenerateBlocks defaults.
+ *
+ * @param array $defaults The current defaults.
+ */
+ public function set_defaults( $defaults ) {
+ $defaults['container']['gpInlinePostMeta'] = false;
+ $defaults['container']['gpInlinePostMetaJustify'] = '';
+ $defaults['container']['gpInlinePostMetaJustifyTablet'] = '';
+ $defaults['container']['gpInlinePostMetaJustifyMobile'] = '';
+ $defaults['container']['gpDynamicImageBg'] = '';
+ $defaults['container']['gpDynamicImageCustomField'] = '';
+ $defaults['container']['gpDynamicLinkType'] = '';
+ $defaults['container']['gpDynamicSource'] = 'current-post';
+ $defaults['container']['gpDynamicSourceInSameTerm'] = false;
+ $defaults['headline']['gpDynamicTextTaxonomy'] = '';
+ $defaults['headline']['gpDynamicTextTaxonomySeparator'] = ', ';
+
+ return $defaults;
+ }
+
+ /**
+ * Generate our CSS for our options.
+ *
+ * @param string $name Name of the block.
+ * @param array $settings Our available settings.
+ * @param object $css Current desktop CSS object.
+ * @param object $desktop_css Current desktop-only CSS object.
+ * @param object $tablet_css Current tablet CSS object.
+ * @param object $tablet_only_css Current tablet-only CSS object.
+ * @param object $mobile_css Current mobile CSS object.
+ */
+ public function generate_css( $name, $settings, $css, $desktop_css, $tablet_css, $tablet_only_css, $mobile_css ) {
+ if ( 'container' === $name ) {
+ if ( ! empty( $settings['bgImage'] ) ) {
+ if ( 'element' === $settings['bgOptions']['selector'] ) {
+ $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.gb-has-dynamic-bg' );
+ } elseif ( 'pseudo-element' === $settings['bgOptions']['selector'] ) {
+ $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.gb-has-dynamic-bg:before' );
+ }
+
+ $css->add_property( 'background-image', 'var(--background-url)' );
+
+ if ( 'element' === $settings['bgOptions']['selector'] ) {
+ $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.gb-no-dynamic-bg' );
+ } elseif ( 'pseudo-element' === $settings['bgOptions']['selector'] ) {
+ $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.gb-no-dynamic-bg:before' );
+ }
+
+ $css->add_property( 'background-image', 'none' );
+ }
+
+ if ( ! empty( $settings['gpInlinePostMeta'] ) ) {
+ $css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.inline-post-meta-area > .gb-inside-container' );
+ $css->add_property( 'display', 'flex' );
+ $css->add_property( 'align-items', 'center' );
+ $css->add_property( 'justify-content', $settings['gpInlinePostMetaJustify'] );
+
+ $tablet_css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.inline-post-meta-area > .gb-inside-container' );
+ $tablet_css->add_property( 'justify-content', $settings['gpInlinePostMetaJustifyTablet'] );
+
+ $mobile_css->set_selector( '.gb-container-' . $settings['uniqueId'] . '.inline-post-meta-area > .gb-inside-container' );
+ $mobile_css->add_property( 'justify-content', $settings['gpInlinePostMetaJustifyMobile'] );
+ }
+ }
+ }
+
+ /**
+ * Set the attributes for our main Container wrapper.
+ *
+ * @param array $attributes The existing attributes.
+ * @param array $settings The settings for the block.
+ */
+ public function set_dynamic_container_url( $attributes, $settings ) {
+ $link_type = ! empty( $settings['gpDynamicLinkType'] ) ? $settings['gpDynamicLinkType'] : '';
+
+ if ( $link_type && '' !== $settings['url'] && ( 'wrapper' === $settings['linkType'] || 'hidden-link' === $settings['linkType'] ) ) {
+ if ( ! empty( $link_type ) ) {
+ $source = ! empty( $settings['gpDynamicSource'] ) ? $settings['gpDynamicSource'] : 'current-post';
+ $id = $this->get_source_id( $source, $settings );
+
+ if ( ! $id ) {
+ return $attributes;
+ }
+
+ if ( 'post' === $link_type ) {
+ $attributes['href'] = esc_url( get_permalink( $id ) );
+ }
+
+ if ( 'post-meta' === $link_type ) {
+ if ( ! empty( $block['attrs']['gpDynamicLinkCustomField'] ) ) {
+ $custom_field = get_post_meta( $id, $settings['gpDynamicLinkCustomField'], true );
+
+ if ( $custom_field ) {
+ $attributes['href'] = esc_url( $custom_field );
+ }
+ }
+ }
+ }
+ }
+
+ return $attributes;
+ }
+
+ /**
+ * Get our needed source ID.
+ *
+ * @param string $source The source attribute.
+ * @param array $attributes All block attributes.
+ */
+ public function get_source_id( $source, $attributes = array() ) {
+ $id = get_the_ID();
+
+ if ( 'next-post' === $source ) {
+ $in_same_term = ! empty( $attributes['gpDynamicSourceInSameTerm'] ) ? true : false;
+ $term_taxonomy = ! empty( $attributes['gpDynamicSourceInSameTermTaxonomy'] ) ? $attributes['gpDynamicSourceInSameTermTaxonomy'] : 'category';
+ $next_post = get_next_post( $in_same_term, '', $term_taxonomy );
+
+ if ( ! is_object( $next_post ) ) {
+ return false;
+ }
+
+ $id = $next_post->ID;
+ }
+
+ if ( 'previous-post' === $source ) {
+ $in_same_term = ! empty( $attributes['gpDynamicSourceInSameTerm'] ) ? true : false;
+ $term_taxonomy = ! empty( $attributes['gpDynamicSourceInSameTermTaxonomy'] ) ? $attributes['gpDynamicSourceInSameTermTaxonomy'] : 'category';
+ $previous_post = get_previous_post( $in_same_term, '', $term_taxonomy );
+
+ if ( ! is_object( $previous_post ) ) {
+ return false;
+ }
+
+ $id = $previous_post->ID;
+ }
+
+ return apply_filters( 'generate_dynamic_element_source_id', $id, $source, $attributes );
+ }
+
+ /**
+ * Get our author ID.
+ *
+ * @param string $source The source attribute.
+ * @param array $attributes All block attributes.
+ */
+ public function get_author_id( $source, $attributes ) {
+ global $post;
+ $post_info = $post;
+
+ if ( 'next-post' === $source ) {
+ $in_same_term = ! empty( $attributes['gpDynamicSourceInSameTerm'] ) ? true : false;
+ $term_taxonomy = ! empty( $attributes['gpDynamicSourceInSameTermTaxonomy'] ) ? $attributes['gpDynamicSourceInSameTermTaxonomy'] : 'category';
+ $next_post = get_next_post( $in_same_term, '', $term_taxonomy );
+
+ if ( ! is_object( $next_post ) ) {
+ return '';
+ }
+
+ $post_info = $next_post;
+ }
+
+ if ( 'previous-post' === $source ) {
+ $in_same_term = ! empty( $attributes['gpDynamicSourceInSameTerm'] ) ? true : false;
+ $term_taxonomy = ! empty( $attributes['gpDynamicSourceInSameTermTaxonomy'] ) ? $attributes['gpDynamicSourceInSameTermTaxonomy'] : 'category';
+ $previous_post = get_previous_post( $in_same_term, '', $term_taxonomy );
+
+ if ( ! is_object( $previous_post ) ) {
+ return '';
+ }
+
+ $post_info = $previous_post;
+ }
+
+ if ( isset( $post_info->post_author ) ) {
+ return $post_info->post_author;
+ }
+ }
+
+ /**
+ * Register our post meta.
+ */
+ public function register_meta() {
+ register_meta(
+ 'post',
+ '_generate_block_element_editor_width',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'sanitize_int' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_block_element_editor_width_unit',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => 'sanitize_text_field',
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_block_type',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => 'sanitize_text_field',
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_hook',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => 'sanitize_text_field',
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_custom_hook',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'sanitize_custom_hook' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_hook_priority',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'sanitize_int' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_post_meta_location',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'sanitize_text_field' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_post_loop_item_tagname',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'sanitize_text_field' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_disable_primary_post_meta',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'boolean',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_disable_secondary_post_meta',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'boolean',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_disable_title',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'boolean',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_disable_featured_image',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'boolean',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_use_theme_post_container',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'boolean',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_use_archive_navigation_container',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'boolean',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_disable_post_navigation',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'boolean',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_disable_archive_navigation',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'boolean',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'rest_sanitize_boolean' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_post_loop_item_display',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'sanitize_text_field' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_post_loop_item_display_tax',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'sanitize_text_field' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_post_loop_item_display_term',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'sanitize_text_field' ),
+ )
+ );
+
+ register_meta(
+ 'post',
+ '_generate_post_loop_item_display_post_meta',
+ array(
+ 'object_subtype' => 'gp_elements',
+ 'type' => 'string',
+ 'show_in_rest' => true,
+ 'auth_callback' => '__return_true',
+ 'single' => true,
+ 'sanitize_callback' => array( $this, 'sanitize_text_field' ),
+ )
+ );
+ }
+
+ /**
+ * Sanitize our custom hook field.
+ *
+ * @param string $value The value to sanitize.
+ */
+ public function sanitize_custom_hook( $value ) {
+ $not_allowed = array(
+ 'muplugins_loaded',
+ 'registered_taxonomy',
+ 'plugins_loaded',
+ 'setup_theme',
+ 'after_setup_theme',
+ 'init',
+ 'widgets_init',
+ 'wp_loaded',
+ 'pre_get_posts',
+ 'wp',
+ 'template_redirect',
+ 'get_header',
+ 'wp_enqueue_scripts',
+ 'the_post',
+ 'dynamic_sidebar',
+ 'get_footer',
+ 'get_sidebar',
+ 'wp_print_footer_scripts',
+ 'shutdown',
+ );
+
+ if ( in_array( $value, $not_allowed ) ) {
+ return '';
+ }
+
+ return sanitize_key( $value );
+ }
+
+ /**
+ * Sanitize number values that can be empty.
+ *
+ * @param int $value The value to sanitize.
+ */
+ public function sanitize_int( $value ) {
+ if ( ! is_numeric( $value ) ) {
+ return '';
+ }
+
+ return absint( $value );
+ }
+
+ /**
+ * Get our image size names and dimensions.
+ */
+ public function get_image_sizes() {
+ global $_wp_additional_image_sizes;
+
+ $default_image_sizes = get_intermediate_image_sizes();
+
+ foreach ( $default_image_sizes as $size ) {
+ $image_sizes[ $size ]['width'] = intval( get_option( "{$size}_size_w" ) );
+ $image_sizes[ $size ]['height'] = intval( get_option( "{$size}_size_h" ) );
+ $image_sizes[ $size ]['crop'] = get_option( "{$size}_crop" ) ? get_option( "{$size}_crop" ) : false;
+ }
+
+ if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) ) {
+ $image_sizes = array_merge( $image_sizes, $_wp_additional_image_sizes );
+ }
+
+ return $image_sizes;
+ }
+
+ /**
+ * Add front-end CSS.
+ */
+ public function frontend_css() {
+ require_once GP_LIBRARY_DIRECTORY . 'class-make-css.php';
+ $css = new GeneratePress_Pro_CSS();
+
+ $css->set_selector( '.dynamic-author-image-rounded' );
+ $css->add_property( 'border-radius', '100%' );
+
+ $css->set_selector( '.dynamic-featured-image, .dynamic-author-image' );
+ $css->add_property( 'vertical-align', 'middle' );
+
+ $css->set_selector( '.one-container.blog .dynamic-content-template:not(:last-child), .one-container.archive .dynamic-content-template:not(:last-child)' );
+ $css->add_property( 'padding-bottom', '0px' );
+
+ $css->set_selector( '.dynamic-entry-excerpt > p:last-child' );
+ $css->add_property( 'margin-bottom', '0px' );
+
+ wp_add_inline_style( 'generate-style', $css->css_output() );
+ }
+}
+
+GeneratePress_Block_Elements::get_instance();
diff --git a/wp-content/plugins/gp-premium/elements/class-block.php b/wp-content/plugins/gp-premium/elements/class-block.php
index 982ee4db..698a96cf 100644
--- a/wp-content/plugins/gp-premium/elements/class-block.php
+++ b/wp-content/plugins/gp-premium/elements/class-block.php
@@ -30,6 +30,14 @@ class GeneratePress_Block_Element {
*/
protected $type = '';
+ /**
+ * Has post ancestors.
+ *
+ * @since 2.0.0
+ * @var boolean If this post has a parent.
+ */
+ protected $has_parent = false;
+
/**
* Kicks it all off.
*
@@ -40,6 +48,18 @@ class GeneratePress_Block_Element {
public function __construct( $post_id ) {
$this->post_id = $post_id;
$this->type = get_post_meta( $post_id, '_generate_block_type', true );
+ $has_content_template_condition = get_post_meta( $post_id, '_generate_post_loop_item_display', true );
+
+ // Take over the $post_id temporarily if this is a child block.
+ // This allows us to inherit the parent block Display Rules.
+ if ( 'content-template' === $this->type && $has_content_template_condition ) {
+ $parent_block = wp_get_post_parent_id( $post_id );
+
+ if ( ! empty( $parent_block ) ) {
+ $this->has_parent = true;
+ $post_id = $parent_block;
+ }
+ }
$display_conditions = get_post_meta( $post_id, '_generate_element_display_conditions', true ) ? get_post_meta( $post_id, '_generate_element_display_conditions', true ) : array();
$exclude_conditions = get_post_meta( $post_id, '_generate_element_exclude_conditions', true ) ? get_post_meta( $post_id, '_generate_element_exclude_conditions', true ) : array();
@@ -55,7 +75,31 @@ class GeneratePress_Block_Element {
$post_id
);
+ /**
+ * Simplify filter name.
+ *
+ * @since 2.0.0
+ */
+ $display = apply_filters(
+ 'generate_element_display',
+ $display,
+ $post_id
+ );
+
+ // Restore our actual post ID if it's been changed.
+ if ( 'content-template' === $this->type && $has_content_template_condition ) {
+ $post_id = $this->post_id;
+ }
+
if ( $display ) {
+ global $generate_elements;
+
+ $generate_elements[ $post_id ] = array(
+ 'is_block_element' => true,
+ 'type' => $this->type,
+ 'id' => $post_id,
+ );
+
$hook = get_post_meta( $post_id, '_generate_hook', true );
$custom_hook = get_post_meta( $post_id, '_generate_custom_hook', true );
$priority = get_post_meta( $post_id, '_generate_hook_priority', true );
@@ -80,12 +124,36 @@ class GeneratePress_Block_Element {
case 'left-sidebar':
$hook = 'generate_before_left_sidebar_content';
break;
+
+ case 'content-template':
+ $hook = 'generate_before_do_template_part';
+ break;
}
if ( 'custom' === $hook && $custom_hook ) {
$hook = $custom_hook;
}
+ if ( 'post-meta-template' === $this->type ) {
+ $post_meta_location = get_post_meta( $post_id, '_generate_post_meta_location', true );
+
+ if ( '' === $post_meta_location || 'after-post-title' === $post_meta_location ) {
+ $hook = 'generate_after_entry_title';
+
+ if ( is_page() ) {
+ $hook = 'generate_after_page_title';
+ }
+ } elseif ( 'before-post-title' === $post_meta_location ) {
+ $hook = 'generate_before_entry_title';
+
+ if ( is_page() ) {
+ $hook = 'generate_before_page_title';
+ }
+ } elseif ( 'after-content' === $post_meta_location ) {
+ $hook = 'generate_after_content';
+ }
+ }
+
if ( ! $hook ) {
return;
}
@@ -98,16 +166,27 @@ class GeneratePress_Block_Element {
remove_action( 'generate_footer', 'generate_construct_footer' );
}
- add_action( esc_attr( $hook ), array( $this, 'build_hook' ), absint( $priority ) );
-
- if ( 'right-sidebar' === $this->type || 'left-sidebar' === $this->type ) {
- add_filter( 'sidebars_widgets', array( $this, 'remove_sidebar_widgets' ) );
- add_filter( 'generate_show_default_sidebar_widgets', '__return_false' );
+ if ( 'content-template' === $this->type && ! $this->has_parent ) {
+ add_filter( 'generate_do_template_part', array( $this, 'do_template_part' ) );
}
+ add_action( 'wp', array( $this, 'remove_elements' ), 100 );
+ add_action( esc_attr( $hook ), array( $this, 'build_hook' ), absint( $priority ) );
add_filter( 'generateblocks_do_content', array( $this, 'do_block_content' ) );
}
+ }
+ /**
+ * Disable our post loop items if needed.
+ *
+ * @param boolean $do Whether to display the default post loop item or not.
+ */
+ public function do_template_part( $do ) {
+ if ( GeneratePress_Elements_Helper::should_render_content_template( $this->post_id ) ) {
+ return false;
+ }
+
+ return $do;
}
/**
@@ -152,12 +231,185 @@ class GeneratePress_Block_Element {
return $widgets;
}
+ /**
+ * Remove existing elements.
+ *
+ * @since 2.0.0
+ */
+ public function remove_elements() {
+ if ( 'right-sidebar' === $this->type || 'left-sidebar' === $this->type ) {
+ add_filter( 'sidebars_widgets', array( $this, 'remove_sidebar_widgets' ) );
+ add_filter( 'generate_show_default_sidebar_widgets', '__return_false' );
+ }
+
+ if ( 'page-hero' === $this->type ) {
+ $disable_title = get_post_meta( $this->post_id, '_generate_disable_title', true );
+ $disable_featured_image = get_post_meta( $this->post_id, '_generate_disable_featured_image', true );
+ $disable_primary_post_meta = get_post_meta( $this->post_id, '_generate_disable_primary_post_meta', true );
+
+ if ( $disable_title ) {
+ if ( is_singular() ) {
+ add_filter( 'generate_show_title', '__return_false' );
+ }
+
+ remove_action( 'generate_archive_title', 'generate_archive_title' );
+ remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );
+ }
+
+ if ( $disable_primary_post_meta ) {
+ remove_action( 'generate_after_entry_title', 'generate_post_meta' );
+ }
+
+ if ( $disable_featured_image && is_singular() ) {
+ remove_action( 'generate_after_entry_header', 'generate_blog_single_featured_image' );
+ remove_action( 'generate_before_content', 'generate_blog_single_featured_image' );
+ remove_action( 'generate_after_header', 'generate_blog_single_featured_image' );
+ remove_action( 'generate_before_content', 'generate_featured_page_header_inside_single' );
+ remove_action( 'generate_after_header', 'generate_featured_page_header' );
+ }
+ }
+
+ if ( 'post-meta-template' === $this->type ) {
+ $post_meta_location = get_post_meta( $this->post_id, '_generate_post_meta_location', true );
+ $disable_primary_post_meta = get_post_meta( $this->post_id, '_generate_disable_primary_post_meta', true );
+ $disable_secondary_post_meta = get_post_meta( $this->post_id, '_generate_disable_secondary_post_meta', true );
+
+ if ( '' === $post_meta_location || 'after-post-title' === $post_meta_location || 'custom' === $post_meta_location ) {
+ if ( $disable_primary_post_meta ) {
+ remove_action( 'generate_after_entry_title', 'generate_post_meta' );
+ }
+ } elseif ( 'before-post-title' === $post_meta_location || 'custom' === $post_meta_location ) {
+ if ( $disable_primary_post_meta ) {
+ remove_action( 'generate_after_entry_title', 'generate_post_meta' );
+ }
+ } elseif ( 'after-content' === $post_meta_location || 'custom' === $post_meta_location ) {
+ if ( $disable_secondary_post_meta ) {
+ remove_action( 'generate_after_entry_content', 'generate_footer_meta' );
+ }
+ }
+ }
+
+ if ( 'post-navigation-template' === $this->type ) {
+ $disable_post_navigation = get_post_meta( $this->post_id, '_generate_disable_post_navigation', true );
+
+ if ( $disable_post_navigation ) {
+ add_filter( 'generate_footer_entry_meta_items', array( $this, 'disable_post_navigation' ) );
+ }
+ }
+
+ if ( 'archive-navigation-template' === $this->type ) {
+ $disable_archive_navigation = get_post_meta( $this->post_id, '_generate_disable_archive_navigation', true );
+
+ if ( $disable_archive_navigation ) {
+ remove_action( 'generate_after_loop', 'generate_do_post_navigation' );
+ }
+ }
+ }
+
+ /**
+ * Disable post navigation.
+ *
+ * @param array $items The post meta items.
+ */
+ public function disable_post_navigation( $items ) {
+ return array_diff( $items, array( 'post-navigation' ) );
+ }
+
/**
* Builds the HTML structure for Page Headers.
*
* @since 1.11.0
*/
public function build_hook() {
- echo GeneratePress_Elements_Helper::build_content( $this->post_id); // phpcs:ignore -- No escaping needed.
+ $post_id = $this->post_id;
+
+ if ( 'content-template' === $this->type ) {
+ // Check for child templates if this isn't already one.
+ if ( ! $this->has_parent ) {
+ $children = get_posts(
+ array(
+ 'post_type' => 'gp_elements',
+ 'post_parent' => $post_id,
+ 'order' => 'ASC',
+ 'orderby' => 'menu_order',
+ 'no_found_rows' => true,
+ 'post_status' => 'publish',
+ 'numberposts' => 20,
+ 'fields' => 'ids',
+ )
+ );
+
+ if ( ! empty( $children ) ) {
+ // Loop through any child templates and overwrite $post_id if applicable.
+ foreach ( (array) $children as $child_id ) {
+ if ( GeneratePress_Elements_Helper::should_render_content_template( $child_id ) ) {
+ $post_id = $child_id;
+ break;
+ }
+ }
+ } else {
+ // No children, check if parent should render.
+ if ( ! GeneratePress_Elements_Helper::should_render_content_template( $post_id ) ) {
+ return;
+ }
+ }
+ } else {
+ // No children, check if template should render.
+ if ( ! GeneratePress_Elements_Helper::should_render_content_template( $post_id ) ) {
+ return;
+ }
+ }
+
+ // Don't display child elements - they will replace the parent element if applicable.
+ if ( $this->has_parent ) {
+ return;
+ }
+
+ $tag_name_value = get_post_meta( $post_id, '_generate_post_loop_item_tagname', true );
+ $use_theme_container = get_post_meta( $post_id, '_generate_use_theme_post_container', true );
+
+ if ( $tag_name_value ) {
+ $tag_name = $tag_name_value;
+ } else {
+ $tag_name = 'article';
+ }
+
+ printf(
+ '<%s id="%s" class="%s">',
+ esc_attr( $tag_name ),
+ 'post-' . get_the_ID(),
+ implode( ' ', get_post_class( 'dynamic-content-template' ) ) // phpcs:ignore -- No escaping needed.
+ );
+
+ if ( $use_theme_container ) {
+ echo '';
+ }
+ }
+
+ if ( 'archive-navigation-template' === $this->type || 'post-navigation-template' === $this->type ) {
+ $use_theme_pagination_container = get_post_meta( $post_id, '_generate_use_archive_navigation_container', true );
+
+ if ( $use_theme_pagination_container ) {
+ echo '
';
+ }
+ }
+
+ echo GeneratePress_Elements_Helper::build_content( $post_id ); // phpcs:ignore -- No escaping needed.
+
+ if ( 'content-template' === $this->type ) {
+ if ( $use_theme_container ) {
+ echo '
';
+ }
+
+ echo '' . esc_attr( $tag_name ) . '>';
+ }
+
+ if ( 'archive-navigation-template' === $this->type || 'post-navigation-template' === $this->type ) {
+ $use_theme_pagination_container = get_post_meta( $post_id, '_generate_use_archive_navigation_container', true );
+
+ if ( $use_theme_pagination_container ) {
+ echo '
';
+ }
+ }
}
}
diff --git a/wp-content/plugins/gp-premium/elements/class-conditions.php b/wp-content/plugins/gp-premium/elements/class-conditions.php
index e9c11107..edbf4c9b 100644
--- a/wp-content/plugins/gp-premium/elements/class-conditions.php
+++ b/wp-content/plugins/gp-premium/elements/class-conditions.php
@@ -51,6 +51,7 @@ class GeneratePress_Conditions {
'general:author' => esc_attr__( 'Author Archives', 'gp-premium' ),
'general:date' => esc_attr__( 'Date Archives', 'gp-premium' ),
'general:search' => esc_attr__( 'Search Results', 'gp-premium' ),
+ 'general:no_results' => esc_attr__( 'No Search Results', 'gp-premium' ),
'general:404' => esc_attr__( '404 Template', 'gp-premium' ),
),
),
@@ -188,6 +189,12 @@ class GeneratePress_Conditions {
$location = 'general:date';
} elseif ( is_search() ) {
$location = 'general:search';
+
+ global $wp_query;
+
+ if ( 0 === $wp_query->found_posts ) {
+ $location = 'general:no_results';
+ }
} elseif ( is_404() ) {
$location = 'general:404';
} elseif ( is_category() ) {
diff --git a/wp-content/plugins/gp-premium/elements/class-elements-helper.php b/wp-content/plugins/gp-premium/elements/class-elements-helper.php
index 33300239..89daa4c5 100644
--- a/wp-content/plugins/gp-premium/elements/class-elements-helper.php
+++ b/wp-content/plugins/gp-premium/elements/class-elements-helper.php
@@ -142,6 +142,351 @@ class GeneratePress_Elements_Helper {
return '';
}
+ $block_type = get_post_meta( $id, '_generate_block_type', true );
+
+ if ( 'site-footer' === $block_type ) {
+ $block_element->post_content = str_replace( '{{current_year}}', date( 'Y' ), $block_element->post_content ); // phpcs:ignore -- Prefer date().
+ }
+
return apply_filters( 'generate_do_block_element_content', do_blocks( $block_element->post_content ) );
}
+
+ /**
+ * Get our Element type label.
+ *
+ * @since 2.0.0
+ * @param string $type The type value.
+ */
+ public static function get_element_type_label( $type ) {
+ switch ( $type ) {
+ case 'block':
+ $label = __( 'Block', 'gp-premium' );
+ break;
+
+ case 'header':
+ $label = __( 'Header', 'gp-premium' );
+ break;
+
+ case 'hook':
+ $label = __( 'Hook', 'gp-premium' );
+ break;
+
+ case 'layout':
+ $label = __( 'Layout', 'gp-premium' );
+ break;
+
+ case 'site-header':
+ $label = __( 'Site Header', 'gp-premium' );
+ break;
+
+ case 'page-hero':
+ $label = __( 'Page Hero', 'gp-premium' );
+ break;
+
+ case 'content-template':
+ $label = __( 'Content Template', 'gp-premium' );
+ break;
+
+ case 'post-meta-template':
+ $label = __( 'Post Meta Template', 'gp-premium' );
+ break;
+
+ case 'post-navigation-template':
+ $label = __( 'Post Navigation', 'gp-premium' );
+ break;
+
+ case 'archive-navigation-template':
+ $label = __( 'Archive Navigation', 'gp-premium' );
+ break;
+
+ case 'right-sidebar':
+ $label = __( 'Right Sidebar', 'gp-premium' );
+ break;
+
+ case 'left-sidebar':
+ $label = __( 'Left Sidebar', 'gp-premium' );
+ break;
+
+ case 'site-footer':
+ $label = __( 'Site Footer', 'gp-premium' );
+ break;
+
+ default:
+ $label = esc_html( str_replace( '-', ' ', ucfirst( $type ) ) );
+ break;
+ }
+
+ return $label;
+ }
+
+ /**
+ * Check for content template conditions.
+ *
+ * @since 2.0.0
+ * @param int $post_id The post to check.
+ */
+ public static function should_render_content_template( $post_id ) {
+ $loop_item_display = get_post_meta( $post_id, '_generate_post_loop_item_display', true );
+ $display = true;
+
+ if ( 'has-term' === $loop_item_display ) {
+ $tax = get_post_meta( $post_id, '_generate_post_loop_item_display_tax', true );
+
+ if ( $tax ) {
+ $term = get_post_meta( $post_id, '_generate_post_loop_item_display_term', true );
+
+ // Add support for multiple comma separated terms.
+ if ( ! empty( $term ) ) {
+ $term = str_replace( ' ', '', $term );
+ $term = explode( ',', $term );
+ }
+
+ if ( has_term( $term, $tax ) ) {
+ $display = true;
+ } else {
+ $display = false;
+ }
+ }
+ }
+
+ if ( 'has-post-meta' === $loop_item_display ) {
+ $post_meta_name = get_post_meta( $post_id, '_generate_post_loop_item_display_post_meta', true );
+
+ if ( $post_meta_name ) {
+ $post_meta = get_post_meta( get_the_ID(), $post_meta_name, true );
+
+ if ( $post_meta ) {
+ $display = true;
+ } else {
+ $display = false;
+ }
+ }
+ }
+
+ if ( 'is-first-post' === $loop_item_display ) {
+ global $wp_query;
+
+ if ( 0 === $wp_query->current_post && ! is_paged() ) {
+ $display = true;
+ } else {
+ $display = false;
+ }
+ }
+
+ return apply_filters( 'generate_should_render_content_template', $display, $post_id );
+ }
+
+ /**
+ * Build our entire list of hooks to display.
+ *
+ * @since 1.7
+ *
+ * @return array Our list of hooks.
+ */
+ public static function get_available_hooks() {
+ $hooks = array(
+ 'scripts' => array(
+ 'group' => esc_attr__( 'Scripts/Styles', 'gp-premium' ),
+ 'hooks' => array(
+ 'wp_head',
+ 'wp_body_open',
+ 'wp_footer',
+ ),
+ ),
+ 'header' => array(
+ 'group' => esc_attr__( 'Header', 'gp-premium' ),
+ 'hooks' => array(
+ 'generate_before_header',
+ 'generate_after_header',
+ 'generate_before_header_content',
+ 'generate_after_header_content',
+ 'generate_before_logo',
+ 'generate_after_logo',
+ 'generate_header',
+ ),
+ ),
+ 'navigation' => array(
+ 'group' => esc_attr__( 'Navigation', 'gp-premium' ),
+ 'hooks' => array(
+ 'generate_inside_navigation',
+ 'generate_after_primary_menu',
+ 'generate_inside_secondary_navigation',
+ 'generate_inside_mobile_menu',
+ 'generate_inside_mobile_menu_bar',
+ 'generate_inside_mobile_header',
+ 'generate_inside_slideout_navigation',
+ 'generate_after_slideout_navigation',
+ ),
+ ),
+ 'content' => array(
+ 'group' => esc_attr__( 'Content', 'gp-premium' ),
+ 'hooks' => array(
+ 'generate_inside_site_container',
+ 'generate_inside_container',
+ 'generate_before_main_content',
+ 'generate_after_main_content',
+ 'generate_before_content',
+ 'generate_after_content',
+ 'generate_after_entry_content',
+ 'generate_after_primary_content_area',
+ 'generate_before_entry_title',
+ 'generate_after_entry_title',
+ 'generate_after_entry_header',
+ 'generate_before_archive_title',
+ 'generate_after_archive_title',
+ 'generate_after_archive_description',
+ ),
+ ),
+ 'comments' => array(
+ 'group' => esc_attr__( 'Comments', 'gp-premium' ),
+ 'hooks' => array(
+ 'generate_before_comments_container',
+ 'generate_before_comments',
+ 'generate_inside_comments',
+ 'generate_below_comments_title',
+ ),
+ ),
+ 'sidebars' => array(
+ 'group' => esc_attr__( 'Sidebars', 'gp-premium' ),
+ 'hooks' => array(
+ 'generate_before_right_sidebar_content',
+ 'generate_after_right_sidebar_content',
+ 'generate_before_left_sidebar_content',
+ 'generate_after_left_sidebar_content',
+ ),
+ ),
+ 'footer' => array(
+ 'group' => esc_attr__( 'Footer', 'gp-premium' ),
+ 'hooks' => array(
+ 'generate_before_footer',
+ 'generate_after_footer',
+ 'generate_after_footer_widgets',
+ 'generate_before_footer_content',
+ 'generate_after_footer_content',
+ 'generate_footer',
+ ),
+ ),
+ );
+
+ if ( class_exists( 'WooCommerce' ) ) {
+ $hooks['navigation']['hooks'][] = 'generate_mobile_cart_items';
+
+ $hooks['woocommerce-global'] = array(
+ 'group' => esc_attr__( 'WooCommerce - Global', 'gp-premium' ),
+ 'hooks' => array(
+ 'woocommerce_before_main_content',
+ 'woocommerce_after_main_content',
+ 'woocommerce_sidebar',
+ 'woocommerce_breadcrumb',
+ ),
+ );
+
+ $hooks['woocommerce-shop'] = array(
+ 'group' => esc_attr__( 'WooCommerce - Shop', 'gp-premium' ),
+ 'hooks' => array(
+ 'woocommerce_archive_description',
+ 'woocommerce_before_shop_loop',
+ 'woocommerce_after_shop_loop',
+ 'woocommerce_before_shop_loop_item_title',
+ 'woocommerce_after_shop_loop_item_title',
+ ),
+ );
+
+ $hooks['woocommerce-product'] = array(
+ 'group' => esc_attr__( 'WooCommerce - Product', 'gp-premium' ),
+ 'hooks' => array(
+ 'woocommerce_before_single_product',
+ 'woocommerce_before_single_product_summary',
+ 'woocommerce_after_single_product_summary',
+ 'woocommerce_single_product_summary',
+ 'woocommerce_share',
+ 'woocommerce_simple_add_to_cart',
+ 'woocommerce_before_add_to_cart_form',
+ 'woocommerce_after_add_to_cart_form',
+ 'woocommerce_before_add_to_cart_button',
+ 'woocommerce_after_add_to_cart_button',
+ 'woocommerce_before_add_to_cart_quantity',
+ 'woocommerce_after_add_to_cart_quantity',
+ 'woocommerce_product_meta_start',
+ 'woocommerce_product_meta_end',
+ 'woocommerce_after_single_product',
+ ),
+ );
+
+ $hooks['woocommerce-cart'] = array(
+ 'group' => esc_attr__( 'WooCommerce - Cart', 'gp-premium' ),
+ 'hooks' => array(
+ 'woocommerce_before_calculate_totals',
+ 'woocommerce_after_calculate_totals',
+ 'woocommerce_before_cart',
+ 'woocommerce_after_cart_table',
+ 'woocommerce_before_cart_table',
+ 'woocommerce_before_cart_contents',
+ 'woocommerce_cart_contents',
+ 'woocommerce_after_cart_contents',
+ 'woocommerce_cart_coupon',
+ 'woocommerce_cart_actions',
+ 'woocommerce_before_cart_totals',
+ 'woocommerce_cart_totals_before_order_total',
+ 'woocommerce_cart_totals_after_order_total',
+ 'woocommerce_proceed_to_checkout',
+ 'woocommerce_after_cart_totals',
+ 'woocommerce_after_cart',
+ ),
+ );
+
+ $hooks['woocommerce-checkout'] = array(
+ 'group' => esc_attr__( 'WooCommerce - Checkout', 'gp-premium' ),
+ 'hooks' => array(
+ 'woocommerce_before_checkout_form',
+ 'woocommerce_checkout_before_customer_details',
+ 'woocommerce_checkout_after_customer_details',
+ 'woocommerce_checkout_billing',
+ 'woocommerce_before_checkout_billing_form',
+ 'woocommerce_after_checkout_billing_form',
+ 'woocommerce_before_order_notes',
+ 'woocommerce_after_order_notes',
+ 'woocommerce_checkout_shipping',
+ 'woocommerce_checkout_before_order_review',
+ 'woocommerce_checkout_order_review',
+ 'woocommerce_review_order_before_cart_contents',
+ 'woocommerce_review_order_after_cart_contents',
+ 'woocommerce_review_order_before_order_total',
+ 'woocommerce_review_order_after_order_total',
+ 'woocommerce_review_order_before_payment',
+ 'woocommerce_review_order_before_submit',
+ 'woocommerce_review_order_after_submit',
+ 'woocommerce_review_order_after_payment',
+ 'woocommerce_checkout_after_order_review',
+ 'woocommerce_after_checkout_form',
+ ),
+ );
+
+ $hooks['woocommerce-account'] = array(
+ 'group' => esc_attr__( 'WooCommerce - Account', 'gp-premium' ),
+ 'hooks' => array(
+ 'woocommerce_before_account_navigation',
+ 'woocommerce_account_navigation',
+ 'woocommerce_after_account_navigation',
+ ),
+ );
+ }
+
+ if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) {
+ $hooks['navigation']['hooks'][] = 'generate_menu_bar_items';
+ }
+
+ if ( defined( 'GENERATE_VERSION' ) && version_compare( GENERATE_VERSION, '3.0.0-alpha.1', '>' ) ) {
+ $hooks['navigation']['hooks'][] = 'generate_before_navigation';
+ $hooks['navigation']['hooks'][] = 'generate_after_navigation';
+ $hooks['navigation']['hooks'][] = 'generate_after_mobile_menu_button';
+ $hooks['navigation']['hooks'][] = 'generate_inside_mobile_menu_control_wrapper';
+
+ $hooks['content']['hooks'][] = 'generate_after_loop';
+ $hooks['content']['hooks'][] = 'generate_before_do_template_part';
+ $hooks['content']['hooks'][] = 'generate_after_do_template_part';
+ }
+
+ return apply_filters( 'generate_hooks_list', $hooks );
+ }
}
diff --git a/wp-content/plugins/gp-premium/elements/class-hero.php b/wp-content/plugins/gp-premium/elements/class-hero.php
index 49b60ea8..1fcc4e64 100644
--- a/wp-content/plugins/gp-premium/elements/class-hero.php
+++ b/wp-content/plugins/gp-premium/elements/class-hero.php
@@ -96,7 +96,26 @@ class GeneratePress_Hero {
$display = apply_filters( 'generate_header_element_display', GeneratePress_Conditions::show_data( $this->conditional, $this->exclude, $this->users ), $post_id );
+ /**
+ * Simplify filter name.
+ *
+ * @since 2.0.0
+ */
+ $display = apply_filters(
+ 'generate_element_display',
+ $display,
+ $post_id
+ );
+
if ( $display ) {
+ global $generate_elements;
+
+ $generate_elements[ $post_id ] = array(
+ 'is_block_element' => false,
+ 'type' => 'header',
+ 'id' => $post_id,
+ );
+
$location = apply_filters( 'generate_page_hero_location', 'generate_after_header', $post_id );
add_action( $location, array( $this, 'build_hero' ), 9 );
diff --git a/wp-content/plugins/gp-premium/elements/class-hooks.php b/wp-content/plugins/gp-premium/elements/class-hooks.php
index 8d644395..dca87caa 100644
--- a/wp-content/plugins/gp-premium/elements/class-hooks.php
+++ b/wp-content/plugins/gp-premium/elements/class-hooks.php
@@ -163,7 +163,26 @@ class GeneratePress_Hook {
$display = apply_filters( 'generate_hook_element_display', GeneratePress_Conditions::show_data( $this->conditional, $this->exclude, $this->users ), $post_id );
+ /**
+ * Simplify filter name.
+ *
+ * @since 2.0.0
+ */
+ $display = apply_filters(
+ 'generate_element_display',
+ $display,
+ $post_id
+ );
+
if ( $display ) {
+ global $generate_elements;
+
+ $generate_elements[ $post_id ] = array(
+ 'is_block_element' => false,
+ 'type' => 'hook',
+ 'id' => $post_id,
+ );
+
if ( 'generate_header' === $this->hook && $this->disable_site_header ) {
remove_action( 'generate_header', 'generate_construct_header' );
}
diff --git a/wp-content/plugins/gp-premium/elements/class-layout.php b/wp-content/plugins/gp-premium/elements/class-layout.php
index cc661c89..44a8a7dd 100644
--- a/wp-content/plugins/gp-premium/elements/class-layout.php
+++ b/wp-content/plugins/gp-premium/elements/class-layout.php
@@ -232,7 +232,26 @@ class GeneratePress_Site_Layout {
$display = apply_filters( 'generate_layout_element_display', GeneratePress_Conditions::show_data( $this->conditional, $this->exclude, $this->users ), $post_id );
+ /**
+ * Simplify filter name.
+ *
+ * @since 2.0.0
+ */
+ $display = apply_filters(
+ 'generate_element_display',
+ $display,
+ $post_id
+ );
+
if ( $display ) {
+ global $generate_elements;
+
+ $generate_elements[ $post_id ] = array(
+ 'is_block_element' => false,
+ 'type' => 'layout',
+ 'id' => $post_id,
+ );
+
add_action( 'wp', array( $this, 'after_setup' ), 100 );
add_action( 'wp_enqueue_scripts', array( $this, 'build_css' ), 50 );
@@ -285,6 +304,7 @@ class GeneratePress_Site_Layout {
if ( $this->disable_primary_navigation ) {
add_filter( 'generate_navigation_location', '__return_false', 20 );
+ add_filter( 'generate_disable_mobile_header_menu', '__return_true' );
}
if ( $this->disable_secondary_navigation ) {
diff --git a/wp-content/plugins/gp-premium/elements/class-metabox.php b/wp-content/plugins/gp-premium/elements/class-metabox.php
index cddfc74e..1bdbea0f 100644
--- a/wp-content/plugins/gp-premium/elements/class-metabox.php
+++ b/wp-content/plugins/gp-premium/elements/class-metabox.php
@@ -47,6 +47,7 @@ class GeneratePress_Elements_Metabox {
add_action( 'save_post', array( $this, 'save' ) );
add_action( 'wp_ajax_generate_elements_get_location_terms', array( $this, 'get_terms' ) );
add_action( 'wp_ajax_generate_elements_get_location_posts', array( $this, 'get_posts' ) );
+ add_action( 'wp_ajax_generate_elements_get_location_objects', array( $this, 'get_all_objects' ) );
}
/**
@@ -63,6 +64,14 @@ class GeneratePress_Elements_Metabox {
if ( ! $element_type ) {
$element_type = 'no-element-type';
+
+ if ( function_exists( 'get_current_screen' ) ) {
+ $current_screen = get_current_screen();
+
+ if ( ! empty( $current_screen->is_block_editor ) ) {
+ $element_type = 'block';
+ }
+ }
}
return $element_type;
@@ -87,9 +96,21 @@ class GeneratePress_Elements_Metabox {
$classes .= ' no-element-type';
}
+ if ( 'header' === $element_type && get_post_meta( get_the_ID(), '_generate_element_content', true ) ) {
+ $classes .= ' element-has-page-hero';
+ }
+
$block_type = get_post_meta( get_the_ID(), '_generate_block_type', true );
if ( $block_type ) {
+ if ( 'content-template' === $block_type && get_post_meta( get_the_ID(), '_generate_use_theme_post_container', true ) ) {
+ $classes .= ' using-theme-post-container';
+ }
+
+ if ( ( 'archive-navigation-template' === $block_type || 'post-navigation-template' === $block_type ) && get_post_meta( get_the_ID(), '_generate_use_archive_navigation_container', true ) ) {
+ $classes .= ' using-theme-pagination-container';
+ }
+
$classes .= ' ' . $block_type . '-block-type';
}
}
@@ -152,7 +173,12 @@ class GeneratePress_Elements_Metabox {
wp_enqueue_media();
wp_enqueue_script( 'wp-color-picker' );
wp_enqueue_style( 'wp-color-picker' );
- wp_enqueue_script( 'wp-color-picker-alpha', GP_LIBRARY_DIRECTORY_URL . 'alpha-color-picker/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), '2.1.4', true );
+ wp_enqueue_script( 'wp-color-picker-alpha', GP_LIBRARY_DIRECTORY_URL . 'alpha-color-picker/wp-color-picker-alpha.min.js', array( 'wp-color-picker' ), '3.0.0', true );
+
+ wp_add_inline_script(
+ 'wp-color-picker-alpha',
+ 'jQuery( function() { jQuery( ".color-picker" ).wpColorPicker(); } );'
+ );
if ( function_exists( 'wp_add_inline_script' ) && function_exists( 'generate_get_default_color_palettes' ) ) {
// Grab our palette array and turn it into JS.
@@ -167,31 +193,12 @@ class GeneratePress_Elements_Metabox {
wp_enqueue_script( 'select2', GP_LIBRARY_DIRECTORY_URL . 'select2/select2.full.min.js', array( 'jquery', 'generate-elements-metabox' ), '4.0.13', true );
$css = '';
- $containerWidth = function_exists( 'generate_get_option' ) ? generate_get_option( 'container_width' ) : 1100;
- $rightSidebarWidth = apply_filters( 'generate_right_sidebar_width', '25' );
- $leftSidebarWidth = apply_filters( 'generate_left_sidebar_width', '25' );
-
- $containerWidth = floatval( $containerWidth );
- $leftSidebarWidth = '0.' . $leftSidebarWidth;
- $rightSidebarWidth = '0.' . $rightSidebarWidth;
-
- $leftSidebarWidth = $containerWidth - ( $containerWidth * $leftSidebarWidth );
- $rightSidebarWidth = $containerWidth - ( $containerWidth * $rightSidebarWidth );
-
- $leftSidebarWidth = $containerWidth - $leftSidebarWidth;
- $rightSidebarWidth = $containerWidth - $rightSidebarWidth;
-
- $css .= '.left-sidebar-block-type div:not(.block-editor-inner-blocks) > .block-editor-block-list__layout {max-width:' . $leftSidebarWidth . 'px;margin-left: auto;margin-right: auto;box-sizing: content-box;}';
- $css .= '.right-sidebar-block-type div:not(.block-editor-inner-blocks) > .block-editor-block-list__layout {max-width:' . $rightSidebarWidth . 'px;margin-left: auto;margin-right: auto;box-sizing: content-box;}';
- $css .= '.left-sidebar-block-type div:not(.block-editor-inner-blocks) > .block-editor-block-list__layout, .right-sidebar-block-type div:not(.block-editor-inner-blocks) > .block-editor-block-list__layout {padding: 10px;}';
- $css .= 'body.left-sidebar-block-type div:not(.block-editor-inner-blocks) > .block-editor-block-list__layout .block-editor-block-list__block, body.right-sidebar-block-type div:not(.block-editor-inner-blocks) > .block-editor-block-list__layout .block-editor-block-list__block {margin-top:0;margin-bottom:0;}';
if ( function_exists( 'generate_get_option' ) && 'separate-containers' === generate_get_option( 'content_layout_setting' ) ) {
- $css .= 'body.left-sidebar-block-type div:not(.block-editor-inner-blocks) > .block-editor-block-list__layout, body.right-sidebar-block-type div:not(.block-editor-inner-blocks) > .block-editor-block-list__layout {background: ' . generate_get_option( 'background_color' ) . ';}';
+ $css .= 'body.left-sidebar-block-type .block-editor-block-list__layout.is-root-container, body.right-sidebar-block-type .block-editor-block-list__layout.is-root-container {background: ' . generate_get_option( 'background_color' ) . ';}';
+ $css .= 'body.content-template-block-type:not(.using-theme-post-container) .block-editor-block-list__layout.is-root-container, body.archive-navigation-template-block-type:not(.using-theme-pagination-container) .block-editor-block-list__layout.is-root-container {background: ' . generate_get_option( 'background_color' ) . ';}';
}
- $css .= '.editor-styles-wrapper .wp-block:not(.editor-post-title__block), .site-header-block-type .editor-styles-wrapper .wp-block:not(.editor-post-title__block), .site-footer-block-type .editor-styles-wrapper .wp-block:not(.editor-post-title__block) {max-width: 100%;}';
-
wp_add_inline_style( 'generate-elements-metabox', $css );
}
}
@@ -204,7 +211,7 @@ class GeneratePress_Elements_Metabox {
*/
public function register_metabox() {
// Title not translated on purpose.
- add_meta_box( 'generate_premium_elements', 'Element', array( $this, 'element_fields' ), 'gp_elements', 'normal' );
+ add_meta_box( 'generate_premium_elements', 'Element', array( $this, 'element_fields' ), 'gp_elements', 'normal', 'high' );
add_meta_box( 'generate_page_hero_template_tags', __( 'Template Tags', 'gp-premium' ), array( $this, 'template_tags' ), 'gp_elements', 'side', 'low' );
remove_meta_box( 'slugdiv', 'gp_elements', 'normal' );
}
@@ -220,9 +227,14 @@ class GeneratePress_Elements_Metabox {
wp_nonce_field( basename( __FILE__ ), 'generate_elements_nonce' );
$type = self::get_element_type();
+ $page_hero_class = '';
$merge = get_post_meta( get_the_ID(), '_generate_site_header_merge', true );
$conditions_set = get_post_meta( get_the_ID(), '_generate_element_display_conditions', true );
$post_status = get_post_status( get_the_ID() );
+
+ if ( 'header' === $type && get_post_meta( get_the_ID(), '_generate_element_content', true ) ) {
+ $page_hero_class = ' has-page-hero';
+ }
?>
-