diff --git a/wp-content/plugins/menu-icons/CHANGELOG.md b/wp-content/plugins/menu-icons/CHANGELOG.md index 15590ac6..d59088ea 100644 --- a/wp-content/plugins/menu-icons/CHANGELOG.md +++ b/wp-content/plugins/menu-icons/CHANGELOG.md @@ -1,3 +1,7 @@ +##### [Version 0.13.5](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.4...v0.13.5) (2023-03-30) + +- Updated Dependencies and WordPress core tested up to version 6.2 + ##### [Version 0.13.4](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.3...v0.13.4) (2023-03-01) Update dependencies diff --git a/wp-content/plugins/menu-icons/menu-icons.php b/wp-content/plugins/menu-icons/menu-icons.php index fa0405b6..c13bf4d6 100644 --- a/wp-content/plugins/menu-icons/menu-icons.php +++ b/wp-content/plugins/menu-icons/menu-icons.php @@ -11,7 +11,7 @@ * Plugin name: Menu Icons * Plugin URI: https://github.com/Codeinwp/wp-menu-icons * Description: Spice up your navigation menus with pretty icons, easily. - * Version: 0.13.4 + * Version: 0.13.5 * Author: ThemeIsle * Author URI: https://themeisle.com * License: GPLv2 @@ -29,7 +29,7 @@ final class Menu_Icons { const DISMISS_NOTICE = 'menu-icons-dismiss-notice'; - const VERSION = '0.13.4'; + const VERSION = '0.13.5'; /** * Holds plugin data diff --git a/wp-content/plugins/menu-icons/readme.txt b/wp-content/plugins/menu-icons/readme.txt index 8092aa66..7db78b07 100644 --- a/wp-content/plugins/menu-icons/readme.txt +++ b/wp-content/plugins/menu-icons/readme.txt @@ -2,7 +2,7 @@ Contributors: codeinwp, themeisle Tags: menu, nav-menu, icons, navigation Requires at least: 4.3 -Tested up to: 6.1 +Tested up to: 6.2 Stable tag: trunk License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -225,6 +225,13 @@ Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/). == Changelog == +##### [Version 0.13.5](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.4...v0.13.5) (2023-03-30) + +- Updated Dependencies and WordPress core tested up to version 6.2 + + + + ##### [Version 0.13.4](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.3...v0.13.4) (2023-03-01) Update dependencies diff --git a/wp-content/plugins/menu-icons/vendor/autoload.php b/wp-content/plugins/menu-icons/vendor/autoload.php index 43b14c71..00fc5554 100644 --- a/wp-content/plugins/menu-icons/vendor/autoload.php +++ b/wp-content/plugins/menu-icons/vendor/autoload.php @@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) { require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit95753d5aa2e3a7942eae2a5b015550e7::getLoader(); +return ComposerAutoloaderInitbf1297da02d6475c76ee8fa5bb3a7c73::getLoader(); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md index 7376615e..6f904ba7 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md @@ -1,3 +1,15 @@ +##### [Version 3.2.40](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.39...v3.2.40) (2023-03-30) + +- Add ROP upsell to all products + +##### [Version 3.2.39](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.38...v3.2.39) (2023-03-17) + +* Adds direct utility function for a direct support link. + +##### [Version 3.2.38](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.37...v3.2.38) (2023-03-10) + +Fix promotions path-breaking + ##### [Version 3.2.37](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.36...v3.2.37) (2023-03-01) Fix array casting diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php index dc72bd02..e20ba84f 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php @@ -1 +1 @@ - array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins'), 'version' => '482f75f37b88f9ea2e79'); + array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins'), 'version' => '3d1ed0347f48fcdf607c'); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/index.js b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/index.js index 1540cb8b..ad620ec9 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/index.js +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/index.js @@ -1 +1 @@ -(()=>{"use strict";var e,t={241:(e,t,o)=>{const n=window.wp.element,i=window.wp.blockEditor,r=window.wp.components,s=window.wp.compose,a=window.wp.data,l=window.wp.hooks,m=window.wp.api;var c=o.n(m);const d=()=>{const{createNotice:e}=(0,a.dispatch)("core/notices"),[t,o]=(0,n.useState)({}),[i,r]=(0,n.useState)("loading"),s=()=>{c().loadPromise.then((async()=>{try{const e=new(c().models.Settings),t=await e.fetch();o(t)}catch(e){r("error")}finally{r("loaded")}}))};return(0,n.useEffect)((()=>{s()}),[]),[e=>t?.[e],function(t,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Settings saved.";r("saving");const i=new(c().models.Settings)({[t]:o}).save();i.success(((t,o)=>{"success"===o&&(r("loaded"),e("success",n,{isDismissible:!0,type:"snackbar"})),"error"===o&&(r("error"),e("error","An unknown error occurred.",{isDismissible:!0,type:"snackbar"})),s()})),i.error((t=>{r("error"),e("error",t.responseJSON.message?t.responseJSON.message:"An unknown error occurred.",{isDismissible:!0,type:"snackbar"})}))},i]},u=e=>new Promise((t=>{wp.updates.ajax("install-plugin",{slug:e,success:()=>{t({success:!0})},error:e=>{t({success:!1,code:e.errorCode})}})})),p=e=>new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))})),h=(e,t)=>{const o={};return Object.keys(t).forEach((function(e){"innerBlocks"!==e&&(o[e]=t[e])})),e.push(o),Array.isArray(t.innerBlocks)?(o.innerBlocks=t.innerBlocks.map((e=>e.id)),t.innerBlocks.reduce(h,e)):e},w={button:{display:"flex",justifyContent:"center",width:"100%"},image:{padding:"20px 0"},skip:{container:{display:"flex",flexDirection:"column",alignItems:"center"},button:{fontSize:"9px"},poweredby:{fontSize:"9px",textTransform:"uppercase"}}},g={"blocks-css":{title:"Custom CSS",description:"Enable Otter Blocks to add Custom CSS for this block.",image:"css.jpg"},"blocks-animation":{title:"Animations",description:"Enable Otter Blocks to add Animations for this block.",image:"animation.jpg"},"blocks-conditions":{title:"Visibility Conditions",description:"Enable Otter Blocks to add Visibility Conditions for this block.",image:"conditions.jpg"}},k=e=>{let{onClick:t}=e;return(0,n.createElement)("div",{style:w.skip.container},(0,n.createElement)(r.Button,{style:w.skip.button,variant:"tertiary",onClick:t},"Skip for now"),(0,n.createElement)("span",{style:w.skip.poweredby},"Recommended by ",window.themeisleSDKPromotions.product))},E=(0,s.createHigherOrderComponent)((e=>t=>{if(t.isSelected&&Boolean(window.themeisleSDKPromotions.showPromotion)){const[o,s]=(0,n.useState)(!1),[a,l]=(0,n.useState)("default"),[m,c]=(0,n.useState)(!1),[h,E,y]=d(),f=async()=>{s(!0),await u("otter-blocks"),E("themeisle_sdk_promotions_otter_installed",!Boolean(h("themeisle_sdk_promotions_otter_installed"))),await p(window.themeisleSDKPromotions.otterActivationUrl),s(!1),l("installed")},b=()=>"installed"===a?(0,n.createElement)("p",null,(0,n.createElement)("strong",null,"Awesome! Refresh the page to see Otter Blocks in action.")):(0,n.createElement)(r.Button,{variant:"secondary",onClick:f,isBusy:o,style:w.button},"Install & Activate Otter Blocks"),P=()=>{const e={...window.themeisleSDKPromotions.option};e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,E("themeisle_sdk_promotions",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1};return(0,n.useEffect)((()=>{m&&P()}),[m]),m?(0,n.createElement)(e,t):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(i.InspectorControls,null,Object.keys(g).map((e=>{if(e===window.themeisleSDKPromotions.showPromotion){const t=g[e];return(0,n.createElement)(r.PanelBody,{key:e,title:t.title,initialOpen:!1},(0,n.createElement)("p",null,t.description),(0,n.createElement)(b,null),(0,n.createElement)("img",{style:w.image,src:window.themeisleSDKPromotions.assets+t.image}),(0,n.createElement)(k,{onClick:()=>c(!0)}))}}))))}return(0,n.createElement)(e,t)}),"withInspectorControl");(0,a.select)("core/edit-site")||(0,l.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",E);const y=window.wp.plugins,f=window.wp.editPost;function b(e){let{stacked:t=!1,noImage:o=!1,type:i,onDismiss:s,onSuccess:a,initialStatus:l=null}=e;const{assets:m,title:c,email:h,option:w,optionKey:g,optimoleActivationUrl:k,optimoleApi:E,optimoleDash:y,nonce:f}=window.themeisleSDKPromotions,[b,P]=(0,n.useState)(!1),[S,v]=(0,n.useState)(h||""),[O,B]=(0,n.useState)(!1),[D,A]=(0,n.useState)(l),[_,C]=d(),N=async()=>{B(!0);const e={...w};e[i]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await C(g,JSON.stringify(e)),s&&s()},K=()=>{P(!b)},x=e=>{v(e.target.value)},I=async e=>{e.preventDefault(),A("installing"),await u("optimole-wp"),A("activating"),await p(k),C("themeisle_sdk_promotions_optimole_installed",!Boolean(_("themeisle_sdk_promotions_optimole_installed"))),A("connecting");try{await fetch(E,{method:"POST",headers:{"X-WP-Nonce":f,"Content-Type":"application/json"},body:JSON.stringify({email:S})}),a&&a(),A("done")}catch(e){A("done")}};if(O)return null;const j=()=>"done"===D?(0,n.createElement)("div",{className:"done"},(0,n.createElement)("p",null,"Awesome! You are all set!"),(0,n.createElement)(r.Button,{icon:"external",isPrimary:!0,href:y,target:"_blank"},"Go to Optimole dashboard")):D?(0,n.createElement)("p",{className:"om-progress"},(0,n.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,n.createElement)("span",null,"installing"===D&&"Installing","activating"===D&&"Activating","connecting"===D&&"Connecting to API","…")):(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",null,"Enter your email address to create & connect your account"),(0,n.createElement)("form",{onSubmit:I},(0,n.createElement)("input",{defaultValue:S,type:"email",onChange:x,placeholder:"Email address"}),(0,n.createElement)(r.Button,{isPrimary:!0,type:"submit"},"Start using Optimole"))),F=()=>(0,n.createElement)(r.Button,{disabled:D&&"done"!==D,onClick:N,isLink:!0,className:"om-notice-dismiss"},(0,n.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,n.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice."));return t?(0,n.createElement)("div",{className:"ti-om-stack-wrap"},(0,n.createElement)("div",{className:"om-stack-notice"},F(),(0,n.createElement)("img",{src:m+"/optimole-logo.svg",alt:"Optimole logo"}),(0,n.createElement)("h2",null,"Get more with Optimole"),(0,n.createElement)("p",null,"om-editor"===i||"om-image-block"===i?"Increase this page speed and SEO ranking by optimizing images with Optimole.":"Leverage Optimole's full integration with Elementor to automatically lazyload, resize, compress to AVIF/WebP and deliver from 400 locations around the globe!"),!b&&"done"!==D&&(0,n.createElement)(r.Button,{isPrimary:!0,onClick:K,className:"cta"},"Get Started Free"),(b||"done"===D)&&j(),(0,n.createElement)("i",null,c))):(0,n.createElement)(n.Fragment,null,F(),(0,n.createElement)("div",{className:"content"},!o&&(0,n.createElement)("img",{src:m+"/optimole-logo.svg",alt:"Optimole logo"}),(0,n.createElement)("div",null,(0,n.createElement)("p",null,c),(0,n.createElement)("p",{className:"description"},"om-media"===i?"Save your server space by storing images to Optimole and deliver them optimized from 400 locations around the globe. Unlimited images, Unlimited traffic.":"This image looks to be too large and would affect your site speed, we recommend you to install Optimole to optimize your images."),!b&&(0,n.createElement)("div",{className:"actions"},(0,n.createElement)(r.Button,{isPrimary:!0,onClick:K},"Get Started Free"),(0,n.createElement)(r.Button,{isLink:!0,target:"_blank",href:"https://wordpress.org/plugins/optimole-wp"},(0,n.createElement)("span",{className:"dashicons dashicons-external"}),(0,n.createElement)("span",null,"Learn more"))),b&&(0,n.createElement)("div",{className:"form-wrap"},j()))))}const P=()=>{const[e,t]=(0,n.useState)(!0),{getBlocks:o}=(0,a.useSelect)((e=>{const{getBlocks:t}=e("core/block-editor");return{getBlocks:t}}));var i;if((i=o(),"core/image",i.reduce(h,[]).filter((e=>"core/image"===e.name))).length<2)return null;const r="ti-sdk-optimole-post-publish "+(e?"":"hidden");return(0,n.createElement)(f.PluginPostPublishPanel,{className:r},(0,n.createElement)(b,{stacked:!0,type:"om-editor",onDismiss:()=>{t(!1)}}))};new class{constructor(){const{showPromotion:e,debug:t}=window.themeisleSDKPromotions;this.promo=e,this.debug="1"===t,this.domRef=null,this.run()}run(){if(this.debug)this.runAll();else switch(this.promo){case"om-attachment":this.runAttachmentPromo();break;case"om-media":this.runMediaPromo();break;case"om-editor":this.runEditorPromo();break;case"om-image-block":this.runImageBlockPromo();break;case"om-elementor":this.runElementorPromo()}}runAttachmentPromo(){wp.media.view.Attachment.Details.prototype.on("ready",(()=>{setTimeout((()=>{this.removeAttachmentPromo(),this.addAttachmentPromo()}),100)})),wp.media.view.Modal.prototype.on("close",(()=>{setTimeout(this.removeAttachmentPromo,100)}))}runMediaPromo(){if(window.themeisleSDKPromotions.option["om-media"])return;const e=document.querySelector("#ti-optml-notice");e&&(0,n.render)((0,n.createElement)(b,{type:"om-media",onDismiss:()=>{e.style.opacity=0}}),e)}runImageBlockPromo(){if(window.themeisleSDKPromotions.option["om-image-block"])return;let e=!0,t=null;const o=(0,s.createHigherOrderComponent)((o=>r=>"core/image"===r.name&&e?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o,r),(0,n.createElement)(i.InspectorControls,null,(0,n.createElement)(b,{stacked:!0,type:"om-image-block",initialStatus:t,onDismiss:()=>{e=!1},onSuccess:()=>{t="done"}}))):(0,n.createElement)(o,r)),"withImagePromo");(0,l.addFilter)("editor.BlockEdit","optimole-promo/image-promo",o,99)}runEditorPromo(){window.themeisleSDKPromotions.option["om-editor"]||(0,y.registerPlugin)("optimole-promo",{render:P})}runElementorPromo(){if(!window.elementor)return;const e=this;elementor.on("preview:loaded",(()=>{elementor.panel.currentView.on("set:page:editor",(t=>{e.domRef&&(0,n.unmountComponentAtNode)(e.domRef),t.activeSection&&"section_image"===t.activeSection&&e.runElementorActions(e)}))}))}addAttachmentPromo(){if(this.domRef&&(0,n.unmountComponentAtNode)(this.domRef),window.themeisleSDKPromotions.option["om-attachment"])return;const e=document.querySelector("#ti-optml-notice-helper");e&&(this.domRef=e,(0,n.render)((0,n.createElement)("div",{className:"notice notice-info ti-sdk-om-notice",style:{margin:0}},(0,n.createElement)(b,{noImage:!0,type:"om-attachment",onDismiss:()=>{e.style.opacity=0}})),e))}removeAttachmentPromo(){const e=document.querySelector("#ti-optml-notice-helper");e&&(0,n.unmountComponentAtNode)(e)}runElementorActions(e){if(window.themeisleSDKPromotions.option["om-elementor"])return;const t=document.querySelector("#elementor-panel__editor__help"),o=document.createElement("div");o.id="ti-optml-notice",e.domRef=o,t&&(t.parentNode.insertBefore(o,t),(0,n.render)((0,n.createElement)(b,{stacked:!0,type:"om-elementor",onDismiss:()=>{o.style.opacity=0}}),o))}runAll(){this.runAttachmentPromo(),this.runMediaPromo(),this.runEditorPromo(),this.runImageBlockPromo(),this.runElementorPromo()}}}},o={};function n(e){var i=o[e];if(void 0!==i)return i.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.m=t,e=[],n.O=(t,o,i,r)=>{if(!o){var s=1/0;for(c=0;c=r)&&Object.keys(n.O).every((e=>n.O[e](o[l])))?o.splice(l--,1):(a=!1,r0&&e[c-1][2]>r;c--)e[c]=e[c-1];e[c]=[o,i,r]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={826:0,431:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var i,r,s=o[0],a=o[1],l=o[2],m=0;if(s.some((t=>0!==e[t]))){for(i in a)n.o(a,i)&&(n.m[i]=a[i]);if(l)var c=l(n)}for(t&&t(o);mn(241)));i=n.O(i)})(); \ No newline at end of file +(()=>{"use strict";var e,t={445:(e,t,o)=>{const n=window.wp.element,i=window.wp.blockEditor,s=window.wp.components,r=window.wp.compose,a=window.wp.data,l=window.wp.hooks,m=window.wp.api;var c=o.n(m);const d=()=>{const{createNotice:e}=(0,a.dispatch)("core/notices"),[t,o]=(0,n.useState)({}),[i,s]=(0,n.useState)("loading"),r=()=>{c().loadPromise.then((async()=>{try{const e=new(c().models.Settings),t=await e.fetch();o(t)}catch(e){s("error")}finally{s("loaded")}}))};return(0,n.useEffect)((()=>{r()}),[]),[e=>null==t?void 0:t[e],function(t,o){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Settings saved.";s("saving");const i=new(c().models.Settings)({[t]:o}).save();i.success(((t,o)=>{"success"===o&&(s("loaded"),e("success",n,{isDismissible:!0,type:"snackbar"})),"error"===o&&(s("error"),e("error","An unknown error occurred.",{isDismissible:!0,type:"snackbar"})),r()})),i.error((t=>{s("error"),e("error",t.responseJSON.message?t.responseJSON.message:"An unknown error occurred.",{isDismissible:!0,type:"snackbar"})}))},i]},p=e=>new Promise((t=>{wp.updates.ajax("install-plugin",{slug:e,success:()=>{t({success:!0})},error:e=>{t({success:!1,code:e.errorCode})}})})),u=e=>new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))})),h=(e,t)=>{const o={};return Object.keys(t).forEach((function(e){"innerBlocks"!==e&&(o[e]=t[e])})),e.push(o),Array.isArray(t.innerBlocks)?(o.innerBlocks=t.innerBlocks.map((e=>e.id)),t.innerBlocks.reduce(h,e)):e},w={button:{display:"flex",justifyContent:"center",width:"100%"},image:{padding:"20px 0"},skip:{container:{display:"flex",flexDirection:"column",alignItems:"center"},button:{fontSize:"9px"},poweredby:{fontSize:"9px",textTransform:"uppercase"}}},g={"blocks-css":{title:"Custom CSS",description:"Enable Otter Blocks to add Custom CSS for this block.",image:"css.jpg"},"blocks-animation":{title:"Animations",description:"Enable Otter Blocks to add Animations for this block.",image:"animation.jpg"},"blocks-conditions":{title:"Visibility Conditions",description:"Enable Otter Blocks to add Visibility Conditions for this block.",image:"conditions.jpg"}},E=e=>{let{onClick:t}=e;return(0,n.createElement)("div",{style:w.skip.container},(0,n.createElement)(s.Button,{style:w.skip.button,variant:"tertiary",onClick:t},"Skip for now"),(0,n.createElement)("span",{style:w.skip.poweredby},"Recommended by ",window.themeisleSDKPromotions.product))},y=(0,r.createHigherOrderComponent)((e=>t=>{if(t.isSelected&&Boolean(window.themeisleSDKPromotions.showPromotion)){const[o,r]=(0,n.useState)(!1),[a,l]=(0,n.useState)("default"),[m,c]=(0,n.useState)(!1),[h,y,k]=d(),f=async()=>{r(!0),await p("otter-blocks"),y("themeisle_sdk_promotions_otter_installed",!Boolean(h("themeisle_sdk_promotions_otter_installed"))),await u(window.themeisleSDKPromotions.otterActivationUrl),r(!1),l("installed")},P=()=>"installed"===a?(0,n.createElement)("p",null,(0,n.createElement)("strong",null,"Awesome! Refresh the page to see Otter Blocks in action.")):(0,n.createElement)(s.Button,{variant:"secondary",onClick:f,isBusy:o,style:w.button},"Install & Activate Otter Blocks"),S=()=>{const e={...window.themeisleSDKPromotions.option};e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,y("themeisle_sdk_promotions",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1};return(0,n.useEffect)((()=>{m&&S()}),[m]),m?(0,n.createElement)(e,t):(0,n.createElement)(n.Fragment,null,(0,n.createElement)(e,t),(0,n.createElement)(i.InspectorControls,null,Object.keys(g).map((e=>{if(e===window.themeisleSDKPromotions.showPromotion){const t=g[e];return(0,n.createElement)(s.PanelBody,{key:e,title:t.title,initialOpen:!1},(0,n.createElement)("p",null,t.description),(0,n.createElement)(P,null),(0,n.createElement)("img",{style:w.image,src:window.themeisleSDKPromotions.assets+t.image}),(0,n.createElement)(E,{onClick:()=>c(!0)}))}}))))}return(0,n.createElement)(e,t)}),"withInspectorControl");(0,a.select)("core/edit-site")||(0,l.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",y);const k=window.wp.plugins,f=window.wp.editPost;function P(e){let{stacked:t=!1,noImage:o=!1,type:i,onDismiss:r,onSuccess:a,initialStatus:l=null}=e;const{assets:m,title:c,email:h,option:w,optionKey:g,optimoleActivationUrl:E,optimoleApi:y,optimoleDash:k,nonce:f}=window.themeisleSDKPromotions,[P,S]=(0,n.useState)(!1),[b,v]=(0,n.useState)(h||""),[D,B]=(0,n.useState)(!1),[O,_]=(0,n.useState)(l),[A,N]=d(),C=async()=>{B(!0);const e={...w};e[i]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await N(g,JSON.stringify(e)),r&&r()},K=()=>{S(!P)},x=e=>{v(e.target.value)},I=async e=>{e.preventDefault(),_("installing"),await p("optimole-wp"),_("activating"),await u(E),N("themeisle_sdk_promotions_optimole_installed",!Boolean(A("themeisle_sdk_promotions_optimole_installed"))),_("connecting");try{await fetch(y,{method:"POST",headers:{"X-WP-Nonce":f,"Content-Type":"application/json"},body:JSON.stringify({email:b})}),a&&a(),_("done")}catch(e){_("done")}};if(D)return null;const j=()=>"done"===O?(0,n.createElement)("div",{className:"done"},(0,n.createElement)("p",null,"Awesome! You are all set!"),(0,n.createElement)(s.Button,{icon:"external",isPrimary:!0,href:k,target:"_blank"},"Go to Optimole dashboard")):O?(0,n.createElement)("p",{className:"om-progress"},(0,n.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,n.createElement)("span",null,"installing"===O&&"Installing","activating"===O&&"Activating","connecting"===O&&"Connecting to API","…")):(0,n.createElement)(n.Fragment,null,(0,n.createElement)("span",null,"Enter your email address to create & connect your account"),(0,n.createElement)("form",{onSubmit:I},(0,n.createElement)("input",{defaultValue:b,type:"email",onChange:x,placeholder:"Email address"}),(0,n.createElement)(s.Button,{isPrimary:!0,type:"submit"},"Start using Optimole"))),R=()=>(0,n.createElement)(s.Button,{disabled:O&&"done"!==O,onClick:C,isLink:!0,className:"om-notice-dismiss"},(0,n.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,n.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice."));return t?(0,n.createElement)("div",{className:"ti-om-stack-wrap"},(0,n.createElement)("div",{className:"om-stack-notice"},R(),(0,n.createElement)("img",{src:m+"/optimole-logo.svg",alt:"Optimole logo"}),(0,n.createElement)("h2",null,"Get more with Optimole"),(0,n.createElement)("p",null,"om-editor"===i||"om-image-block"===i?"Increase this page speed and SEO ranking by optimizing images with Optimole.":"Leverage Optimole's full integration with Elementor to automatically lazyload, resize, compress to AVIF/WebP and deliver from 400 locations around the globe!"),!P&&"done"!==O&&(0,n.createElement)(s.Button,{isPrimary:!0,onClick:K,className:"cta"},"Get Started Free"),(P||"done"===O)&&j(),(0,n.createElement)("i",null,c))):(0,n.createElement)(n.Fragment,null,R(),(0,n.createElement)("div",{className:"content"},!o&&(0,n.createElement)("img",{src:m+"/optimole-logo.svg",alt:"Optimole logo"}),(0,n.createElement)("div",null,(0,n.createElement)("p",null,c),(0,n.createElement)("p",{className:"description"},"om-media"===i?"Save your server space by storing images to Optimole and deliver them optimized from 400 locations around the globe. Unlimited images, Unlimited traffic.":"This image looks to be too large and would affect your site speed, we recommend you to install Optimole to optimize your images."),!P&&(0,n.createElement)("div",{className:"actions"},(0,n.createElement)(s.Button,{isPrimary:!0,onClick:K},"Get Started Free"),(0,n.createElement)(s.Button,{isLink:!0,target:"_blank",href:"https://wordpress.org/plugins/optimole-wp"},(0,n.createElement)("span",{className:"dashicons dashicons-external"}),(0,n.createElement)("span",null,"Learn more"))),P&&(0,n.createElement)("div",{className:"form-wrap"},j()))))}const S=()=>{const[e,t]=(0,n.useState)(!0),{getBlocks:o}=(0,a.useSelect)((e=>{const{getBlocks:t}=e("core/block-editor");return{getBlocks:t}}));var i;if((i=o(),"core/image",i.reduce(h,[]).filter((e=>"core/image"===e.name))).length<2)return null;const s="ti-sdk-optimole-post-publish "+(e?"":"hidden");return(0,n.createElement)(f.PluginPostPublishPanel,{className:s},(0,n.createElement)(P,{stacked:!0,type:"om-editor",onDismiss:()=>{t(!1)}}))};new class{constructor(){const{showPromotion:e,debug:t}=window.themeisleSDKPromotions;this.promo=e,this.debug="1"===t,this.domRef=null,this.run()}run(){if(this.debug)this.runAll();else switch(this.promo){case"om-attachment":this.runAttachmentPromo();break;case"om-media":this.runMediaPromo();break;case"om-editor":this.runEditorPromo();break;case"om-image-block":this.runImageBlockPromo();break;case"om-elementor":this.runElementorPromo()}}runAttachmentPromo(){wp.media.view.Attachment.Details.prototype.on("ready",(()=>{setTimeout((()=>{this.removeAttachmentPromo(),this.addAttachmentPromo()}),100)})),wp.media.view.Modal.prototype.on("close",(()=>{setTimeout(this.removeAttachmentPromo,100)}))}runMediaPromo(){if(window.themeisleSDKPromotions.option["om-media"])return;const e=document.querySelector("#ti-optml-notice");e&&(0,n.render)((0,n.createElement)(P,{type:"om-media",onDismiss:()=>{e.style.opacity=0}}),e)}runImageBlockPromo(){if(window.themeisleSDKPromotions.option["om-image-block"])return;let e=!0,t=null;const o=(0,r.createHigherOrderComponent)((o=>s=>"core/image"===s.name&&e?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(o,s),(0,n.createElement)(i.InspectorControls,null,(0,n.createElement)(P,{stacked:!0,type:"om-image-block",initialStatus:t,onDismiss:()=>{e=!1},onSuccess:()=>{t="done"}}))):(0,n.createElement)(o,s)),"withImagePromo");(0,l.addFilter)("editor.BlockEdit","optimole-promo/image-promo",o,99)}runEditorPromo(){window.themeisleSDKPromotions.option["om-editor"]||(0,k.registerPlugin)("optimole-promo",{render:S})}runElementorPromo(){if(!window.elementor)return;const e=this;elementor.on("preview:loaded",(()=>{elementor.panel.currentView.on("set:page:editor",(t=>{e.domRef&&(0,n.unmountComponentAtNode)(e.domRef),t.activeSection&&"section_image"===t.activeSection&&e.runElementorActions(e)}))}))}addAttachmentPromo(){if(this.domRef&&(0,n.unmountComponentAtNode)(this.domRef),window.themeisleSDKPromotions.option["om-attachment"])return;const e=document.querySelector("#ti-optml-notice-helper");e&&(this.domRef=e,(0,n.render)((0,n.createElement)("div",{className:"notice notice-info ti-sdk-om-notice",style:{margin:0}},(0,n.createElement)(P,{noImage:!0,type:"om-attachment",onDismiss:()=>{e.style.opacity=0}})),e))}removeAttachmentPromo(){const e=document.querySelector("#ti-optml-notice-helper");e&&(0,n.unmountComponentAtNode)(e)}runElementorActions(e){if(window.themeisleSDKPromotions.option["om-elementor"])return;const t=document.querySelector("#elementor-panel__editor__help"),o=document.createElement("div");o.id="ti-optml-notice",e.domRef=o,t&&(t.parentNode.insertBefore(o,t),(0,n.render)((0,n.createElement)(P,{stacked:!0,type:"om-elementor",onDismiss:()=>{o.style.opacity=0}}),o))}runAll(){this.runAttachmentPromo(),this.runMediaPromo(),this.runEditorPromo(),this.runImageBlockPromo(),this.runElementorPromo()}};const b=e=>{let{onDismiss:t=(()=>{})}=e;const[o,i]=(0,n.useState)(""),[r,a]=d();return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(s.Button,{disabled:"installing"===o,onClick:async()=>{const e={...window.themeisleSDKPromotions.option};e["rop-posts"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await a(window.themeisleSDKPromotions.optionKey,JSON.stringify(e)),t&&t()},variant:"link",className:"om-notice-dismiss"},(0,n.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,n.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice.")),(0,n.createElement)("p",null,"Boost your content's reach effortlessly! Introducing ",(0,n.createElement)("b",null,"Revive Old Posts"),", a cutting-edge plugin from the makers of ",window.themeisleSDKPromotions.product,". Seamlessly auto-share old & new content across social media, driving traffic like never before."),(0,n.createElement)("div",{className:"rop-notice-actions"},"installed"!==o?(0,n.createElement)(s.Button,{variant:"primary",isBusy:"installing"===o,onClick:async()=>{i("installing"),await p("tweet-old-post"),await u(window.themeisleSDKPromotions.ropActivationUrl),a("themeisle_sdk_promotions_rop_installed",!Boolean(r("themeisle_sdk_promotions_rop_installed"))),i("installed")}},"Install & Activate"):(0,n.createElement)(s.Button,{variant:"primary",href:window.themeisleSDKPromotions.ropDash},"Visit Dashboard"),(0,n.createElement)(s.Button,{variant:"link",target:"_blank",href:"https://wordpress.org/plugins/tweet-old-post/"},(0,n.createElement)("span",{className:"dashicons dashicons-external"}),(0,n.createElement)("span",null,"Learn more"))))};new class{constructor(){const{showPromotion:e,debug:t}=window.themeisleSDKPromotions;this.promo=e,this.debug="1"===t,this.domRef=null,this.run()}run(){if(window.themeisleSDKPromotions.option["rop-posts"])return;const e=document.querySelector("#ti-rop-notice");e&&(0,n.render)((0,n.createElement)(b,{onDismiss:()=>{e.style.display="none"}}),e)}}}},o={};function n(e){var i=o[e];if(void 0!==i)return i.exports;var s=o[e]={exports:{}};return t[e](s,s.exports,n),s.exports}n.m=t,e=[],n.O=(t,o,i,s)=>{if(!o){var r=1/0;for(c=0;c=s)&&Object.keys(n.O).every((e=>n.O[e](o[l])))?o.splice(l--,1):(a=!1,s0&&e[c-1][2]>s;c--)e[c]=e[c-1];e[c]=[o,i,s]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={826:0,431:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var i,s,r=o[0],a=o[1],l=o[2],m=0;if(r.some((t=>0!==e[t]))){for(i in a)n.o(a,i)&&(n.m[i]=a[i]);if(l)var c=l(n)}for(t&&t(o);mn(445)));i=n.O(i)})(); \ No newline at end of file diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/style-index.css b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/style-index.css index 6799c1f0..462f8a19 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/style-index.css +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/style-index.css @@ -1 +1 @@ -.ti-sdk-om-notice{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2e47ba;border-left-color:#3858e9;padding:0;position:relative}.ti-sdk-om-notice .content{align-items:center;background:hsla(0,0%,100%,.75);display:flex;padding:15px 20px}.ti-sdk-om-notice img{display:none;margin-right:20px;max-width:100px}.ti-sdk-om-notice .description{color:#000;font-size:14px;margin-bottom:20px}.ti-sdk-om-notice .actions{display:flex;gap:20px;margin-bottom:0;margin-top:auto}.ti-sdk-om-notice form{align-items:center;display:flex;gap:10px}.ti-sdk-om-notice .form-wrap{display:grid}.ti-sdk-om-notice .form-wrap span:not(.dashicons){font-weight:500;margin-bottom:5px}.ti-sdk-om-notice input{border-radius:0;min-width:250px}.ti-sdk-om-notice a.components-button{align-items:center;display:flex;justify-content:center}.ti-sdk-om-notice .is-link{align-items:center;display:flex;text-decoration:none}.ti-sdk-om-notice .is-link span{line-height:normal}.ti-sdk-om-notice .dashicons{margin-right:2px;text-decoration:none}.ti-sdk-om-notice .done{align-items:flex-start;display:flex;flex-direction:column}.ti-sdk-om-notice .done a{width:auto}@media screen and (min-width:768px){.ti-sdk-om-notice img{display:block}}.compat-field-optimole th{display:none!important}.compat-field-optimole td{width:100%!important}.compat-field-optimole .ti-sdk-om-notice{margin:0}.om-notice-dismiss{position:absolute;right:10px;text-decoration:none!important;top:10px}.om-notice-dismiss:before{content:none}.ti-om-stack-wrap .om-stack-notice{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2e47ba;align-items:center;display:flex;flex-direction:column;padding:20px 10px;position:relative;text-align:center}.ti-om-stack-wrap .om-stack-notice>span{display:none}.ti-om-stack-wrap .om-stack-notice img{max-width:90px!important}.ti-om-stack-wrap .om-stack-notice h2{font-size:18px;font-weight:600;margin:30px auto 10px}.ti-om-stack-wrap .om-stack-notice p{font-size:13px;line-height:17px;margin:0 auto;max-width:250px}.ti-om-stack-wrap .om-stack-notice i{color:#757575;font-size:12px;margin-top:10px}.ti-om-stack-wrap .om-stack-notice .cta{margin:20px auto 0;padding:10px 25px!important}.ti-om-stack-wrap .om-stack-notice .om-notice-dismiss{color:inherit}.ti-om-stack-wrap .om-stack-notice input{border-radius:0}.ti-om-stack-wrap .om-stack-notice form{display:grid;gap:10px;margin-top:10px;place-items:center;width:75%}.ti-om-stack-wrap .om-stack-notice .done{display:grid;gap:10px;margin-top:15px}.ti-om-stack-wrap .om-stack-notice .done p{font-size:15px;font-weight:500}.ti-om-stack-wrap .om-stack-notice .om-progress{margin:20px 0}.block-editor-block-inspector .ti-om-stack-wrap{border-top:1px solid #e0e0e0}.om-progress{align-items:center;display:flex;font-size:14px;gap:5px}.om-progress .spin{animation:om-rotation 2s linear infinite}@keyframes om-rotation{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.ti-sdk-om-promo.hidden{display:none}.media-sidebar .ti-sdk-om-notice input{flex-grow:1;min-width:unset}.media-sidebar .ti-sdk-om-notice .description{margin-bottom:10px}.media-sidebar .ti-sdk-om-notice .content{padding:15px 10px}.media-sidebar .ti-sdk-om-notice .actions{gap:10px}.media-sidebar .ti-sdk-om-notice form{flex-wrap:wrap;justify-content:center}.attachment-info .ti-sdk-om-notice input{flex-grow:1;min-width:unset}.attachment-info .ti-sdk-om-notice form{flex-wrap:wrap;justify-content:center}@media screen and (min-width:1200px){.attachment-info .ti-sdk-om-notice form{flex-wrap:unset}} +.ti-sdk-om-notice{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2e47ba;border-left-color:#3858e9;padding:0;position:relative}.ti-sdk-om-notice .content{align-items:center;background:hsla(0,0%,100%,.75);display:flex;padding:15px 20px}.ti-sdk-om-notice img{display:none;margin-right:20px;max-width:100px}.ti-sdk-om-notice .description{color:#000;font-size:14px;margin-bottom:20px}.ti-sdk-om-notice .actions{display:flex;gap:20px;margin-bottom:0;margin-top:auto}.ti-sdk-om-notice form{align-items:center;display:flex;gap:10px}.ti-sdk-om-notice .form-wrap{display:grid}.ti-sdk-om-notice .form-wrap span:not(.dashicons){font-weight:500;margin-bottom:5px}.ti-sdk-om-notice input{border-radius:0;min-width:250px}.ti-sdk-om-notice a.components-button{align-items:center;display:flex;justify-content:center}.ti-sdk-om-notice .is-link{align-items:center;display:flex;text-decoration:none}.ti-sdk-om-notice .is-link span{line-height:normal}.ti-sdk-om-notice .dashicons{margin-right:2px;text-decoration:none}.ti-sdk-om-notice .done{align-items:flex-start;display:flex;flex-direction:column}.ti-sdk-om-notice .done a{width:auto}@media screen and (min-width:768px){.ti-sdk-om-notice img{display:block}}.compat-field-optimole th{display:none!important}.compat-field-optimole td{width:100%!important}.compat-field-optimole .ti-sdk-om-notice{margin:0}.om-notice-dismiss{position:absolute;right:10px;text-decoration:none!important;top:10px}.om-notice-dismiss:before{content:none}.ti-om-stack-wrap .om-stack-notice{--wp-admin-theme-color:#3858e9;--wp-admin-theme-color-darker-10:#2e47ba;align-items:center;display:flex;flex-direction:column;padding:20px 10px;position:relative;text-align:center}.ti-om-stack-wrap .om-stack-notice>span{display:none}.ti-om-stack-wrap .om-stack-notice img{max-width:90px!important}.ti-om-stack-wrap .om-stack-notice h2{font-size:18px;font-weight:600;margin:30px auto 10px}.ti-om-stack-wrap .om-stack-notice p{font-size:13px;line-height:17px;margin:0 auto;max-width:250px}.ti-om-stack-wrap .om-stack-notice i{color:#757575;font-size:12px;margin-top:10px}.ti-om-stack-wrap .om-stack-notice .cta{margin:20px auto 0;padding:10px 25px!important}.ti-om-stack-wrap .om-stack-notice .om-notice-dismiss{color:inherit}.ti-om-stack-wrap .om-stack-notice input{border-radius:0}.ti-om-stack-wrap .om-stack-notice form{display:grid;gap:10px;margin-top:10px;place-items:center;width:75%}.ti-om-stack-wrap .om-stack-notice .done{display:grid;gap:10px;margin-top:15px}.ti-om-stack-wrap .om-stack-notice .done p{font-size:15px;font-weight:500}.ti-om-stack-wrap .om-stack-notice .om-progress{margin:20px 0}.block-editor-block-inspector .ti-om-stack-wrap{border-top:1px solid #e0e0e0}.om-progress{align-items:center;display:flex;font-size:14px;gap:5px}.om-progress .spin{-webkit-animation:om-rotation 2s linear infinite;animation:om-rotation 2s linear infinite}@-webkit-keyframes om-rotation{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}@keyframes om-rotation{0%{transform:rotate(0deg)}to{transform:rotate(359deg)}}.ti-sdk-om-promo.hidden{display:none}.media-sidebar .ti-sdk-om-notice input{flex-grow:1;min-width:unset}.media-sidebar .ti-sdk-om-notice .description{margin-bottom:10px}.media-sidebar .ti-sdk-om-notice .content{padding:15px 10px}.media-sidebar .ti-sdk-om-notice .actions{gap:10px}.media-sidebar .ti-sdk-om-notice form{flex-wrap:wrap;justify-content:center}.attachment-info .ti-sdk-om-notice input{flex-grow:1;min-width:unset}.attachment-info .ti-sdk-om-notice form{flex-wrap:wrap;justify-content:center}@media screen and (min-width:1200px){.attachment-info .ti-sdk-om-notice form{flex-wrap:unset}}.ti-sdk-rop-notice{padding:10px;position:relative}.ti-sdk-rop-notice .rop-notice-actions{display:flex;gap:10px}.ti-sdk-rop-notice p{padding:0 10px 0 0} diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php index 36c806cf..cdae0ca3 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php @@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) { return; } // Current SDK version and path. -$themeisle_sdk_version = '3.2.37'; +$themeisle_sdk_version = '3.2.40'; $themeisle_sdk_path = dirname( __FILE__ ); global $themeisle_sdk_max_version; @@ -29,7 +29,7 @@ if ( ! is_file( $themeisle_sdk_path . $themeisle_sdk_relative_licenser_path ) && add_filter( 'themeisle_sdk_required_files', 'themeisle_sdk_load_licenser_if_present' ); } -if ( ( is_null( $themeisle_sdk_max_path ) || version_compare( $themeisle_sdk_version, $themeisle_sdk_max_path ) == 0 ) && +if ( ( is_null( $themeisle_sdk_max_path ) || version_compare( $themeisle_sdk_version, $themeisle_sdk_max_version ) == 0 ) && apply_filters( 'themeisle_sdk_should_overwrite_path', false, $themeisle_sdk_path, $themeisle_sdk_max_path ) ) { $themeisle_sdk_max_path = $themeisle_sdk_path; } @@ -173,3 +173,46 @@ if ( ! function_exists( 'tsdk_lkey' ) ) { return \ThemeisleSDK\Modules\Licenser::key( $file ); } } +if ( ! function_exists( 'tsdk_support_link' ) ) { + + /** + * Get Themeisle Support URL. + * + * @param string $file Product basefile. + * + * @return false|string Return support URL or false if no license is active. + */ + function tsdk_support_link( $file ) { + + if ( ! did_action( 'init' ) ) { + _doing_it_wrong( __FUNCTION__, 'tsdk_support_link() should not be called before the init action.', '3.2.39' ); + } + $params = []; + if ( ! tsdk_lis_valid( $file ) ) { + return false; + } + $product = \ThemeisleSDK\Product::get( $file ); + if ( ! $product->requires_license() ) { + return false; + } + static $site_params = null; + if ( $site_params === null ) { + if ( is_user_logged_in() && function_exists( 'wp_get_current_user' ) ) { + $current_user = wp_get_current_user(); + $site_params['semail'] = urlencode( $current_user->user_email ); + } + $site_params['swb'] = urlencode( home_url() ); + global $wp_version; + $site_params['snv'] = urlencode( sprintf( 'WP-%s-PHP-%s', $wp_version, ( PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION ) ) ); + } + $params['slkey'] = tsdk_lkey( $file ); + $params['sprd'] = urlencode( $product->get_name() ); + $params['svrs'] = urlencode( $product->get_version() ); + + + return add_query_arg( + array_merge( $site_params, $params ), + 'https://store.themeisle.com/direct-support/' + ); + } +} diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php index edc02765..70bc61a1 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php @@ -54,6 +54,13 @@ class Promotions extends Abstract_Module { */ private $option_optimole = 'themeisle_sdk_promotions_optimole_installed'; + /** + * Option key for ROP promos. + * + * @var string + */ + private $option_rop = 'themeisle_sdk_promotions_rop_installed'; + /** * Loaded promotion. * @@ -86,6 +93,7 @@ class Promotions extends Abstract_Module { $this->debug = apply_filters( 'themeisle_sdk_promo_debug', $this->debug ); $promotions_to_load = apply_filters( $product->get_key() . '_load_promotions', array() ); $promotions_to_load[] = 'optimole'; + $promotions_to_load[] = 'rop'; $this->promotions = $this->get_promotions(); @@ -152,6 +160,10 @@ class Promotions extends Abstract_Module { if ( isset( $_GET['optimole_reference_key'] ) ) { update_option( 'optimole_reference_key', sanitize_key( $_GET['optimole_reference_key'] ) ); } + + if ( isset( $_GET['rop_reference_key'] ) ) { + update_option( 'rop_reference_key', sanitize_key( $_GET['rop_reference_key'] ) ); + } } /** @@ -191,6 +203,16 @@ class Promotions extends Abstract_Module { 'default' => false, ) ); + register_setting( + 'themeisle_sdk_settings', + $this->option_rop, + array( + 'type' => 'boolean', + 'sanitize_callback' => 'rest_sanitize_boolean', + 'show_in_rest' => true, + 'default' => false, + ) + ); } /** @@ -201,7 +223,12 @@ class Promotions extends Abstract_Module { private function get_sdk_uri() { global $themeisle_sdk_max_path; - if ( $this->product->is_plugin() ) { + /** + * $themeisle_sdk_max_path can point to the theme when the theme version is higher. + * hence we also need to check that the path does not point to the theme else this will break the URL. + * References: https://github.com/Codeinwp/neve-pro-addon/issues/2403 + */ + if ( $this->product->is_plugin() && false === strpos( $themeisle_sdk_max_path, get_template_directory() ) ) { return plugins_url( '/', $themeisle_sdk_max_path . '/themeisle-sdk/' ); }; @@ -235,8 +262,9 @@ class Promotions extends Abstract_Module { */ private function is_plugin_installed( $plugin ) { static $allowed_keys = [ - 'otter-blocks' => 'otter-blocks/otter-blocks.php', - 'optimole-wp' => 'optimole-wp/optimole-wp.php', + 'otter-blocks' => 'otter-blocks/otter-blocks.php', + 'optimole-wp' => 'optimole-wp/optimole-wp.php', + 'tweet-old-post' => 'tweet-old-post/tweet-old-post.php', ]; if ( ! isset( $allowed_keys[ $plugin ] ) ) { @@ -260,8 +288,11 @@ class Promotions extends Abstract_Module { $had_otter_from_promo = get_option( $this->option_otter, false ); $has_optimole = defined( 'OPTIMOLE_VERSION' ) || $this->is_plugin_installed( 'optimole-wp' ); $had_optimole_from_promo = get_option( $this->option_optimole, false ); + $has_rop = defined( 'ROP_LITE_VERSION' ) || $this->is_plugin_installed( 'tweet-old-post' ); + $had_rop_from_promo = get_option( $this->option_rop, false ); $is_min_req_v = version_compare( get_bloginfo( 'version' ), '5.8', '>=' ); $has_enough_attachments = $this->has_min_media_attachments(); + $has_enough_old_posts = $this->has_old_posts(); $all = [ 'optimole' => [ @@ -300,6 +331,12 @@ class Promotions extends Abstract_Module { 'screen' => 'editor', ], ], + 'rop' => [ + 'rop-posts' => [ + 'env' => ! $has_rop && ! $had_rop_from_promo && $has_enough_old_posts, + 'screen' => 'edit-post', + ], + ], ]; foreach ( $all as $slug => $data ) { @@ -370,6 +407,7 @@ class Promotions extends Abstract_Module { $is_elementor = isset( $_GET['action'] ) && $_GET['action'] === 'elementor'; $is_media = isset( $current_screen->id ) && $current_screen->id === 'upload'; + $is_posts = isset( $current_screen->id ) && $current_screen->id === 'edit-post'; $is_editor = method_exists( $current_screen, 'is_block_editor' ) && $current_screen->is_block_editor(); $return = []; @@ -397,6 +435,11 @@ class Promotions extends Abstract_Module { unset( $this->promotions[ $slug ][ $key ] ); } break; + case 'edit-post': + if ( ! $is_posts ) { + unset( $this->promotions[ $slug ][ $key ] ); + } + break; } } @@ -420,6 +463,9 @@ class Promotions extends Abstract_Module { if ( $this->get_upsells_dismiss_time( 'om-media' ) === false ) { add_action( 'admin_notices', [ $this, 'render_optimole_dash_notice' ] ); } + if ( $this->get_upsells_dismiss_time( 'rop-posts' ) === false ) { + add_action( 'admin_notices', [ $this, 'render_rop_dash_notice' ] ); + } return; } @@ -439,6 +485,10 @@ class Promotions extends Abstract_Module { add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] ); add_action( 'admin_notices', [ $this, 'render_optimole_dash_notice' ] ); break; + case 'rop-posts': + add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] ); + add_action( 'admin_notices', [ $this, 'render_rop_dash_notice' ] ); + break; } } @@ -483,7 +533,9 @@ class Promotions extends Abstract_Module { 'optimoleApi' => esc_url( rest_url( 'optml/v1/register_service' ) ), 'optimoleActivationUrl' => $this->get_plugin_activation_link( 'optimole-wp' ), 'otterActivationUrl' => $this->get_plugin_activation_link( 'otter-blocks' ), + 'ropActivationUrl' => $this->get_plugin_activation_link( 'tweet-old-post' ), 'optimoleDash' => esc_url( add_query_arg( [ 'page' => 'optimole' ], admin_url( 'upload.php' ) ) ), + 'ropDash' => esc_url( add_query_arg( [ 'page' => 'TweetOldPost' ], admin_url( 'admin.php' ) ) ), // translators: %s is the product name. 'title' => esc_html( sprintf( __( 'Recommended by %s', 'textdomain' ), $this->product->get_name() ) ), ] @@ -492,6 +544,19 @@ class Promotions extends Abstract_Module { wp_enqueue_style( $handle, $themeisle_sdk_src . 'assets/js/build/style-index.css', [ 'wp-components' ], $asset_file['version'] ); } + /** + * Render rop notice. + */ + public function render_rop_dash_notice() { + $screen = get_current_screen(); + + if ( ! isset( $screen->id ) || $screen->id !== 'edit-post' ) { + return; + } + + echo '
'; + } + /** * Add promo to attachment modal. * @@ -580,4 +645,54 @@ class Promotions extends Abstract_Module { } return $attachment_count > 50; } + + /** + * Check if the website has more than 100 posts and over 10 are over a year old. + * + * @return bool + */ + private function has_old_posts() { + if ( $this->debug ) { + return true; + } + + $posts_count = get_transient( 'tsk_posts_count' ); + + // Create a new WP_Query object to get all posts + $args = array( + 'post_type' => 'post', + 'posts_per_page' => 101, //phpcs:ignore WordPress.WP.PostsPerPage.posts_per_page_posts_per_page + 'fields' => 'ids', + 'no_found_rows' => true, + ); + + if ( false === $posts_count ) { + $query = new \WP_Query( $args ); + $total_posts = $query->post_count; + wp_reset_postdata(); + + // Count the number of posts older than 1 year + $one_year_ago = gmdate( 'Y-m-d H:i:s', strtotime( '-1 year' ) ); + $args['date_query'] = array( + array( + 'before' => $one_year_ago, + 'inclusive' => true, + ), + ); + + $query = new \WP_Query( $args ); + $old_posts = $query->post_count; + wp_reset_postdata(); + + $posts_count = array( + 'total_posts' => $total_posts, + 'old_posts' => $old_posts, + ); + + set_transient( 'tsk_posts_count', $posts_count, DAY_IN_SECONDS ); + } + + // Check if there are more than 100 posts and more than 10 old posts + return $posts_count['total_posts'] > 100 && $posts_count['old_posts'] > 10; + } } diff --git a/wp-content/plugins/menu-icons/vendor/composer/InstalledVersions.php b/wp-content/plugins/menu-icons/vendor/composer/InstalledVersions.php index c6b54af7..51e734a7 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/InstalledVersions.php +++ b/wp-content/plugins/menu-icons/vendor/composer/InstalledVersions.php @@ -98,7 +98,7 @@ class InstalledVersions { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { - return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']); + return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false; } } @@ -119,7 +119,7 @@ class InstalledVersions */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { - $constraint = $parser->parseConstraints($constraint); + $constraint = $parser->parseConstraints((string) $constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); @@ -328,7 +328,9 @@ class InstalledVersions if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { - $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require $vendorDir.'/composer/installed.php'; + $installed[] = self::$installedByVendor[$vendorDir] = $required; if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) { self::$installed = $installed[count($installed) - 1]; } @@ -340,12 +342,17 @@ class InstalledVersions // only require the installed.php file if this file is loaded from its dumped location, // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937 if (substr(__DIR__, -8, 1) !== 'C') { - self::$installed = require __DIR__ . '/installed.php'; + /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */ + $required = require __DIR__ . '/installed.php'; + self::$installed = $required; } else { self::$installed = array(); } } - $installed[] = self::$installed; + + if (self::$installed !== array()) { + $installed[] = self::$installed; + } return $installed; } diff --git a/wp-content/plugins/menu-icons/vendor/composer/autoload_real.php b/wp-content/plugins/menu-icons/vendor/composer/autoload_real.php index 3c6f489d..a9da6827 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/autoload_real.php +++ b/wp-content/plugins/menu-icons/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit95753d5aa2e3a7942eae2a5b015550e7 +class ComposerAutoloaderInitbf1297da02d6475c76ee8fa5bb3a7c73 { private static $loader; @@ -22,16 +22,16 @@ class ComposerAutoloaderInit95753d5aa2e3a7942eae2a5b015550e7 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit95753d5aa2e3a7942eae2a5b015550e7', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitbf1297da02d6475c76ee8fa5bb3a7c73', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); - spl_autoload_unregister(array('ComposerAutoloaderInit95753d5aa2e3a7942eae2a5b015550e7', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitbf1297da02d6475c76ee8fa5bb3a7c73', 'loadClassLoader')); require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit95753d5aa2e3a7942eae2a5b015550e7::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitbf1297da02d6475c76ee8fa5bb3a7c73::getInitializer($loader)); $loader->register(true); - $filesToLoad = \Composer\Autoload\ComposerStaticInit95753d5aa2e3a7942eae2a5b015550e7::$files; + $filesToLoad = \Composer\Autoload\ComposerStaticInitbf1297da02d6475c76ee8fa5bb3a7c73::$files; $requireFile = \Closure::bind(static function ($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; diff --git a/wp-content/plugins/menu-icons/vendor/composer/autoload_static.php b/wp-content/plugins/menu-icons/vendor/composer/autoload_static.php index 6f803295..b36dfba3 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/autoload_static.php +++ b/wp-content/plugins/menu-icons/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit95753d5aa2e3a7942eae2a5b015550e7 +class ComposerStaticInitbf1297da02d6475c76ee8fa5bb3a7c73 { public static $files = array ( '2c2d2fe92db4cd03403dbb108ac263b7' => __DIR__ . '/..' . '/codeinwp/gutenberg-menu-icons/load.php', @@ -20,7 +20,7 @@ class ComposerStaticInit95753d5aa2e3a7942eae2a5b015550e7 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->classMap = ComposerStaticInit95753d5aa2e3a7942eae2a5b015550e7::$classMap; + $loader->classMap = ComposerStaticInitbf1297da02d6475c76ee8fa5bb3a7c73::$classMap; }, null, ClassLoader::class); } diff --git a/wp-content/plugins/menu-icons/vendor/composer/installed.json b/wp-content/plugins/menu-icons/vendor/composer/installed.json index c87165ea..6b9779ed 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/installed.json +++ b/wp-content/plugins/menu-icons/vendor/composer/installed.json @@ -139,23 +139,23 @@ }, { "name": "codeinwp/themeisle-sdk", - "version": "3.2.37", - "version_normalized": "3.2.37.0", + "version": "3.2.40", + "version_normalized": "3.2.40.0", "source": { "type": "git", "url": "https://github.com/Codeinwp/themeisle-sdk.git", - "reference": "a2079ee8cea68b5dbaabec1e06f15048ae9c9de7" + "reference": "d719fff89cb6643e555f5e3daa4ebd627ccb4fd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/a2079ee8cea68b5dbaabec1e06f15048ae9c9de7", - "reference": "a2079ee8cea68b5dbaabec1e06f15048ae9c9de7", + "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/d719fff89cb6643e555f5e3daa4ebd627ccb4fd7", + "reference": "d719fff89cb6643e555f5e3daa4ebd627ccb4fd7", "shasum": "" }, "require-dev": { "codeinwp/phpcs-ruleset": "dev-main" }, - "time": "2023-03-01T18:02:16+00:00", + "time": "2023-03-30T09:29:30+00:00", "type": "library", "installation-source": "dist", "notification-url": "https://packagist.org/downloads/", @@ -176,7 +176,7 @@ ], "support": { "issues": "https://github.com/Codeinwp/themeisle-sdk/issues", - "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.37" + "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.40" }, "install-path": "../codeinwp/themeisle-sdk" } diff --git a/wp-content/plugins/menu-icons/vendor/composer/installed.php b/wp-content/plugins/menu-icons/vendor/composer/installed.php index 57f9fce6..906b0a20 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/installed.php +++ b/wp-content/plugins/menu-icons/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => 'codeinwp/wp-menu-icons', - 'pretty_version' => 'v0.13.4', - 'version' => '0.13.4.0', - 'reference' => '8ea03e3323f7f4c4a6d07bd33f3a305b46cc1fbe', + 'pretty_version' => 'v0.13.5', + 'version' => '0.13.5.0', + 'reference' => '90e8cdc9710ce66bc735545ccea2bd5048d7f2f6', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -42,18 +42,18 @@ 'dev_requirement' => false, ), 'codeinwp/themeisle-sdk' => array( - 'pretty_version' => '3.2.37', - 'version' => '3.2.37.0', - 'reference' => 'a2079ee8cea68b5dbaabec1e06f15048ae9c9de7', + 'pretty_version' => '3.2.40', + 'version' => '3.2.40.0', + 'reference' => 'd719fff89cb6643e555f5e3daa4ebd627ccb4fd7', 'type' => 'library', 'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk', 'aliases' => array(), 'dev_requirement' => false, ), 'codeinwp/wp-menu-icons' => array( - 'pretty_version' => 'v0.13.4', - 'version' => '0.13.4.0', - 'reference' => '8ea03e3323f7f4c4a6d07bd33f3a305b46cc1fbe', + 'pretty_version' => 'v0.13.5', + 'version' => '0.13.5.0', + 'reference' => '90e8cdc9710ce66bc735545ccea2bd5048d7f2f6', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(),