From d03256bbc31663a70a4243d49db2f97050e573da Mon Sep 17 00:00:00 2001 From: Lai Power Date: Fri, 19 Apr 2024 10:49:42 +0000 Subject: [PATCH] updated plugin `Menu Icons` version 0.13.13 --- wp-content/plugins/menu-icons/CHANGELOG.md | 16 ++ wp-content/plugins/menu-icons/menu-icons.php | 4 +- wp-content/plugins/menu-icons/readme.txt | 27 ++- .../codeinwp/themeisle-sdk/CHANGELOG.md | 24 ++ .../assets/js/build/promos/index.asset.php | 2 +- .../assets/js/build/promos/index.js | 2 +- .../vendor/codeinwp/themeisle-sdk/load.php | 43 +++- .../codeinwp/themeisle-sdk/src/Loader.php | 219 ++++++++++++++++++ .../themeisle-sdk/src/Modules/About_us.php | 86 +++---- .../src/Modules/Announcements.php | 76 +++--- .../src/Modules/Compatibilities.php | 73 +++--- .../src/Modules/Dashboard_widget.php | 11 +- .../src/Modules/Featured_plugins.php | 167 +++++++++++++ .../themeisle-sdk/src/Modules/Licenser.php | 77 +++--- .../themeisle-sdk/src/Modules/Logger.php | 6 +- .../themeisle-sdk/src/Modules/Promotions.php | 77 ++++-- .../themeisle-sdk/src/Modules/Review.php | 7 +- .../themeisle-sdk/src/Modules/Rollback.php | 23 +- .../src/Modules/Script_loader.php | 13 +- .../src/Modules/Uninstall_feedback.php | 150 +++++------- .../themeisle-sdk/src/Modules/Welcome.php | 9 +- .../codeinwp/themeisle-sdk/src/Product.php | 1 + .../vendor/codeinwp/themeisle-sdk/start.php | 1 + .../menu-icons/vendor/composer/installed.json | 12 +- .../menu-icons/vendor/composer/installed.php | 18 +- 25 files changed, 834 insertions(+), 310 deletions(-) create mode 100644 wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Featured_plugins.php diff --git a/wp-content/plugins/menu-icons/CHANGELOG.md b/wp-content/plugins/menu-icons/CHANGELOG.md index f3ff8825..3dfe7204 100644 --- a/wp-content/plugins/menu-icons/CHANGELOG.md +++ b/wp-content/plugins/menu-icons/CHANGELOG.md @@ -1,3 +1,19 @@ +##### [Version 0.13.13](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.12...v0.13.13) (2024-04-18) + +### Improvements +​- **Updated internal dependencies:​​** Enhanced performance and security. + +##### [Version 0.13.12](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.11...v0.13.12) (2024-04-01) + +### Improvements +- **Updated internal dependencies** + +##### [Version 0.13.11](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.10...v0.13.11) (2024-03-29) + +### Fixes +- Updated internal dependencies +- Enhanced security + ##### [Version 0.13.10](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.9...v0.13.10) (2024-03-26) ### Improvements diff --git a/wp-content/plugins/menu-icons/menu-icons.php b/wp-content/plugins/menu-icons/menu-icons.php index 09d5e38d..107bf2f0 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.10 + * Version: 0.13.13 * 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.10'; + const VERSION = '0.13.13'; /** * Holds plugin data diff --git a/wp-content/plugins/menu-icons/readme.txt b/wp-content/plugins/menu-icons/readme.txt index 654ae46d..dc58c8d4 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.7 -Tested up to: 6.4 +Tested up to: 6.5 Stable tag: trunk License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -225,6 +225,31 @@ Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/). == Changelog == +##### [Version 0.13.13](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.12...v0.13.13) (2024-04-18) + +### Improvements +​- **Updated internal dependencies:​​** Enhanced performance and security. + + + + +##### [Version 0.13.12](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.11...v0.13.12) (2024-04-01) + +### Improvements +- **Updated internal dependencies** + + + + +##### [Version 0.13.11](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.10...v0.13.11) (2024-03-29) + +### Fixes +- Updated internal dependencies +- Enhanced security + + + + ##### [Version 0.13.10](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.9...v0.13.10) (2024-03-26) ### Improvements 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 dbe38cb7..13767a38 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,27 @@ +##### [Version 3.3.20](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.19...v3.3.20) (2024-04-16) + +fix required params on sprintf + +##### [Version 3.3.19](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.18...v3.3.19) (2024-04-15) + +Add full translation support + +##### [Version 3.3.18](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.17...v3.3.18) (2024-04-05) + +### Big Fixes +- Fix rollback for Themes + +##### [Version 3.3.17](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.16...v3.3.17) (2024-04-01) + +### Improvements +- Add safeguard against type mutation for featured plugin results. + +##### [Version 3.3.16](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.15...v3.3.16) (2024-03-29) + +### Improvements +- Formbricks on multiple products. +- List Pro Products in featured tab. + ##### [Version 3.3.15](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.14...v3.3.15) (2024-03-26) ### Improvements diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.asset.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.asset.php index 77c2d470..94348de4 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.asset.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.asset.php @@ -1 +1 @@ - array('wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins'), 'version' => 'bae1a40c3811e093a7be'); + array('wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins'), 'version' => 'ba05d75f2096d5f440d0'); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.js b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.js index b85c4916..2c5656d7 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.js +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.js @@ -1 +1 @@ -!function(){"use strict";var e,t={165:function(){var e=window.wp.element,t=window.wp.blockEditor,o=window.wp.components,n=window.wp.compose,i=window.wp.data,s=window.wp.hooks,r=()=>{const{createNotice:t}=(0,i.dispatch)("core/notices"),[o,n]=(0,e.useState)({}),[s,r]=(0,e.useState)("loading");return(0,i.useSelect)((e=>{if(Object.keys(o).length)return;const{getEntityRecord:t}=e("core"),i=t("root","site");i&&(r("loaded"),n(i))}),[]),[e=>null==o?void 0:o[e],async function(e,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Settings saved.";const s={[e]:o};try{const e=await fetch("/wp-json/wp/v2/settings",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpApiSettings.nonce},body:JSON.stringify(s)});e.ok||(r("error"),t("error","Could not save the settings.",{isDismissible:!0,type:"snackbar"}));const o=await e.json();r("loaded"),t("success",i,{isDismissible:!0,type:"snackbar"}),n(o)}catch(e){console.error("Error updating option:",e)}},s]};const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((o=>{wp.updates.ajax(!0===t?"install-theme":"install-plugin",{slug:e,success:()=>{o({success:!0})},error:e=>{o({success:!1,code:e.errorCode})}})}))},l=e=>new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))})),m=(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(m,e)):e},c={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"}}},d={"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"}},u=t=>{let{onClick:n}=t;return(0,e.createElement)("div",{style:c.skip.container},(0,e.createElement)(o.Button,{style:c.skip.button,variant:"tertiary",onClick:n},"Skip for now"),(0,e.createElement)("span",{style:c.skip.poweredby},"Recommended by ",window.themeisleSDKPromotions.product))},p=(0,n.createHigherOrderComponent)((n=>i=>{if(i.isSelected&&Boolean(window.themeisleSDKPromotions.showPromotion)){const[s,m]=(0,e.useState)(!1),[p,h]=(0,e.useState)("default"),[w,g]=(0,e.useState)(!1),[f,E,y]=r(),k=async()=>{m(!0),await a("otter-blocks"),E("themeisle_sdk_promotions_otter_installed",!Boolean(f("themeisle_sdk_promotions_otter_installed"))),await l(window.themeisleSDKPromotions.otterActivationUrl),m(!1),h("installed")},S=()=>"installed"===p?(0,e.createElement)("p",null,(0,e.createElement)("strong",null,"Awesome! Refresh the page to see Otter Blocks in action.")):(0,e.createElement)(o.Button,{variant:"secondary",onClick:k,isBusy:s,style:c.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,e.useEffect)((()=>{w&&P()}),[w]),w?(0,e.createElement)(n,i):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n,i),(0,e.createElement)(t.InspectorControls,null,Object.keys(d).map((t=>{if(t===window.themeisleSDKPromotions.showPromotion){const n=d[t];return(0,e.createElement)(o.PanelBody,{key:t,title:n.title,initialOpen:!1},(0,e.createElement)("p",null,n.description),(0,e.createElement)(S,null),(0,e.createElement)("img",{style:c.image,src:window.themeisleSDKPromotions.assets+n.image}),(0,e.createElement)(u,{onClick:()=>g(!0)}))}}))))}return(0,e.createElement)(n,i)}),"withInspectorControl");(0,i.select)("core/edit-site")||(0,s.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",p);var h=window.wp.plugins,w=window.wp.editPost;function g(t){let{stacked:n=!1,noImage:i=!1,type:s,onDismiss:m,onSuccess:c,initialStatus:d=null}=t;const{assets:u,title:p,email:h,option:w,optionKey:g,optimoleActivationUrl:f,optimoleApi:E,optimoleDash:y,nonce:k}=window.themeisleSDKPromotions,[S,P]=(0,e.useState)(!1),[v,b]=(0,e.useState)(h||""),[D,B]=(0,e.useState)(!1),[O,N]=(0,e.useState)(d),[_,K]=r(),A=async()=>{B(!0);const e={...w};e[s]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await K(g,JSON.stringify(e)),m&&m()},C=()=>{P(!S)},x=e=>{b(e.target.value)},I=async e=>{e.preventDefault(),N("installing"),await a("optimole-wp"),N("activating"),await l(f),K("themeisle_sdk_promotions_optimole_installed",!Boolean(_("themeisle_sdk_promotions_optimole_installed"))),N("connecting");try{await fetch(E,{method:"POST",headers:{"X-WP-Nonce":k,"Content-Type":"application/json"},body:JSON.stringify({email:v})}),c&&c(),N("done")}catch(e){N("done")}};if(D)return null;const j=()=>"done"===O?(0,e.createElement)("div",{className:"done"},(0,e.createElement)("p",null,"Awesome! You are all set!"),(0,e.createElement)(o.Button,{icon:"external",isPrimary:!0,href:y,target:"_blank"},"Go to Optimole dashboard")):O?(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===O&&"Installing","activating"===O&&"Activating","connecting"===O&&"Connecting to API","…")):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,"Enter your email address to create & connect your account"),(0,e.createElement)("form",{onSubmit:I},(0,e.createElement)("input",{defaultValue:v,type:"email",onChange:x,placeholder:"Email address"}),(0,e.createElement)(o.Button,{isPrimary:!0,type:"submit"},"Start using Optimole"))),F=()=>(0,e.createElement)(o.Button,{disabled:O&&"done"!==O,onClick:A,isLink:!0,className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice."));return n?(0,e.createElement)("div",{className:"ti-om-stack-wrap"},(0,e.createElement)("div",{className:"om-stack-notice"},F(),(0,e.createElement)("img",{src:u+"/optimole-logo.svg",alt:"Optimole logo"}),(0,e.createElement)("h2",null,"Get more with Optimole"),(0,e.createElement)("p",null,"om-editor"===s||"om-image-block"===s?"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!"),!S&&"done"!==O&&(0,e.createElement)(o.Button,{isPrimary:!0,onClick:C,className:"cta"},"Get Started Free"),(S||"done"===O)&&j(),(0,e.createElement)("i",null,p))):(0,e.createElement)(e.Fragment,null,F(),(0,e.createElement)("div",{className:"content"},!i&&(0,e.createElement)("img",{src:u+"/optimole-logo.svg",alt:"Optimole logo"}),(0,e.createElement)("div",null,(0,e.createElement)("p",null,p),(0,e.createElement)("p",{className:"description"},"om-media"===s?"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."),!S&&(0,e.createElement)("div",{className:"actions"},(0,e.createElement)(o.Button,{isPrimary:!0,onClick:C},"Get Started Free"),(0,e.createElement)(o.Button,{isLink:!0,target:"_blank",href:"https://wordpress.org/plugins/optimole-wp"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null,"Learn more"))),S&&(0,e.createElement)("div",{className:"form-wrap"},j()))))}const f=()=>{const[t,o]=(0,e.useState)(!0),{getBlocks:n}=(0,i.useSelect)((e=>{const{getBlocks:t}=e("core/block-editor");return{getBlocks:t}}));var s;if((s=n(),"core/image",s.reduce(m,[]).filter((e=>"core/image"===e.name))).length<2)return null;const r="ti-sdk-optimole-post-publish "+(t?"":"hidden");return(0,e.createElement)(w.PluginPostPublishPanel,{className:r},(0,e.createElement)(g,{stacked:!0,type:"om-editor",onDismiss:()=>{o(!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 t=document.querySelector("#ti-optml-notice");t&&(0,e.render)((0,e.createElement)(g,{type:"om-media",onDismiss:()=>{t.style.opacity=0}}),t)}runImageBlockPromo(){if(window.themeisleSDKPromotions.option["om-image-block"])return;let o=!0,i=null;const r=(0,n.createHigherOrderComponent)((n=>s=>"core/image"===s.name&&o?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n,s),(0,e.createElement)(t.InspectorControls,null,(0,e.createElement)(g,{stacked:!0,type:"om-image-block",initialStatus:i,onDismiss:()=>{o=!1},onSuccess:()=>{i="done"}}))):(0,e.createElement)(n,s)),"withImagePromo");(0,s.addFilter)("editor.BlockEdit","optimole-promo/image-promo",r,99)}runEditorPromo(){window.themeisleSDKPromotions.option["om-editor"]||(0,h.registerPlugin)("optimole-promo",{render:f})}runElementorPromo(){if(!window.elementor)return;const t=this;elementor.on("preview:loaded",(()=>{elementor.panel.currentView.on("set:page:editor",(o=>{t.domRef&&(0,e.unmountComponentAtNode)(t.domRef),o.activeSection&&"section_image"===o.activeSection&&t.runElementorActions(t)}))}))}addAttachmentPromo(){if(this.domRef&&(0,e.unmountComponentAtNode)(this.domRef),window.themeisleSDKPromotions.option["om-attachment"])return;const t=document.querySelector("#ti-optml-notice-helper");t&&(this.domRef=t,(0,e.render)((0,e.createElement)("div",{className:"notice notice-info ti-sdk-om-notice",style:{margin:0}},(0,e.createElement)(g,{noImage:!0,type:"om-attachment",onDismiss:()=>{t.style.opacity=0}})),t))}removeAttachmentPromo(){const t=document.querySelector("#ti-optml-notice-helper");t&&(0,e.unmountComponentAtNode)(t)}runElementorActions(t){if(window.themeisleSDKPromotions.option["om-elementor"])return;const o=document.querySelector("#elementor-panel__editor__help"),n=document.createElement("div");n.id="ti-optml-notice",t.domRef=n,o&&(o.parentNode.insertBefore(n,o),(0,e.render)((0,e.createElement)(g,{stacked:!0,type:"om-elementor",onDismiss:()=>{n.style.opacity=0}}),n))}runAll(){this.runAttachmentPromo(),this.runMediaPromo(),this.runEditorPromo(),this.runImageBlockPromo(),this.runElementorPromo()}};const E=t=>{let{onDismiss:n=(()=>{})}=t;const[i,s]=(0,e.useState)(""),[m,c]=r();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.Button,{disabled:"installing"===i,onClick:async()=>{const e={...window.themeisleSDKPromotions.option};e["rop-posts"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await c(window.themeisleSDKPromotions.optionKey,JSON.stringify(e)),n&&n()},variant:"link",className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice.")),(0,e.createElement)("p",null,"Boost your content's reach effortlessly! Introducing ",(0,e.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,e.createElement)("div",{className:"rop-notice-actions"},"installed"!==i?(0,e.createElement)(o.Button,{variant:"primary",isBusy:"installing"===i,onClick:async()=>{s("installing"),await a("tweet-old-post"),await l(window.themeisleSDKPromotions.ropActivationUrl),c("themeisle_sdk_promotions_rop_installed",!Boolean(m("themeisle_sdk_promotions_rop_installed"))),s("installed")}},"Install & Activate"):(0,e.createElement)(o.Button,{variant:"primary",href:window.themeisleSDKPromotions.ropDash},"Visit Dashboard"),(0,e.createElement)(o.Button,{variant:"link",target:"_blank",href:"https://wordpress.org/plugins/tweet-old-post/"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.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 t=document.querySelector("#ti-rop-notice");t&&(0,e.render)((0,e.createElement)(E,{onDismiss:()=>{t.style.display="none"}}),t)}};const y=t=>{let{onDismiss:n=(()=>{})}=t;const[i,s]=r(),{neveFSEMoreUrl:a}=window.themeisleSDKPromotions;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.Button,{onClick:async()=>{const e={...window.themeisleSDKPromotions.option};e["neve-fse-themes-popular"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await s(window.themeisleSDKPromotions.optionKey,JSON.stringify(e)),n&&n()},className:"notice-dismiss"},(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice.")),(0,e.createElement)("p",null,"Meet ",(0,e.createElement)("b",null,"Neve FSE")," from the makers of ",window.themeisleSDKPromotions.product,". A theme that makes full site editing on WordPress straightforward and user-friendly."),(0,e.createElement)("div",{className:"neve-fse-notice-actions"},(0,e.createElement)(o.Button,{variant:"link",target:"_blank",href:a},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.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["neve-fse-themes-popular"])return;const t=document.querySelector("#ti-neve-fse-notice");t&&(0,e.render)((0,e.createElement)(y,{onDismiss:()=>{t.style.display="none"}}),t)}}}},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=function(t,o,i,s){if(!o){var r=1/0;for(c=0;c=s)&&Object.keys(n.O).every((function(e){return 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.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={826:0,431:0};n.O.j=function(t){return 0===e[t]};var t=function(t,o){var i,s,r=o[0],a=o[1],l=o[2],m=0;if(r.some((function(t){return 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);m{"use strict";var e,t={165:()=>{const e=window.wp.element,t=window.wp.blockEditor,o=window.wp.components,n=window.wp.compose,i=window.wp.data,s=window.wp.hooks,r=()=>{const{createNotice:t}=(0,i.dispatch)("core/notices"),[o,n]=(0,e.useState)({}),[s,r]=(0,e.useState)("loading");return(0,i.useSelect)((e=>{if(Object.keys(o).length)return;const{getEntityRecord:t}=e("core"),i=t("root","site");i&&(r("loaded"),n(i))}),[]),[e=>null==o?void 0:o[e],async function(e,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Settings saved.";const s={[e]:o};try{const e=await fetch("/wp-json/wp/v2/settings",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpApiSettings.nonce},body:JSON.stringify(s)});e.ok||(r("error"),t("error","Could not save the settings.",{isDismissible:!0,type:"snackbar"}));const o=await e.json();r("loaded"),t("success",i,{isDismissible:!0,type:"snackbar"}),n(o)}catch(e){console.error("Error updating option:",e)}},s]},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((o=>{wp.updates.ajax(!0===t?"install-theme":"install-plugin",{slug:e,success:()=>{o({success:!0})},error:e=>{o({success:!1,code:e.errorCode})}})}))},a=e=>new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))})),m=(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(m,e)):e},c={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"}}},d={"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"}},p=t=>{let{onClick:n}=t;return(0,e.createElement)("div",{style:c.skip.container},(0,e.createElement)(o.Button,{style:c.skip.button,variant:"tertiary",onClick:n},"Skip for now"),(0,e.createElement)("span",{style:c.skip.poweredby},"Recommended by ",window.themeisleSDKPromotions.product))},u=(0,n.createHigherOrderComponent)((n=>i=>{if(i.isSelected&&Boolean(window.themeisleSDKPromotions.showPromotion)){const[s,m]=(0,e.useState)(!1),[u,h]=(0,e.useState)("default"),[w,g]=(0,e.useState)(!1),[E,k,y]=r(),f=async()=>{m(!0),await l("otter-blocks"),k("themeisle_sdk_promotions_otter_installed",!Boolean(E("themeisle_sdk_promotions_otter_installed"))),await a(window.themeisleSDKPromotions.otterActivationUrl),m(!1),h("installed")},P=()=>"installed"===u?(0,e.createElement)("p",null,(0,e.createElement)("strong",null,"Awesome! Refresh the page to see Otter Blocks in action.")):(0,e.createElement)(o.Button,{variant:"secondary",onClick:f,isBusy:s,style:c.button},"Install & Activate Otter Blocks"),S=()=>{const e={...window.themeisleSDKPromotions.option};e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,k("themeisle_sdk_promotions",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1};return(0,e.useEffect)((()=>{w&&S()}),[w]),w?(0,e.createElement)(n,i):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n,i),(0,e.createElement)(t.InspectorControls,null,Object.keys(d).map((t=>{if(t===window.themeisleSDKPromotions.showPromotion){const n=d[t];return(0,e.createElement)(o.PanelBody,{key:t,title:n.title,initialOpen:!1},(0,e.createElement)("p",null,n.description),(0,e.createElement)(P,null),(0,e.createElement)("img",{style:c.image,src:window.themeisleSDKPromotions.assets+n.image}),(0,e.createElement)(p,{onClick:()=>g(!0)}))}}))))}return(0,e.createElement)(n,i)}),"withInspectorControl");(0,i.select)("core/edit-site")||(0,s.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",u);const h=window.wp.plugins,w=window.wp.editPost;function g(t){let{stacked:n=!1,noImage:i=!1,type:s,onDismiss:m,onSuccess:c,initialStatus:d=null}=t;const{assets:p,title:u,email:h,option:w,optionKey:g,labels:E,optimoleActivationUrl:k,optimoleApi:y,optimoleDash:f,nonce:P}=window.themeisleSDKPromotions,[S,v]=(0,e.useState)(!1),[b,D]=(0,e.useState)(h||""),[B,_]=(0,e.useState)(!1),[N,K]=(0,e.useState)(d),[C,O]=r(),A=async()=>{_(!0);const e={...w};e[s]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await O(g,JSON.stringify(e)),m&&m()},x=()=>{v(!S)},j=e=>{D(e.target.value)},I=async e=>{e.preventDefault(),K("installing"),await l("optimole-wp"),K("activating"),await a(k),O("themeisle_sdk_promotions_optimole_installed",!Boolean(C("themeisle_sdk_promotions_optimole_installed"))),K("connecting");try{await fetch(y,{method:"POST",headers:{"X-WP-Nonce":P,"Content-Type":"application/json"},body:JSON.stringify({email:b})}),c&&c(),K("done")}catch(e){K("done")}};if(B)return null;const R=()=>"done"===N?(0,e.createElement)("div",{className:"done"},(0,e.createElement)("p",null," ",E.optimole.all_set),(0,e.createElement)(o.Button,{icon:"external",isPrimary:!0,href:f,target:"_blank"},E.optimole.gotodash)):N?(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===N&&E.optimole.installing,"activating"===N&&E.optimole.activating,"connecting"===N&&E.optimole.connecting,"…")):(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",null,"Enter your email address to create & connect your account"),(0,e.createElement)("form",{onSubmit:I},(0,e.createElement)("input",{defaultValue:b,type:"email",onChange:j,placeholder:E.optimole.email_placeholder}),(0,e.createElement)(o.Button,{isPrimary:!0,type:"submit"},E.optimole.start_cta))),T=()=>(0,e.createElement)(o.Button,{disabled:N&&"done"!==N,onClick:A,isLink:!0,className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},E.optimole.dismisscta));return n?(0,e.createElement)("div",{className:"ti-om-stack-wrap"},(0,e.createElement)("div",{className:"om-stack-notice"},T(),(0,e.createElement)("img",{src:p+"/optimole-logo.svg",alt:"Optimole logo"}),(0,e.createElement)("h2",null,E.optimole.heading),(0,e.createElement)("p",null,"om-editor"===s||"om-image-block"===s?E.optimole.message1:E.optimole.message2),!S&&"done"!==N&&(0,e.createElement)(o.Button,{isPrimary:!0,onClick:x,className:"cta"},E.optimole.gst),(S||"done"===N)&&R(),(0,e.createElement)("i",null,u))):(0,e.createElement)(e.Fragment,null,T(),(0,e.createElement)("div",{className:"content"},!i&&(0,e.createElement)("img",{src:p+"/optimole-logo.svg",alt:"Optimole logo"}),(0,e.createElement)("div",null,(0,e.createElement)("p",null,u),(0,e.createElement)("p",{className:"description"},"om-media"===s?E.optimole.message3:E.optimole.message4),!S&&(0,e.createElement)("div",{className:"actions"},(0,e.createElement)(o.Button,{isPrimary:!0,onClick:x},E.optimole.gst),(0,e.createElement)(o.Button,{isLink:!0,target:"_blank",href:"https://wordpress.org/plugins/optimole-wp"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null," ",E.optimole.learnmore))),S&&(0,e.createElement)("div",{className:"form-wrap"},R()))))}const E=()=>{const[t,o]=(0,e.useState)(!0),{getBlocks:n}=(0,i.useSelect)((e=>{const{getBlocks:t}=e("core/block-editor");return{getBlocks:t}}));var s;if((s=n(),"core/image",s.reduce(m,[]).filter((e=>"core/image"===e.name))).length<2)return null;const r="ti-sdk-optimole-post-publish "+(t?"":"hidden");return(0,e.createElement)(w.PluginPostPublishPanel,{className:r},(0,e.createElement)(g,{stacked:!0,type:"om-editor",onDismiss:()=>{o(!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 t=document.querySelector("#ti-optml-notice");t&&(0,e.render)((0,e.createElement)(g,{type:"om-media",onDismiss:()=>{t.style.opacity=0}}),t)}runImageBlockPromo(){if(window.themeisleSDKPromotions.option["om-image-block"])return;let o=!0,i=null;const r=(0,n.createHigherOrderComponent)((n=>s=>"core/image"===s.name&&o?(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n,s),(0,e.createElement)(t.InspectorControls,null,(0,e.createElement)(g,{stacked:!0,type:"om-image-block",initialStatus:i,onDismiss:()=>{o=!1},onSuccess:()=>{i="done"}}))):(0,e.createElement)(n,s)),"withImagePromo");(0,s.addFilter)("editor.BlockEdit","optimole-promo/image-promo",r,99)}runEditorPromo(){window.themeisleSDKPromotions.option["om-editor"]||(0,h.registerPlugin)("optimole-promo",{render:E})}runElementorPromo(){if(!window.elementor)return;const t=this;elementor.on("preview:loaded",(()=>{elementor.panel.currentView.on("set:page:editor",(o=>{t.domRef&&(0,e.unmountComponentAtNode)(t.domRef),o.activeSection&&"section_image"===o.activeSection&&t.runElementorActions(t)}))}))}addAttachmentPromo(){if(this.domRef&&(0,e.unmountComponentAtNode)(this.domRef),window.themeisleSDKPromotions.option["om-attachment"])return;const t=document.querySelector("#ti-optml-notice-helper");t&&(this.domRef=t,(0,e.render)((0,e.createElement)("div",{className:"notice notice-info ti-sdk-om-notice",style:{margin:0}},(0,e.createElement)(g,{noImage:!0,type:"om-attachment",onDismiss:()=>{t.style.opacity=0}})),t))}removeAttachmentPromo(){const t=document.querySelector("#ti-optml-notice-helper");t&&(0,e.unmountComponentAtNode)(t)}runElementorActions(t){if(window.themeisleSDKPromotions.option["om-elementor"])return;const o=document.querySelector("#elementor-panel__editor__help"),n=document.createElement("div");n.id="ti-optml-notice",t.domRef=n,o&&(o.parentNode.insertBefore(n,o),(0,e.render)((0,e.createElement)(g,{stacked:!0,type:"om-elementor",onDismiss:()=>{n.style.opacity=0}}),n))}runAll(){this.runAttachmentPromo(),this.runMediaPromo(),this.runEditorPromo(),this.runImageBlockPromo(),this.runElementorPromo()}};const k=t=>{let{onDismiss:n=(()=>{})}=t;const[i,s]=(0,e.useState)(""),[m,c]=r();return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.Button,{disabled:"installing"===i,onClick:async()=>{const e={...window.themeisleSDKPromotions.option};e["rop-posts"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await c(window.themeisleSDKPromotions.optionKey,JSON.stringify(e)),n&&n()},variant:"link",className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice.")),(0,e.createElement)("p",null,"Boost your content's reach effortlessly! Introducing ",(0,e.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,e.createElement)("div",{className:"rop-notice-actions"},"installed"!==i?(0,e.createElement)(o.Button,{variant:"primary",isBusy:"installing"===i,onClick:async()=>{s("installing"),await l("tweet-old-post"),await a(window.themeisleSDKPromotions.ropActivationUrl),c("themeisle_sdk_promotions_rop_installed",!Boolean(m("themeisle_sdk_promotions_rop_installed"))),s("installed")}},"Install & Activate"):(0,e.createElement)(o.Button,{variant:"primary",href:window.themeisleSDKPromotions.ropDash},"Visit Dashboard"),(0,e.createElement)(o.Button,{variant:"link",target:"_blank",href:"https://wordpress.org/plugins/tweet-old-post/"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.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 t=document.querySelector("#ti-rop-notice");t&&(0,e.render)((0,e.createElement)(k,{onDismiss:()=>{t.style.display="none"}}),t)}};const y=t=>{let{onDismiss:n=(()=>{})}=t;const[i,s]=r(),{neveFSEMoreUrl:l}=window.themeisleSDKPromotions;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.Button,{onClick:async()=>{const e={...window.themeisleSDKPromotions.option};e["neve-fse-themes-popular"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await s(window.themeisleSDKPromotions.optionKey,JSON.stringify(e)),n&&n()},className:"notice-dismiss"},(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice.")),(0,e.createElement)("p",null,"Meet ",(0,e.createElement)("b",null,"Neve FSE")," from the makers of ",window.themeisleSDKPromotions.product,". A theme that makes full site editing on WordPress straightforward and user-friendly."),(0,e.createElement)("div",{className:"neve-fse-notice-actions"},(0,e.createElement)(o.Button,{variant:"link",target:"_blank",href:l},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.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["neve-fse-themes-popular"])return;const t=document.querySelector("#ti-neve-fse-notice");t&&(0,e.render)((0,e.createElement)(y,{onDismiss:()=>{t.style.display="none"}}),t)}}}},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[a])))?o.splice(a--,1):(l=!1,s0&&e[c-1][2]>s;c--)e[c]=e[c-1];e[c]=[o,i,s]},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],l=o[1],a=o[2],m=0;if(r.some((t=>0!==e[t]))){for(i in l)n.o(l,i)&&(n.m[i]=l[i]);if(a)var c=a(n)}for(t&&t(o);mn(165)));i=n.O(i)})(); \ No newline at end of file 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 cdbe0c66..84f7cac5 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.3.15'; +$themeisle_sdk_version = '3.3.20'; $themeisle_sdk_path = dirname( __FILE__ ); global $themeisle_sdk_max_version; @@ -121,6 +121,7 @@ if ( ! function_exists( 'tsdk_utmify' ) ) { $url ) ); + return apply_filters( 'tsdk_utmify_url_' . $filter_key, $utmify_url, $url ); } @@ -177,6 +178,46 @@ if ( ! function_exists( 'tsdk_lkey' ) ) { return \ThemeisleSDK\Modules\Licenser::key( $file ); } } + +if ( ! function_exists( 'tsdk_translate_link' ) ) { + + /** + * Function to translate a link based on the current language. + * + * @param string $url URL to translate. + * @param string{'path'|'query'|'domain'} $type Type of localization. Supports path, query and domain. + * @param array $available_languages Available language to choose from. + * + * @return string + */ + function tsdk_translate_link( + $url, $type = 'path', $available_languages = [ + 'de_DE' => 'de', + 'de_DE_formal' => 'de', + ] + ) { + $language = get_user_locale(); + if ( ! isset( $available_languages[ $language ] ) ) { + return $url; + } + $code = $available_languages[ $language ]; + // We asume that false is based on query and add the code via query arg. + if ( $type === 'query' ) { + return add_query_arg( 'lang', $code, $url ); + } + + $parsed_url = wp_parse_url( $url ); + // we replace the domain here based on the localized one. + if ( $type === 'domain' ) { + return $parsed_url['scheme'] . '://' . $code . ( isset( $parsed_url['path'] ) ? $parsed_url['path'] : '' ) . ( isset( $parsed_url['query'] ) ? '?' . $parsed_url['query'] : '' ) . ( isset( $parsed_url['fragment'] ) ? '#' . $parsed_url['fragment'] : '' ); + } + // default is the path based approach. + $new_path = isset( $parsed_url['path'] ) ? "/$code" . $parsed_url['path'] : "/$code"; + + return $parsed_url['scheme'] . '://' . $parsed_url['host'] . $new_path . ( isset( $parsed_url['query'] ) ? '?' . $parsed_url['query'] : '' ) . ( isset( $parsed_url['fragment'] ) ? '#' . $parsed_url['fragment'] : '' ); + + } +} if ( ! function_exists( 'tsdk_support_link' ) ) { /** diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php index 2464690d..98d4ead3 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php @@ -61,12 +61,231 @@ final class Loader { 'compatibilities', 'about_us', 'announcements', + 'featured_plugins', + ]; + /** + * Holds the labels for the modules. + * + * @var array The labels for the modules. + */ + public static $labels = [ + 'announcements' => [ + 'hurry_up' => 'Hurry up! Only %s left.', + 'sale_live' => 'Themeisle Black Friday Sale is Live!', + 'learn_more' => 'Learn more', + 'max_savings' => 'Enjoy Maximum Savings on %s', + ], + 'compatibilities' => [ + 'notice' => '%s requires a newer version of %s. Please %supdate%s %s %s to the latest version.', + 'notice2' => '%s update requires a newer version of %s. Please %supdate%s %s %s.', + 'notice_theme' => '%1$sWarning:%2$s This theme has not been tested with your current version of %1$s%3$s%2$s. Please update %3$s plugin.', + 'notice_plugin' => '%1$sWarning:%2$s This plugin has not been tested with your current version of %1$s%3$s%2$s. Please update %3$s %4$s.', + 'theme' => 'theme', + 'plugin' => 'plugin', + ], + 'dashboard_widget' => [ + 'title' => 'WordPress Guides/Tutorials', + 'popular' => 'Popular %s', + 'install' => 'Install', + 'powered' => 'Powered by %s', + ], + 'licenser' => [ + 'activate' => 'Activate', + 'invalid_msg' => 'Invalid license.', + 'error_notice' => 'ERROR: Failed to connect to the license service. Please try again later. Reason: %s', + 'error_notice2' => 'ERROR: Failed to validate license. Please try again in one minute.', + 'error_invalid' => 'ERROR: Invalid license provided.', + 'update_license' => 'Updating this theme will lose any customizations you have made. Cancel to stop, OK to update.', + 'invalid_msg' => 'Invalid license.', + 'already_active' => 'License is already active.', + 'notice_update' => '%1$s is available. %2$sCheck out what\'s%3$s new or %4$supdate now%3$s.', + 'not_active' => 'License not active.', + 'deactivate' => 'Deactivate', + 'renew_cta' => 'Renew license to update', + 'autoactivate_notice' => '%s has been successfully activated using %s license !', + 'valid' => 'Valid', + 'invalid' => 'Invalid', + 'notice' => 'Enter your license from %s purchase history in order to get %s updates', + 'expired' => 'Your %s\'s License Key has expired. In order to continue receiving support and software updates you must %srenew%s your license key.', + + 'inactive' => 'In order to benefit from updates and support for %s, please add your license code from your %spurchase history%s and validate it %shere%s.', + 'no_activations' => 'No more activations left for %s. You need to upgrade your plan in order to use %s on more websites. If you need assistance, please get in touch with %s staff.', + ], + 'promotions' => [ + 'recommended' => 'Recommended by %s', + 'woo' => [ + 'title' => 'More extensions from Themeisle', + 'title2' => 'Recommended extensions', + 'cta_install' => 'Install', + 'learn_more' => 'Learn More', + 'dismiss' => 'Dismiss this suggestion', + 'ppom_title' => 'Product Add-Ons', + 'ppom_desc' => 'Add extra custom fields & add-ons on your product pages, like sizes, colors & more.', + 'spark_title1' => 'Wishlist', + 'spark_title2' => 'Multi-Announcement Bars', + 'spark_title3' => 'Advanced Product Review', + 'spark_desc1' => 'Loyalize your customers by allowing them to save their favorite products.', + 'spark_desc2' => 'Add a top notification bar on your website to highlight the latest products, offers, or upcoming events.', + 'spark_desc3' => 'Enable an advanced review section, enlarging the basic review options with lots of capabilities.', + ], + 'optimole' => [ + 'all_set' => 'Awesome! You are all set!', + 'gotodash' => 'Go to Optimole dashboard', + 'installing' => 'Installing', + 'activating' => 'Activating', + 'connecting' => 'Connecting to API', + 'start_cta' => 'Start using Optimole', + 'dismisscta' => 'Dismiss this notice.', + 'gst' => 'Get Started Free', + 'heading' => 'Get more with Optimole', + 'learnmore' => 'Learn more', + 'message1' => 'Increase this page speed and SEO ranking by optimizing images with Optimole.', + 'message3' => 'Save your server space by storing images to Optimole and deliver them optimized from 400 locations around the globe. Unlimited images, Unlimited traffic.', + 'message4' => 'This image looks to be too large and would affect your site speed, we recommend you to install Optimole to optimize your images.', + 'message2' => 'Leverage Optimole\'s full integration with Elementor to automatically lazyload, resize, compress to AVIF/WebP and deliver from 400 locations around the globe!', + 'email_placeholder' => 'Email address', + ], + ], + 'welcome' => [ + 'ctan' => 'No, thanks.', + 'ctay' => 'Upgrade Now!', + 'message' => '

You\'ve been using {product} for 7 days now and we appreciate your loyalty! We also want to make sure you\'re getting the most out of our product. That\'s why we\'re offering you a special deal - upgrade to {pro_product} in the next 5 days and receive a discount of up to 30%. Upgrade now and unlock all the amazing features of {pro_product}!

', + ], + 'uninstall' => [ + 'heading_plugin' => 'What\'s wrong?', + 'heading_theme' => 'What does not work for you in {theme}?', + 'submit' => 'Submit', + 'cta_info' => 'What info do we collect?', + 'button_submit' => 'Submit & Deactivate', + 'button_cancel' => 'Skip & Deactivate', + 'disclosure' => [ + 'title' => 'Below is a detailed view of all data that Themeisle will receive if you fill in this survey. No email address or IP addresses are transmitted after you submit the survey.', + 'version' => '%s %s version %s %s %s %s', + 'website' => '%sCurrent website:%s %s %s %s', + 'usage' => '%sUsage time:%s %s %s%s', + 'reason' => '%s Uninstall reason %s %s Selected reason from the above survey %s ', + ], + + 'options' => [ + 'id3' => [ + 'title' => 'I found a better plugin', + 'placeholder' => 'What\'s the plugin\'s name?', + ], + 'id4' => [ + + 'title' => 'I could not get the plugin to work', + 'placeholder' => 'What problem are you experiencing?', + ], + 'id5' => [ + + 'title' => 'I no longer need the plugin', + 'placeholder' => 'If you could improve one thing about our product, what would it be?', + ], + 'id6' => [ + 'title' => 'It\'s a temporary deactivation. I\'m just debugging an issue.', + 'placeholder' => 'What problem are you experiencing?', + ], + 'id7' => [ + 'title' => 'I don\'t know how to make it look like demo', + ], + 'id8' => [ + + 'placeholder' => 'What option is missing?', + 'title' => 'It lacks options', + ], + 'id9' => [ + 'title' => 'Is not working with a plugin that I need', + 'placeholder' => 'What is the name of the plugin', + ], + 'id10' => [ + 'title' => 'I want to try a new design, I don\'t like {theme} style', + ], + 'id999' => [ + 'title' => 'Other', + 'placeholder' => 'What can we do better?', + ], + ], + ], + 'review' => [ + 'notice' => '

Hey, it\'s great to see you have {product} active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers!

~ {developer}, developer of {product}

', + 'ctay' => 'Ok, I will gladly help.', + 'ctan' => 'No, thanks.', + + ], + 'rollback' => [ + 'cta' => 'Rollback to v%s', + ], + 'logger' => [ + 'notice' => 'Do you enjoy {product}? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.', + 'cta_y' => 'Sure, I would love to help.', + 'cta_n' => 'No, thanks.', + ], + 'about_us' => [ + 'title' => 'About Us', + 'heroHeader' => 'Our Story', + 'heroTextFirst' => 'Themeisle was founded in 2012 by a group of passionate developers who wanted to create beautiful and functional WordPress themes and plugins. Since then, we have grown into a team of over 20 dedicated professionals who are committed to delivering the best possible products to our customers.', + 'heroTextSecond' => 'At Themeisle, we offer a wide range of WordPress themes and plugins that are designed to meet the needs of both beginners and advanced users. Our products are feature-rich, easy to use, and are designed to help you create beautiful and functional websites.', + 'teamImageCaption' => 'Our team in WCEU2022 in Portugal', + 'newsHeading' => 'Stay connected for news & updates!', + 'emailPlaceholder' => 'Your email address', + 'signMeUp' => 'Sign me up', + 'installNow' => 'Install Now', + 'activate' => 'Activate', + 'learnMore' => 'Learn More', + 'installed' => 'Installed', + 'notInstalled' => 'Not Installed', + 'active' => 'Active', + 'others' => [ + 'optimole_desc' => 'Optimole is an image optimization service that automatically optimizes your images and serves them to your visitors via a global CDN, making your website lighter, faster and helping you reduce your bandwidth usage.', + 'neve_desc' => 'A fast, lightweight, customizable WordPress theme offering responsive design, speed, and flexibility for various website types.', + 'landingkit_desc' => 'Turn WordPress into a landing page powerhouse with Landing Kit, map domains to pages or any other published resource.', + 'sparks_desc' => 'Extend your store functionality with 8 ultra-performant features like product comparisons, variation swatches, wishlist, and more.', + 'tpc_desc' => 'Design, save, and revisit your templates anytime with your personal vault on Templates Cloud.', + ], + 'otter-page' => [ + 'heading' => 'Build innovative layouts with Otter Blocks and Gutenberg', + 'text' => 'Otter is a lightweight, dynamic collection of page building blocks and templates for the WordPress block editor.', + 'buttons' => [ + 'install_otter_free' => "Install Otter - It's free!", + 'install_now' => 'Install Now', + 'learn_more' => 'Learn More', + ], + 'features' => [ + 'advancedTitle' => 'Advanced Features', + 'advancedDesc' => 'Add features such as Custom CSS, Animations & Visibility Conditions to all blocks.', + 'fastTitle' => 'Lightweight and Fast', + 'fastDesc' => 'Otter enhances WordPress site building experience without impacting site speed.', + 'mobileTitle' => 'Mobile-Friendly', + 'mobileDesc' => 'Each block can be tweaked to provide a consistent experience across all devices.', + ], + 'details' => [ + 's1Title' => 'A Better Page Building Experience', + 's1Text' => 'Otter can be used to build everything from a personal blog to an e-commerce site without losing the personal touch. Otter’s ease of use transforms basic blocks into expressive layouts in seconds.', + 's2Title' => 'A New Collection of Patterns', + 's2Text' => 'A New Patterns Library, containing a range of different elements in a variety of styles to help you build great pages. All of your website’s most important areas are covered: headers, testimonials, pricing tables, sections and more.', + 's3Title' => 'Advanced Blocks', + 's3Text' => 'Enhance your website’s design with powerful blocks, like the Add to Cart, Business Hours, Review Comparison, and dozens of WooCommerce blocks.', + ], + 'testimonials' => [ + 'heading' => 'Trusted by more than 300K website owners', + 'users' => [ + 'user_1' => 'Loved the collection of blocks. If you want to create nice Gutenberg Pages, this plugin will be very handy and useful.', + 'user_2' => 'I am very satisfied with Otter – a fantastic collection of blocks. And the plugin is perfectly integrated with Gutenberg and complete enough for my needs.', + 'user_3' => 'Otter Blocks work really well and I like the customization options. Easy to use and format to fit in with my site theme – and I’ve not encountered any compatibility or speed issues.', + ], + ], + ], + ], ]; /** * Initialize the sdk logic. */ public static function init() { + /** + * This filter can be used to localize the labels inside each product. + */ + self::$labels = apply_filters( 'themeisle_sdk_labels', self::$labels ); if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Loader ) ) { self::$instance = new Loader(); $modules = array_merge( self::$available_modules, apply_filters( 'themeisle_sdk_modules', [] ) ); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/About_us.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/About_us.php index 291ac38a..664c4bc8 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/About_us.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/About_us.php @@ -27,6 +27,7 @@ namespace ThemeisleSDK\Modules; use ThemeisleSDK\Common\Abstract_Module; +use ThemeisleSDK\Loader; use ThemeisleSDK\Product; // Exit if accessed directly. @@ -96,8 +97,8 @@ class About_Us extends Abstract_Module { add_submenu_page( $this->about_data['location'], - __( 'About Us', 'textdomain' ), - __( 'About Us', 'textdomain' ), + Loader::$labels['about_us']['title'], + Loader::$labels['about_us']['title'], 'manage_options', $this->get_about_page_slug(), array( $this, 'render_about_us_page' ), @@ -175,6 +176,7 @@ class About_Us extends Abstract_Module { private function get_about_localization_data() { $links = isset( $this->about_data['page_menu'] ) ? $this->about_data['page_menu'] : []; $product_pages = isset( $this->about_data['product_pages'] ) ? $this->about_data['product_pages'] : []; + return [ 'links' => $links, 'logoUrl' => $this->about_data['logo'], @@ -188,20 +190,20 @@ class About_Us extends Abstract_Module { ], 'teamImage' => $this->get_sdk_uri() . 'assets/images/team.jpg', 'strings' => [ - 'aboutUs' => __( 'About us', 'textdomain' ), - 'heroHeader' => __( 'Our Story', 'textdomain' ), - 'heroTextFirst' => __( 'Themeisle was founded in 2012 by a group of passionate developers who wanted to create beautiful and functional WordPress themes and plugins. Since then, we have grown into a team of over 20 dedicated professionals who are committed to delivering the best possible products to our customers.', 'textdomain' ), - 'heroTextSecond' => __( 'At Themeisle, we offer a wide range of WordPress themes and plugins that are designed to meet the needs of both beginners and advanced users. Our products are feature-rich, easy to use, and are designed to help you create beautiful and functional websites.', 'textdomain' ), - 'teamImageCaption' => __( 'Our team in WCEU2022 in Portugal', 'textdomain' ), - 'newsHeading' => __( 'Stay connected for news & updates!', 'textdomain' ), - 'emailPlaceholder' => __( 'Your email address', 'textdomain' ), - 'signMeUp' => __( 'Sign me up', 'textdomain' ), - 'installNow' => __( 'Install Now', 'textdomain' ), - 'activate' => __( 'Activate', 'textdomain' ), - 'learnMore' => __( 'Learn More', 'textdomain' ), - 'installed' => __( 'Installed', 'textdomain' ), - 'notInstalled' => __( 'Not Installed', 'textdomain' ), - 'active' => __( 'Active', 'textdomain' ), + 'aboutUs' => Loader::$labels['about_us']['title'], + 'heroHeader' => Loader::$labels['about_us']['heroHeader'], + 'heroTextFirst' => Loader::$labels['about_us']['heroTextFirst'], + 'heroTextSecond' => Loader::$labels['about_us']['heroTextSecond'], + 'teamImageCaption' => Loader::$labels['about_us']['teamImageCaption'], + 'newsHeading' => Loader::$labels['about_us']['newsHeading'], + 'emailPlaceholder' => Loader::$labels['about_us']['emailPlaceholder'], + 'signMeUp' => Loader::$labels['about_us']['signMeUp'], + 'installNow' => Loader::$labels['about_us']['installNow'], + 'activate' => Loader::$labels['about_us']['activate'], + 'learnMore' => Loader::$labels['about_us']['learnMore'], + 'installed' => Loader::$labels['about_us']['installed'], + 'notInstalled' => Loader::$labels['about_us']['notInstalled'], + 'active' => Loader::$labels['about_us']['active'], ], 'canInstallPlugins' => current_user_can( 'install_plugins' ), 'canActivatePlugins' => current_user_can( 'activate_plugins' ), @@ -232,50 +234,50 @@ class About_Us extends Abstract_Module { 'product' => $otter_slug, 'plugin' => $otter_plugin, 'strings' => [ - 'heading' => __( 'Build innovative layouts with Otter Blocks and Gutenberg', 'textdomain' ), - 'text' => __( 'Otter is a lightweight, dynamic collection of page building blocks and templates for the WordPress block editor.', 'textdomain' ), + 'heading' => Loader::$labels['about_us']['otter-page']['heading'], + 'text' => Loader::$labels['about_us']['otter-page']['text'], 'buttons' => [ - 'install_otter_free' => __( "Install Otter - It's free!", 'textdomain' ), - 'install_now' => __( 'Install Now', 'textdomain' ), - 'learn_more' => __( 'Learn More', 'textdomain' ), + 'install_otter_free' => Loader::$labels['about_us']['otter-page']['install_otter_free'], + 'install_now' => Loader::$labels['about_us']['otter-page']['install_now'], + 'learn_more' => Loader::$labels['about_us']['otter-page']['learn_more'], 'learn_more_link' => tsdk_utmify( 'https://themeisle.com/plugins/otter-blocks/', 'otter-page', 'about-us' ), ], 'features' => [ - 'advancedTitle' => __( 'Advanced Features', 'textdomain' ), - 'advancedDesc' => __( 'Add features such as Custom CSS, Animations & Visibility Conditions to all blocks.', 'textdomain' ), - 'fastTitle' => __( 'Lightweight and Fast', 'textdomain' ), - 'fastDesc' => __( 'Otter enhances WordPress site building experience without impacting site speed.', 'textdomain' ), - 'mobileTitle' => __( 'Mobile-Friendly', 'textdomain' ), - 'mobileDesc' => __( 'Each block can be tweaked to provide a consistent experience across all devices.', 'textdomain' ), + 'advancedTitle' => Loader::$labels['about_us']['otter-page']['features']['advancedTitle'], + 'advancedDesc' => Loader::$labels['about_us']['otter-page']['features']['advancedDesc'], + 'fastTitle' => Loader::$labels['about_us']['otter-page']['features']['fastTitle'], + 'fastDesc' => Loader::$labels['about_us']['otter-page']['features']['fastDesc'], + 'mobileTitle' => Loader::$labels['about_us']['otter-page']['features']['mobileTitle'], + 'mobileDesc' => Loader::$labels['about_us']['otter-page']['features']['mobileDesc'], ], 'details' => [ + 's1Title' => Loader::$labels['about_us']['otter-page']['details']['s1Title'], + 's1Text' => Loader::$labels['about_us']['otter-page']['details']['s1Text'], + 's2Title' => Loader::$labels['about_us']['otter-page']['details']['s2Title'], + 's2Text' => Loader::$labels['about_us']['otter-page']['details']['s2Text'], + 's3Title' => Loader::$labels['about_us']['otter-page']['details']['s3Title'], + 's3Text' => Loader::$labels['about_us']['otter-page']['details']['s3Text'], 's1Image' => $this->get_sdk_uri() . 'assets/images/otter/otter-builder.png', - 's1Title' => __( 'A Better Page Building Experience', 'textdomain' ), - 's1Text' => __( 'Otter can be used to build everything from a personal blog to an e-commerce site without losing the personal touch. Otter’s ease of use transforms basic blocks into expressive layouts in seconds.', 'textdomain' ), 's2Image' => $this->get_sdk_uri() . 'assets/images/otter/otter-patterns.png', - 's2Title' => __( 'A New Collection of Patterns', 'textdomain' ), - 's2Text' => __( 'A New Patterns Library, containing a range of different elements in a variety of styles to help you build great pages. All of your website’s most important areas are covered: headers, testimonials, pricing tables, sections and more.', 'textdomain' ), 's3Image' => $this->get_sdk_uri() . 'assets/images/otter/otter-library.png', - 's3Title' => __( 'Advanced Blocks', 'textdomain' ), - 's3Text' => __( 'Enhance your website’s design with powerful blocks, like the Add to Cart, Business Hours, Review Comparison, and dozens of WooCommerce blocks.', 'textdomain' ), ], 'testimonials' => [ - 'heading' => __( 'Trusted by more than 300K website owners', 'textdomain' ), + 'heading' => Loader::$labels['about_us']['otter-page']['testimonials']['heading'], 'users' => [ [ 'avatar' => 'https://mllj2j8xvfl0.i.optimole.com/cb:3970~373ad/w:80/h:80/q:mauto/https://themeisle.com/wp-content/uploads/2021/05/avatar-03.png', 'name' => 'Michael Burry', - 'text' => 'Loved the collection of blocks. If you want to create nice Gutenberg Pages, this plugin will be very handy and useful.', + 'text' => Loader::$labels['about_us']['otter-page']['testimonials']['users']['user_1'], ], [ 'avatar' => 'https://mllj2j8xvfl0.i.optimole.com/cb:3970~373ad/w:80/h:80/q:mauto/https://themeisle.com/wp-content/uploads/2022/04/avatar-04.png', 'name' => 'Maria Gonzales', - 'text' => 'I am very satisfied with Otter – a fantastic collection of blocks. And the plugin is perfectly integrated with Gutenberg and complete enough for my needs. ', + 'text' => Loader::$labels['about_us']['otter-page']['testimonials']['users']['user_2'], ], [ 'avatar' => 'https://mllj2j8xvfl0.i.optimole.com/cb:3970~373ad/w:80/h:80/q:mauto/https://themeisle.com/wp-content/uploads/2022/04/avatar-05.png', 'name' => 'Florian Henckel', - 'text' => 'Otter Blocks work really well and I like the customization options. Easy to use and format to fit in with my site theme – and I’ve not encountered any compatibility or speed issues.', + 'text' => Loader::$labels['about_us']['otter-page']['testimonials']['users']['user_3'], ], ], ], @@ -303,12 +305,12 @@ class About_Us extends Abstract_Module { $products = [ 'optimole-wp' => [ 'name' => 'Optimole', - 'description' => 'Optimole is an image optimization service that automatically optimizes your images and serves them to your visitors via a global CDN, making your website lighter, faster and helping you reduce your bandwidth usage.', + 'description' => Loader::$labels['about_us']['others']['optimole_desc'], ], 'neve' => [ 'skip_api' => true, 'name' => 'Neve', - 'description' => __( 'A fast, lightweight, customizable WordPress theme offering responsive design, speed, and flexibility for various website types.', 'textdomain' ), + 'description' => Loader::$labels['about_us']['others']['neve_desc'], 'icon' => $this->get_sdk_uri() . 'assets/images/neve.png', ], 'otter-blocks' => [ @@ -331,7 +333,7 @@ class About_Us extends Abstract_Module { 'skip_api' => true, 'premiumUrl' => tsdk_utmify( 'https://themeisle.com/plugins/wp-landing-kit', $this->get_about_page_slug() ), 'name' => 'WP Landing Kit', - 'description' => __( 'Turn WordPress into a landing page powerhouse with Landing Kit, map domains to pages or any other published resource.', 'textdomain' ), + 'description' => Loader::$labels['about_us']['others']['landingkit_desc'], 'icon' => $this->get_sdk_uri() . 'assets/images/wplk.png', ], 'multiple-pages-generator-by-porthas' => [ @@ -341,13 +343,13 @@ class About_Us extends Abstract_Module { 'skip_api' => true, 'premiumUrl' => tsdk_utmify( 'https://themeisle.com/plugins/sparks-for-woocommerce', $this->get_about_page_slug() ), 'name' => 'Sparks', - 'description' => __( 'Extend your store functionality with 8 ultra-performant features like product comparisons, variation swatches, wishlist, and more.', 'textdomain' ), + 'description' => Loader::$labels['about_us']['others']['sparks_desc'], 'icon' => $this->get_sdk_uri() . 'assets/images/sparks.png', 'condition' => class_exists( 'WooCommerce', false ), ], 'templates-patterns-collection' => [ 'name' => 'Templates Cloud', - 'description' => __( 'Design, save, and revisit your templates anytime with your personal vault on Templates Cloud.', 'textdomain' ), + 'description' => Loader::$labels['about_us']['others']['tpc_desc'], ], ]; diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Announcements.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Announcements.php index e75a9b9d..6e4c898b 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Announcements.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Announcements.php @@ -10,6 +10,7 @@ * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License * @since 3.3.0 */ + namespace ThemeisleSDK\Modules; use ThemeisleSDK\Common\Abstract_Module; @@ -153,7 +154,7 @@ class Announcements extends Abstract_Module { // Banners urgency text. $remaining_time = $this->get_remaining_time_for_event( $dates['end'] ); $announcements[ $announcement ]['remaining_time'] = $remaining_time; - $announcements[ $announcement ]['urgency_text'] = ! empty( $remaining_time ) ? 'Hurry up! Only ' . $remaining_time . ' left.' : ''; + $announcements[ $announcement ]['urgency_text'] = ! empty( $remaining_time ) ? sprintf( Loader::$labels['announcements']['hurry_up'], $remaining_time ) : ''; } } @@ -202,6 +203,7 @@ class Announcements extends Abstract_Module { * Get the remaining time for the event in a human readable format. * * @param string $end_date The end date for event. + * * @return string Remaining time for the event. */ public function get_remaining_time_for_event( $end_date ) { @@ -209,31 +211,8 @@ class Announcements extends Abstract_Module { return ''; } - try { - $end_date = new \DateTime( $end_date, new \DateTimeZone( 'GMT' ) ); - $current_date = new \DateTime( 'now', new \DateTimeZone( 'GMT' ) ); - $diff = $end_date->diff( $current_date ); + return human_time_diff( time(), strtotime( $end_date ) ); - if ( $diff->days > 0 ) { - return $diff->days === 1 ? $diff->format( '%a day' ) : $diff->format( '%a days' ); - } - - if ( $diff->h > 0 ) { - return $diff->h === 1 ? $diff->format( '%h hour' ) : $diff->format( '%h hours' ); - } - - if ( $diff->i > 0 ) { - return $diff->i === 1 ? $diff->format( '%i minute' ) : $diff->format( '%i minutes' ); - } - - return $diff->s === 1 ? $diff->format( '%s second' ) : $diff->format( '%s seconds' ); - } catch ( \Exception $e ) { - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { - error_log( $e->getMessage() ); // phpcs:ignore - } - } - - return ''; } /** @@ -317,21 +296,24 @@ class Announcements extends Abstract_Module { }
- +

- Themeisle Black Friday Sale is Live! - Enjoy Maximum Savings on . - Learn more + > + - + . + >

is_theme() && $screen->id === 'themes' ) { ?> - + function checkTheme() { + var theme = jQuery('.theme.active[data-slug="get_slug() ); ?>"]'); + var notice_id = 'testedupget_slug() . $product->get_slug() ); ?>'; + if (theme.length > 0 && jQuery('#' + notice_id).length === 0) { + theme.find('.theme-id-container').prepend('
', '', esc_attr( $product->get_friendly_name() ) ); ?>
'); + } + if (theme.length > 0 && jQuery('#' + notice_id + 'overlay').length === 0) { + jQuery('.theme-overlay.active .theme-author').after('

', '', esc_attr( $product->get_friendly_name() ) ); ?>

'); + } + } + }) + + is_plugin() && $screen->id === 'plugins' ) { ?> - + function checkPlugin() { + var plugin = jQuery('.plugins .active[data-slug="get_slug() ); ?>"]'); + var notice_id = 'testedupget_slug() . $product->get_slug() ); ?>'; + if (plugin.length > 0 && jQuery('#' + notice_id).length === 0) { + plugin.find('.column-description').append('
', '', esc_attr( $product->get_friendly_name() ), esc_attr( $product->is_plugin() ? Loader::$labels['compatibilities']['plugin'] : Loader::$labels['compatibilities']['theme'] ) ); ?>
'); + } + } + }) + + get_friendly_name() ), esc_attr( $requirement->get_friendly_name() ), '', '', esc_attr( $requirement->get_friendly_name() ), - esc_attr( $requirement->is_theme() ? 'theme' : 'plugin' ) + esc_attr( $requirement->is_theme() ? Loader::$labels['compatibilities']['theme'] : Loader::$labels['compatibilities']['plugin'] ) ) ); $upgrader->maintenance_mode( false ); die(); @@ -220,13 +219,13 @@ class Compatibilities extends Abstract_Module { function () use ( $product, $requirement ) { echo '

'; echo( sprintf( - '%s requires a newer version of %s. Please %supdate%s %s %s to the latest version.', + esc_html( Loader::$labels['compatibilities']['notice'] ), '' . esc_attr( $product->get_friendly_name() ) . '', '' . esc_attr( $requirement->get_friendly_name() ) . '', '', '', '' . esc_attr( $requirement->get_friendly_name() ) . '', - esc_attr( $requirement->is_theme() ? 'theme' : 'plugin' ) + esc_attr( $requirement->is_theme() ? Loader::$labels['compatibilities']['theme'] : Loader::$labels['compatibilities']['plugin'] ) ) ); echo '

'; } diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php index 89eb28ce..d55e068c 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php @@ -12,6 +12,7 @@ namespace ThemeisleSDK\Modules; use ThemeisleSDK\Common\Abstract_Module; +use ThemeisleSDK\Loader; use ThemeisleSDK\Product; // Exit if accessed directly. @@ -76,7 +77,7 @@ class Dashboard_Widget extends Abstract_Module { return; } $this->product = $product; - $this->dashboard_name = apply_filters( 'themeisle_sdk_dashboard_widget_name', 'WordPress Guides/Tutorials' ); + $this->dashboard_name = apply_filters( 'themeisle_sdk_dashboard_widget_name', Loader::$labels['dashboard_widget']['title'] ); $this->feeds = apply_filters( 'themeisle_sdk_dashboard_widget_feeds', [ @@ -280,7 +281,7 @@ class Dashboard_Widget extends Abstract_Module { ?> force_feed( false ); + return; } if ( is_array( $url ) ) { foreach ( $url as $feed_url ) { if ( in_array( $feed_url, $sdk_feeds, true ) ) { $feed->force_feed( false ); + return; } } diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Featured_plugins.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Featured_plugins.php new file mode 100644 index 00000000..bf3315c1 --- /dev/null +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Featured_plugins.php @@ -0,0 +1,167 @@ +is_from_partner( $product ) ) { + return false; + } + + $slug = $product->get_slug(); + // only load for products that contain "pro" in the slug. + if ( strpos( $slug, 'pro' ) === false ) { + return false; + } + + return ! apply_filters( 'themeisle_sdk_disable_featured_plugins', false ); + } + + /** + * Load the module for the selected product. + * + * @param Product $product Product data. + * + * @return void + */ + public function load( $product ) { + if ( ! current_user_can( 'install_plugins' ) ) { + return; + } + + // bail if we already registered a filter for the plugin API. + if ( apply_filters( 'themeisle_sdk_plugin_api_filter_registered', false ) ) { + return; + } + add_filter( 'themeisle_sdk_plugin_api_filter_registered', '__return_true' ); + + add_filter( 'plugins_api_result', [ $this, 'filter_plugin_api_results' ], 10, 3 ); + } + + /** + * Filter the plugin API results to include the featured plugins. + * + * @param object $res The result object. + * @param string $action The type of information being requested from the Plugin Install API. + * @param object $args Plugin API arguments. + * + * @return object + */ + public function filter_plugin_api_results( $res, $action, $args ) { + + if ( 'query_plugins' !== $action ) { + return $res; + } + + if ( ! isset( $args->browse ) || $args->browse !== 'featured' ) { + return $res; + } + + $featured = $this->query_plugins_by_author( $args ); + + $plugins = array_merge( $featured, (array) $res->plugins ); + $plugins = array_slice( $plugins, 0, $res->info['results'] ); + $res->plugins = $plugins; + + return $res; + } + + /** + * Query plugins by author. + * + * @param object $args The arguments for the query. + * + * @return array + */ + private function query_plugins_by_author( $args ) { + $featured = []; + + $optimole_filter_slugs = apply_filters( 'themeisle_sdk_optimole_filter_slugs', [ 'optimole-wp' ] ); + $filtered_from_optimole = $this->get_plugins_filtered_from_author( $args, $optimole_filter_slugs, 'Optimole' ); + $featured = array_merge( $featured, $filtered_from_optimole ); + + $themeisle_filter_slugs = apply_filters( 'themeisle_sdk_themeisle_filter_slugs', [ 'otter-blocks' ] ); + $filtered_from_themeisle = $this->get_plugins_filtered_from_author( $args, $themeisle_filter_slugs ); + $featured = array_merge( $featured, $filtered_from_themeisle ); + + return $featured; + } + + /** + * Get plugins filtered from an author. + * + * @param object $args The arguments for the query. + * @param array $filter_slugs The slugs to filter. + * @param string $author The author to filter. + * + * @return array + */ + private function get_plugins_filtered_from_author( $args, $filter_slugs = [], $author = 'Themeisle' ) { + + $cached = get_transient( $this->transient_key . $author ); + if ( $cached ) { + return $cached; + } + + $new_args = [ + 'page' => 1, + 'per_page' => 36, + 'locale' => get_user_locale(), + 'author' => $author, + 'wp_version' => isset( $args->wp_version ) ? $args->wp_version : get_bloginfo( 'version' ), + ]; + + $api = plugins_api( 'query_plugins', $new_args ); + if ( is_wp_error( $api ) ) { + return []; + } + + $filtered = array_filter( + $api->plugins, + function( $plugin ) use ( $filter_slugs ) { + $array_plugin = (array) $plugin; + return in_array( $array_plugin['slug'], $filter_slugs ); + } + ); + + set_transient( $this->transient_key . $author, $filtered, 12 * HOUR_IN_SECONDS ); + + return $filtered; + } +} diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php index d5ed07d4..3c1a40f3 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php @@ -138,11 +138,11 @@ class Licenser extends Abstract_Module { $status = $this->get_license_status(); $value = $this->license_key; - $activate_string = apply_filters( $this->product->get_key() . '_lc_activate_string', 'Activate' ); - $deactivate_string = apply_filters( $this->product->get_key() . '_lc_deactivate_string', 'Deactivate' ); - $valid_string = apply_filters( $this->product->get_key() . '_lc_valid_string', 'Valid' ); - $invalid_string = apply_filters( $this->product->get_key() . '_lc_invalid_string', 'Invalid' ); - $license_message = apply_filters( $this->product->get_key() . '_lc_license_message', 'Enter your license from %s purchase history in order to get %s updates' ); + $activate_string = apply_filters( $this->product->get_key() . '_lc_activate_string', Loader::$labels['licenser']['activate'] ); + $deactivate_string = apply_filters( $this->product->get_key() . '_lc_deactivate_string', Loader::$labels['licenser']['deactivateactivate'] ); + $valid_string = apply_filters( $this->product->get_key() . '_lc_valid_string', Loader::$labels['licenser']['valid'] ); + $invalid_string = apply_filters( $this->product->get_key() . '_lc_invalid_string', Loader::$labels['licenser']['invalid'] ); + $license_message = apply_filters( $this->product->get_key() . '_lc_license_message', Loader::$labels['licenser']['notice'] ); $error_message = $this->get_error(); ?>