updated plugin Menu Icons version 0.13.6

This commit is contained in:
KawaiiPunk 2023-07-19 21:09:05 +00:00 committed by Gitium
parent 9a42dc17d2
commit 42e98ecd14
43 changed files with 1227 additions and 278 deletions

View File

@ -1,3 +1,7 @@
##### [Version 0.13.6](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.5...v0.13.6) (2023-07-07)
- Updated composer dependencies to address warning in the widgets section
##### [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

View File

@ -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.5
* Version: 0.13.6
* 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.5';
const VERSION = '0.13.6';
/**
* Holds plugin data

View File

@ -225,6 +225,13 @@ Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/).
== Changelog ==
##### [Version 0.13.6](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.5...v0.13.6) (2023-07-07)
- Updated composer dependencies to address warning in the widgets section
##### [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

View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitbf1297da02d6475c76ee8fa5bb3a7c73::getLoader();
return ComposerAutoloaderInit98ab46cfa4e7ff3e56643c5deb70943f::getLoader();

View File

@ -1,3 +1,7 @@
##### [Version 1.0.5](https://github.com/Codeinwp/gutenberg-menu-icons/compare/v1.0.4...v1.0.5) (2021-06-23)
- Redo with @wp/scripts
##### [Version 1.0.4](https://github.com/Codeinwp/gutenberg-menu-icons/compare/v1.0.3...v1.0.4) (2020-05-17)
- Make it compatible with the latest version of Gutenberg

View File

@ -1,2 +0,0 @@
.wp-block-themeisle-blocks-menu-icon-picker-popover:not(.is-mobile).is-bottom{z-index:9999999}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content{overflow-y:hidden}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-menu-group{padding:7px}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items{max-height:300px;overflow-y:auto;display:grid;grid-template-columns:auto auto auto auto;grid-column-gap:10px;grid-row-gap:10px}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button{display:flex;justify-content:center}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button:hover{box-shadow:inset 0 0 0 1px #007cba}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button.is-selected{background:#f8f9f9}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button.is-selected i{color:#007cba}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button i.remove-icon{color:#d92222}.fas.wp-block-navigation-link,.fab.wp-block-navigation-link,.far.wp-block-navigation-link{display:flex;align-items:center;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit;line-height:inherit}.fas.wp-block-navigation-link:before,.fab.wp-block-navigation-link:before,.far.wp-block-navigation-link:before{margin-right:5px}.fas.wp-block-navigation-link .wp-block-navigation-link__content,.fab.wp-block-navigation-link .wp-block-navigation-link__content,.far.wp-block-navigation-link .wp-block-navigation-link__content{display:flex;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit}.fas.wp-block-navigation-link .wp-block-navigation-link__content:before,.fab.wp-block-navigation-link .wp-block-navigation-link__content:before,.far.wp-block-navigation-link .wp-block-navigation-link__content:before{margin-right:5px}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '0168e17510d72c2dc5a2d893e33e5086');

View File

@ -1 +1 @@
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=3)}([,,,function(e,n,t){"use strict";t.r(n);t(4);var r=document.querySelectorAll(".wp-block-navigation-link");0<r.length&&Array.from(r).forEach((function(e){var n=e.querySelector(".wp-block-navigation-link__content"),t=Array.from(e.classList),r=t.find((function(e){return e.includes("fab")||e.includes("far")||e.includes("fas")}))||"fas",o=t.find((function(e){return e.includes("fa-")}));o&&(e.classList.remove(r,o),n.classList.add(r,o))}))},function(e,n,t){}]);
(window.webpackJsonp_themeisle_gutenberg_menu_icons=window.webpackJsonp_themeisle_gutenberg_menu_icons||[]).push([[2],{9:function(e,n,t){}}]),function(e){function n(n){for(var r,u,c=n[0],l=n[1],s=n[2],f=0,p=[];f<c.length;f++)u=c[f],Object.prototype.hasOwnProperty.call(o,u)&&o[u]&&p.push(o[u][0]),o[u]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(e[r]=l[r]);for(a&&a(n);p.length;)p.shift()();return i.push.apply(i,s||[]),t()}function t(){for(var e,n=0;n<i.length;n++){for(var t=i[n],r=!0,c=1;c<t.length;c++){var l=t[c];0!==o[l]&&(r=!1)}r&&(i.splice(n--,1),e=u(u.s=t[0]))}return e}var r={},o={0:0},i=[];function u(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,u),t.l=!0,t.exports}u.m=e,u.c=r,u.d=function(e,n,t){u.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(e,n){if(1&n&&(e=u(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(u.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)u.d(t,r,function(n){return e[n]}.bind(null,r));return t},u.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(n,"a",n),n},u.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},u.p="";var c=window.webpackJsonp_themeisle_gutenberg_menu_icons=window.webpackJsonp_themeisle_gutenberg_menu_icons||[],l=c.push.bind(c);c.push=n,c=c.slice();for(var s=0;s<c.length;s++)n(c[s]);var a=l;i.push([8,2]),t()}({8:function(e,n,t){"use strict";t.r(n),t(9);const r=document.querySelectorAll(".wp-block-navigation-link");0<r.length&&Array.from(r).forEach(e=>{const n=e.querySelector(".wp-block-navigation-link__content");let t=Array.from(e.classList);const r=t.find(e=>e.includes("fab")||e.includes("far")||e.includes("fas"))||"fas",o=t.find(e=>e.includes("fa-"));o&&(e.classList.remove(r,o),n.classList.add(r,o))})}});

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '2c1513ca91e5dc3cbe8c5cbdd71ea894');

View File

@ -0,0 +1 @@
.wp-block-themeisle-blocks-menu-icon-picker-popover:not(.is-mobile).is-bottom{z-index:9999999}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content{overflow-y:hidden}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-menu-group{padding:7px}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items{max-height:300px;overflow-y:auto;display:-ms-grid;display:grid;-ms-grid-columns:auto auto auto auto;grid-template-columns:auto auto auto auto;grid-column-gap:10px;grid-row-gap:10px}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button{display:flex;justify-content:center}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button:hover{box-shadow:inset 0 0 0 1px #007cba}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button.is-selected{background:#f8f9f9}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button.is-selected i{color:#007cba}.wp-block-themeisle-blocks-menu-icon-picker-popover .components-popover__content .components-popover__items .components-button i.remove-icon{color:#d92222}.fas.wp-block-navigation-link,.fab.wp-block-navigation-link,.far.wp-block-navigation-link{display:flex;align-items:center;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit;line-height:inherit}.fas.wp-block-navigation-link:before,.fab.wp-block-navigation-link:before,.far.wp-block-navigation-link:before{margin-right:5px}.fas.wp-block-navigation-link .wp-block-navigation-link__content,.fab.wp-block-navigation-link .wp-block-navigation-link__content,.far.wp-block-navigation-link .wp-block-navigation-link__content{display:flex;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit}.fas.wp-block-navigation-link .wp-block-navigation-link__content:before,.fab.wp-block-navigation-link .wp-block-navigation-link__content:before,.far.wp-block-navigation-link .wp-block-navigation-link__content:before{margin-right:5px}

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1 @@
.fas.wp-block-navigation-link:before,.fab.wp-block-navigation-link:before,.far.wp-block-navigation-link:before{display:none}.fas.wp-block-navigation-link__content,.fab.wp-block-navigation-link__content,.far.wp-block-navigation-link__content{font-family:inherit;display:flex;align-items:center;font-weight:inherit;-moz-osx-font-smoothing:inherit;-webkit-font-smoothing:inherit;line-height:inherit}.fas.wp-block-navigation-link__content:before,.fab.wp-block-navigation-link__content:before,.far.wp-block-navigation-link__content:before{font-family:"Font Awesome 5 Free";margin-right:5px}.fab.wp-block-navigation-link__content:before,.far.wp-block-navigation-link__content:before{font-weight:400}.fas.wp-block-navigation-link__content:before{font-weight:900}.fab.wp-block-navigation-link__content:before{font-family:"Font Awesome 5 Brands"}

View File

@ -51,35 +51,31 @@ class GutenbergMenuIcons {
return;
}
if ( THEMEISLE_GUTENBERG_MENU_ICONS_DEV ) {
$version = time();
} else {
$version = THEMEISLE_GUTENBERG_MENU_ICONS_VERSION;
}
$asset_file = include plugin_dir_path( __FILE__ ) . 'build/index.asset.php';
wp_enqueue_script(
'themeisle-gutenberg-menu-icons',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/editor.js',
array( 'wp-i18n', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-editor', 'wp-element', 'wp-hooks' ),
$version,
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/index.js',
$asset_file['dependencies'],
$asset_file['version'],
true
);
wp_enqueue_style(
'themeisle-gutenberg-menu-icons',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/editor.css',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/index.css',
array( 'font-awesome-5' ),
$version
$asset_file['version']
);
wp_enqueue_style(
'themeisle-gutenberg-menu-icons-font-awesome',
plugins_url( '/', __FILE__ ) . 'assets/css/font-awesome.min.css',
array( 'font-awesome-5' ),
$version
$asset_file['version']
);
wp_set_script_translations( 'themeisle-gutenberg-menu-icons', 'textdomain' );
wp_set_script_translations( 'themeisle-gutenberg-menu-icons', 'otter-blocks' );
}
/**
@ -93,29 +89,25 @@ class GutenbergMenuIcons {
return;
}
if ( THEMEISLE_GUTENBERG_MENU_ICONS_DEV ) {
$version = time();
} else {
$version = THEMEISLE_GUTENBERG_MENU_ICONS_VERSION;
}
if ( is_admin() ) {
return;
}
$asset_file = include plugin_dir_path( __FILE__ ) . 'build/frontend.asset.php';
wp_enqueue_script(
'themeisle-gutenberg-menu-icons-frontend',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/frontend.js',
array(),
$version,
$asset_file['dependencies'],
$asset_file['version'],
true
);
wp_enqueue_style(
'themeisle-gutenberg-menu-icons-frontend',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/frontend.css',
plugin_dir_url( $this->get_dir() ) . $this->slug . '/build/style-frontend.css',
array( 'font-awesome-5' ),
$version
$asset_file['version']
);
}
@ -160,7 +152,7 @@ class GutenbergMenuIcons {
*/
public function __clone() {
// Cloning instances of the class is forbidden.
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'otter-blocks' ), '1.0.0' );
}
/**
@ -172,6 +164,6 @@ class GutenbergMenuIcons {
*/
public function __wakeup() {
// Unserializing instances of the class is forbidden.
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'otter-blocks' ), '1.0.0' );
}
}

View File

@ -8,8 +8,7 @@
* @since 1.0.0
*/
define( 'THEMEISLE_GUTENBERG_MENU_ICONS_VERSION', '1.0.4' );
define( 'THEMEISLE_GUTENBERG_MENU_ICONS_DEV', false );
define( 'THEMEISLE_GUTENBERG_MENU_ICONS_VERSION', '1.0.5' );
if ( function_exists( 'add_action' ) ) {
add_action(

View File

@ -1,3 +1,17 @@
##### [Version 3.3.1](https://github.com/Codeinwp/themeisle-sdk/compare/v3.3.0...v3.3.1) (2023-06-21)
- Fix Neve FSE promo typo
#### [Version 3.3.0](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.41...v3.3.0) (2023-05-30)
- Adds About Page Integration
- Adds promos for Neve FSE, Sparks & PPOM
##### [Version 3.2.41](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.40...v3.2.41) (2023-05-10)
- Delay product recommendation mentions
- Allow upselling notifications for new users
##### [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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1 @@
<?php return array('dependencies' => array('wp-components', 'wp-element'), 'version' => '46663deecb0e61961f77');

View File

@ -0,0 +1 @@
#wpcontent{padding-left:0 !important}.ti-about{--border: 1px solid #ccc;--link-color: var(--wp-admin-theme-color);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;line-height:normal;display:grid;gap:30px}.ti-about .container{margin:0 auto;max-width:960px;padding:0 15px}.ti-about p{font-size:14px;line-height:1.6}.ti-about button{font-weight:600}.ti-about .spin{animation:spin 1s infinite linear}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.ti-about .head{background:#fff;border-bottom:var(--border);padding:18px 0}.ti-about .head .container{padding:0 15px;display:flex;flex-wrap:wrap;align-items:center}.ti-about .head img{max-height:55px}.ti-about .head p{margin-left:10px}.ti-about .head a{font-style:italic;font-weight:bold}.ti-about .nav{border-bottom:var(--border);display:flex;flex-wrap:wrap;font-size:16px;margin:0;font-weight:600;-moz-column-gap:20px;column-gap:20px}.ti-about .nav a{border-bottom:4px solid rgba(0,0,0,0);color:#868686;padding:20px 10px;text-decoration:none;margin-bottom:-1px;box-sizing:border-box}.ti-about .nav a:hover{color:#313233}.ti-about .nav li{display:flex;margin:0}.ti-about .nav li:first-child a{border-color:var(--link-color);color:#313233}.ti-about .story-card .footer,.ti-about .story-card .body{display:grid;grid-template-columns:var(--grid, 1fr);align-items:center}.ti-about .story-card{border:var(--border);border-radius:0 0 10px 10px}.ti-about .story-card .body{background:#fff;padding:35px 35px 10px 35px}.ti-about .story-card .body h2{font-size:30px;margin:0 0 30px;color:#1f1d1d}.ti-about .story-card .body p{color:#1e1e1e}.ti-about .story-card .body figure{order:0;margin:0}.ti-about .story-card .body figcaption{margin:10px 0;color:#797979;font-size:12px}.ti-about .story-card .body img{border-radius:8px;max-width:100%}.ti-about .story-card .footer{border-top:var(--border);padding:30px 40px}.ti-about .story-card .footer h2{margin:0 0 20px;text-align:center;font-size:21px}.ti-about .story-card form{display:flex;align-items:center}.ti-about .story-card form .dashicons-yes-alt{color:#609952}.ti-about .story-card input{height:36px;flex-grow:1;border:var(--border);border-radius:2px;font-size:12px;margin-right:15px}.ti-about .product-cards{display:grid;gap:30px}.ti-about .product-card{background:#fff;display:grid;border:var(--border)}.ti-about .product-card h2{font-size:21px;margin:0}.ti-about .product-card p{margin:0;color:#6c6c6c}.ti-about .product-card .header{padding:20px 15px 0;display:flex;align-items:center}.ti-about .product-card .body{padding:20px 15px}.ti-about .product-card img{max-width:50px;margin-right:15px;border-radius:6px}.ti-about .product-card .footer{border-top:var(--border);display:flex;align-items:center;padding:15px;align-self:flex-end}.ti-about .product-card .footer p{margin:8px 0;font-weight:600;font-size:13px;color:#313233}.ti-about .product-card .footer .not-installed{color:#7e7e7e}.ti-about .product-card .footer .active{color:#609952}.ti-about .product-card button,.ti-about .product-card a,.ti-about .product-card .spin{margin-left:auto;text-decoration:none}@media (min-width: 660px){.ti-about .product-cards{grid-template-columns:1fr 1fr}}@media (min-width: 992px){.ti-about .story-card .footer,.ti-about .story-card .body{gap:60px}.ti-about .story-card{--grid: 1.1fr 1fr}.ti-about .story-card .footer h2{margin:0;text-align:left}.ti-about .product-cards{grid-template-columns:1fr 1fr 1fr}}

View File

@ -0,0 +1 @@
(()=>{"use strict";const e=window.wp.element;function t(){const{currentProduct:t,logoUrl:a,strings:n,links:l}=window.tiSDKAboutData;return(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"head"},(0,e.createElement)("div",{className:"container"},(0,e.createElement)("img",{src:a,alt:t.name}),(0,e.createElement)("p",null,"by ",(0,e.createElement)("a",{href:"https://themeisle.com"},"Themeisle")))),l.length>0&&(0,e.createElement)("div",{className:"container"},(0,e.createElement)("ul",{className:"nav"},(0,e.createElement)("li",null,(0,e.createElement)("a",{href:window.location},n.aboutUs)),l.map(((t,a)=>(0,e.createElement)("li",{key:a},(0,e.createElement)("a",{href:t.url},t.text)))))))}const a=window.wp.components;function n(){const{strings:t,teamImage:n,homeUrl:l,pageSlug:c}=window.tiSDKAboutData,{heroHeader:s,heroTextFirst:r,heroTextSecond:i,teamImageCaption:o,newsHeading:m,emailPlaceholder:u,signMeUp:d}=t,[E,p]=(0,e.useState)(""),[h,v]=(0,e.useState)(!1),[g,w]=(0,e.useState)(!1);return(0,e.createElement)("div",{className:"container"},(0,e.createElement)("div",{className:"story-card"},(0,e.createElement)("div",{className:"body"},(0,e.createElement)("div",null,(0,e.createElement)("h2",null,s),(0,e.createElement)("p",null,r),(0,e.createElement)("p",null,i)),(0,e.createElement)("figure",null,(0,e.createElement)("img",{src:n,alt:o}),(0,e.createElement)("figcaption",null,o))),(0,e.createElement)("div",{className:"footer"},(0,e.createElement)("h2",null,m),(0,e.createElement)("form",{onSubmit:e=>{var t;e.preventDefault(),v(!0),null===(t=fetch("https://api.themeisle.com/tracking/subscribe",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json, */*;q=0.1","Cache-Control":"no-cache"},body:JSON.stringify({slug:"about-us",site:l,from:c,email:E})}).then((e=>e.json())).then((e=>{v(!1),"success"===e.code&&w(!0)})))||void 0===t||t.catch((e=>{v(!1)}))}},(0,e.createElement)("input",{disabled:h||g,type:"email",value:E,onChange:e=>{p(e.target.value)},placeholder:u}),!h&&!g&&(0,e.createElement)(a.Button,{isPrimary:!0,type:"submit"},d),h&&(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),g&&(0,e.createElement)("span",{className:"dashicons dashicons-yes-alt"})))))}function l(t){let{product:n,slug:l}=t;const{icon:c,name:s,description:r,status:i,premiumUrl:o,activationLink:m}=n,{strings:u}=window.tiSDKAboutData,{installNow:d,installed:E,notInstalled:p,active:h,activate:v,learnMore:g}=u,w=!!o,[N,y]=(0,e.useState)(i),[b,f]=(0,e.useState)(!1);return(0,e.createElement)("div",{className:"product-card"},(0,e.createElement)("div",{className:"header"},c&&(0,e.createElement)("img",{src:c,alt:s}),(0,e.createElement)("h2",null,s)),(0,e.createElement)("div",{className:"body"},(0,e.createElement)("p",{dangerouslySetInnerHTML:{__html:r}})),(0,e.createElement)("div",{className:"footer"},(0,e.createElement)("p",null,"Status:"," ",(0,e.createElement)("span",{className:N},"installed"===N&&E,"not-installed"===N&&p,"active"===N&&h)),"active"!==N&&!b&&(0,e.createElement)(e.Fragment,null,"not-installed"===N&&w&&(0,e.createElement)(a.Button,{isLink:!0,icon:"external",href:o,target:"_blank"},g),"not-installed"===N&&!w&&(0,e.createElement)(a.Button,{isPrimary:!0,onClick:async()=>{f(!0),await function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new Promise((a=>{wp.updates.ajax(!0===t?"install-theme":"install-plugin",{slug:e,success:()=>{a({success:!0})},error:e=>{a({success:!1,code:e.errorCode})}})}))}(l,"neve"===l).then((e=>{e.success&&y("installed")})),f(!1)}},d),"installed"===N&&(0,e.createElement)(a.Button,{isSecondary:!0,onClick:async()=>{f(!0),window.location.href=m}},v)),b&&(0,e.createElement)("span",{className:"dashicons dashicons-update spin"})))}function c(){const{products:t}=window.tiSDKAboutData;return(0,e.createElement)("div",{className:"container"},(0,e.createElement)("div",{className:"product-cards"},Object.keys(t).map(((a,n)=>(0,e.createElement)(l,{key:a,slug:a,product:t[a]})))))}document.addEventListener("DOMContentLoaded",(()=>{const a=document.querySelector("#ti-sdk-about");a&&(0,e.render)((0,e.createElement)("div",{className:"ti-about"},(0,e.createElement)(t,null),(0,e.createElement)(n,null),(0,e.createElement)(c,null)),a)}))})();

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<?php return array('dependencies' => array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins'), 'version' => '3d1ed0347f48fcdf607c');
<?php return array('dependencies' => array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins'), 'version' => '244b65d8f9819e082258');

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
.ti-sdk-om-notice{--wp-admin-theme-color: #3858E9;--wp-admin-theme-color-darker-10: #2e47ba;position:relative;padding:0;border-left-color:#3858e9}.ti-sdk-om-notice .content{background:rgba(255,255,255,.75);display:flex;align-items:center;padding:15px 20px}.ti-sdk-om-notice img{max-width:100px;margin-right:20px;display:none}.ti-sdk-om-notice .description{font-size:14px;margin-bottom:20px;color:#000}.ti-sdk-om-notice .actions{margin-top:auto;display:flex;margin-bottom:0;gap:20px}.ti-sdk-om-notice form{display:flex;align-items:center;gap:10px}.ti-sdk-om-notice .form-wrap{display:grid}.ti-sdk-om-notice .form-wrap span:not(.dashicons){margin-bottom:5px;font-weight:500}.ti-sdk-om-notice input{border-radius:0;min-width:250px}.ti-sdk-om-notice a.components-button{display:flex;align-items:center;justify-content:center}.ti-sdk-om-notice .is-link{text-decoration:none;display:flex;align-items:center}.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{display:flex;flex-direction:column;align-items:flex-start}.ti-sdk-om-notice .done a{width:auto}.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{right:10px;top:10px;text-decoration:none !important;position:absolute}.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;display:flex;flex-direction:column;align-items:center;position:relative;text-align:center;padding:20px 10px}.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;margin:30px auto 10px;font-weight:600}.ti-om-stack-wrap .om-stack-notice p{font-size:13px;max-width:250px;margin:0 auto;line-height:17px}.ti-om-stack-wrap .om-stack-notice i{margin-top:10px;font-size:12px;color:#757575}.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{place-items:center;width:75%;display:grid;margin-top:10px;gap:10px}.ti-om-stack-wrap .om-stack-notice .done{margin-top:15px;display:grid;gap:10px}.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{gap:5px;font-size:14px;display:flex;align-items:center}.om-progress .spin{animation:om-rotation 2s infinite linear}@keyframes om-rotation{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.ti-sdk-om-promo.hidden{display:none}.media-sidebar .ti-sdk-om-notice input{min-width:unset;flex-grow:1}.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{min-width:unset;flex-grow:1}.attachment-info .ti-sdk-om-notice form{flex-wrap:wrap;justify-content:center}.ti-sdk-rop-notice{position:relative;padding:10px}.ti-sdk-rop-notice .rop-notice-actions{display:flex;gap:10px}.ti-sdk-rop-notice p{padding:0 10px 0 0}.ti-sdk-neve-fse-notice{position:relative;padding:10px}.ti-sdk-neve-fse-notice .neve-fse-notice-actions{display:flex;gap:10px}.ti-sdk-neve-fse-notice .neve-fse-notice-actions a{text-decoration:none}.ti-sdk-neve-fse-notice .neve-fse-notice-actions a span:not(.dashicons){text-decoration:underline}.ti-sdk-neve-fse-notice p{padding:0 10px 0 0;font-size:14px}@media screen and (min-width: 768px){.ti-sdk-om-notice img{display:block}}@media screen and (min-width: 1200px){.attachment-info .ti-sdk-om-notice form{flex-wrap:unset}}

View File

@ -1 +0,0 @@
.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}

View File

@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
return;
}
// Current SDK version and path.
$themeisle_sdk_version = '3.2.40';
$themeisle_sdk_version = '3.3.1';
$themeisle_sdk_path = dirname( __FILE__ );
global $themeisle_sdk_max_version;

View File

@ -0,0 +1,10 @@
const wpPreset = require( '@wordpress/postcss-plugins-preset' );
module.exports = {
plugins: [
...wpPreset,
require( 'postcss-custom-media' )(), // Custom media queries: https://www.npmjs.com/package/postcss-custom-media
require( 'postcss-combine-media-query' )(), // Combine media queries: https://www.npmjs.com/package/postcss-combine-media-query
require( 'postcss-sort-media-queries' )() // Sort media queries: https://www.npmjs.com/package/postcss-sort-media-queries
]
};

View File

@ -23,6 +23,24 @@ if ( ! defined( 'ABSPATH' ) ) {
* @package ThemeisleSDK\Common
*/
abstract class Abstract_Module {
/**
* Plugin paths.
*
* @var string[] $plugin_paths Plugin paths.
*/
private $plugin_paths = [
'otter-blocks' => 'otter-blocks/otter-blocks.php',
'optimole-wp' => 'optimole-wp/optimole-wp.php',
'tweet-old-post' => 'tweet-old-post/tweet-old-post.php',
'feedzy-rss-feeds' => 'feedzy-rss-feeds/feedzy-rss-feed.php',
'woocommerce-product-addon' => 'woocommerce-product-addon/woocommerce-product-addon.php',
'visualizer' => 'visualizer/index.php',
'wp-landing-kit' => 'wp-landing-kit/wp-landing-kit.php',
'multiple-pages-generator-by-porthas' => 'multiple-pages-generator-by-porthas/porthas-multi-pages-generator.php',
'sparks-for-woocommerce' => 'sparks-for-woocommerce/sparks-for-woocommerce.php',
'templates-patterns-collection' => 'templates-patterns-collection/templates-patterns-collection.php',
];
/**
* Product which use the module.
*
@ -54,7 +72,6 @@ abstract class Abstract_Module {
* @return bool Is product from partner.
*/
public function is_from_partner( $product ) {
foreach ( Module_Factory::$domains as $partner_domain ) {
if ( strpos( $product->get_store_url(), $partner_domain ) !== false ) {
return true;
@ -80,4 +97,125 @@ abstract class Abstract_Module {
$args
);
}
/**
* Get the SDK base url.
*
* @return string
*/
public function get_sdk_uri() {
global $themeisle_sdk_max_path;
/**
* $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/' );
};
return get_template_directory_uri() . '/vendor/codeinwp/themeisle-sdk/';
}
/**
* Call plugin api
*
* @param string $slug plugin slug.
*
* @return array|mixed|object
*/
public function call_plugin_api( $slug ) {
include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
$call_api = get_transient( 'ti_plugin_info_' . $slug );
if ( false === $call_api ) {
$call_api = plugins_api(
'plugin_information',
array(
'slug' => $slug,
'fields' => array(
'downloaded' => false,
'rating' => false,
'description' => false,
'short_description' => true,
'donate_link' => false,
'tags' => false,
'sections' => true,
'homepage' => true,
'added' => false,
'last_updated' => false,
'compatibility' => false,
'tested' => false,
'requires' => false,
'downloadlink' => false,
'icons' => true,
'banners' => true,
),
)
);
set_transient( 'ti_plugin_info_' . $slug, $call_api, 30 * MINUTE_IN_SECONDS );
}
return $call_api;
}
/**
* Get the plugin status.
*
* @param string $plugin Plugin slug.
*
* @return bool
*/
public function is_plugin_installed( $plugin ) {
if ( ! isset( $this->plugin_paths[ $plugin ] ) ) {
return false;
}
if ( file_exists( WP_CONTENT_DIR . '/plugins/' . $this->plugin_paths[ $plugin ] ) ) {
return true;
}
return false;
}
/**
* Get plugin activation link.
*
* @param string $slug The plugin slug.
*
* @return string
*/
public function get_plugin_activation_link( $slug ) {
$reference_key = $slug === 'otter-blocks' ? 'reference_key' : 'optimole_reference_key';
$plugin = isset( $this->plugin_paths[ $slug ] ) ? $this->plugin_paths[ $slug ] : $slug . '/' . $slug . '.php';
return add_query_arg(
array(
'plugin_status' => 'all',
'paged' => '1',
'action' => 'activate',
$reference_key => $this->product->get_key(),
'plugin' => rawurlencode( $plugin ),
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin ),
),
admin_url( 'plugins.php' )
);
}
/**
* Checks if a plugin is active.
*
* @param string $plugin plugin slug.
*
* @return bool
*/
public function is_plugin_active( $plugin ) {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
$plugin = isset( $this->plugin_paths[ $plugin ] ) ? $this->plugin_paths[ $plugin ] : $plugin . '/' . $plugin . '.php';
return is_plugin_active( $plugin );
}
}

View File

@ -56,7 +56,9 @@ final class Loader {
'recommendation',
'notification',
'promotions',
'welcome',
'compatibilities',
'about_us',
];
/**

View File

@ -0,0 +1,323 @@
<?php
/**
* The about page model class for ThemeIsle SDK
*
* Here's how to hook it in your plugin:
*
* add_filter( <product_slug>_about_us_metadata', 'add_about_meta' );
*
* function add_about_meta($data) {
* return [
* 'location' => <top level page - e.g. themes.php>,
* 'logo' => <logo url>,
* 'page_menu' => [['text' => '', 'url' => '']], // optional
* 'has_upgrade_menu' => <condition>,
* 'upgrade_link' => <url>,
* 'upgrade_text' => 'Get Pro Version',
* ]
* }
*
* @package ThemeIsleSDK
* @subpackage Modules
* @copyright Copyright (c) 2023, Andrei Baicus
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
* @since 3.2.42
*/
namespace ThemeisleSDK\Modules;
use ThemeisleSDK\Common\Abstract_Module;
use ThemeisleSDK\Product;
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Promotions module for ThemeIsle SDK.
*/
class About_Us extends Abstract_Module {
/**
* About data.
*
* @var array $about_data About page data, received from the filter.
*
* Shape of the $about_data property array:
* [
* 'location' => 'top level page',
* 'logo' => 'logo path',
* 'page_menu' => [['text' => '', 'url' => '']], // Optional
* 'has_upgrade_menu' => !defined('NEVE_PRO_VERSION'),
* 'upgrade_link' => 'upgrade url',
* 'upgrade_text' => 'Get Pro Version',
* ]
*/
private $about_data = array();
/**
* Should we load this module.
*
* @param Product $product Product object.
*
* @return bool
*/
public function can_load( $product ) {
if ( $this->is_from_partner( $product ) ) {
return false;
}
$this->about_data = apply_filters( $product->get_key() . '_about_us_metadata', array() );
return ! empty( $this->about_data );
}
/**
* Registers the hooks.
*
* @param Product $product Product to load.
*/
public function load( $product ) {
$this->product = $product;
add_action( 'admin_menu', [ $this, 'add_submenu_pages' ] );
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_about_page_script' ] );
}
/**
* Adds submenu pages.
*
* @return void
*/
public function add_submenu_pages() {
if ( ! isset( $this->about_data['location'] ) ) {
return;
}
add_submenu_page(
$this->about_data['location'],
__( 'About Us', 'textdomain' ),
__( 'About Us', 'textdomain' ),
'manage_options',
$this->get_about_page_slug(),
array( $this, 'render_about_us_page' ),
100
);
if ( ! isset( $this->about_data['has_upgrade_menu'] ) ) {
return;
}
if ( $this->about_data['has_upgrade_menu'] !== true ) {
return;
}
if ( ! isset( $this->about_data['upgrade_link'] ) ) {
return;
}
if ( ! isset( $this->about_data['upgrade_text'] ) ) {
return;
}
add_submenu_page(
$this->about_data['location'],
$this->about_data['upgrade_text'],
$this->about_data['upgrade_text'],
'manage_options',
$this->about_data['upgrade_link'],
'',
101
);
}
/**
* Render page content.
*
* @return void
*/
public function render_about_us_page() {
echo '<div id="ti-sdk-about"></div>';
}
/**
* Enqueue scripts & styles.
*
* @return void
*/
public function enqueue_about_page_script() {
$current_screen = get_current_screen();
if ( ! isset( $current_screen->id ) ) {
return;
}
if ( strpos( $current_screen->id, $this->get_about_page_slug() ) === false ) {
return;
}
global $themeisle_sdk_max_path;
$handle = 'ti-sdk-about-' . $this->product->get_key();
$asset_file = require $themeisle_sdk_max_path . '/assets/js/build/about/about.asset.php';
$deps = array_merge( $asset_file['dependencies'], [ 'updates' ] );
wp_register_script( $handle, $this->get_sdk_uri() . 'assets/js/build/about/about.js', $deps, $asset_file['version'], true );
wp_localize_script( $handle, 'tiSDKAboutData', $this->get_about_localization_data() );
wp_enqueue_script( $handle );
wp_enqueue_style( $handle, $this->get_sdk_uri() . 'assets/js/build/about/about.css', [ 'wp-components' ], $asset_file['version'] );
}
/**
* Get localized data.
*
* @return array
*/
private function get_about_localization_data() {
$links = isset( $this->about_data['page_menu'] ) ? $this->about_data['page_menu'] : [];
return [
'links' => $links,
'logoUrl' => $this->about_data['logo'],
'products' => $this->get_other_products_data(),
'homeUrl' => esc_url( home_url() ),
'pageSlug' => $this->get_about_page_slug(),
'currentProduct' => [
'slug' => $this->product->get_key(),
'name' => $this->product->get_name(),
],
'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' ),
],
];
}
/**
* Get products data.
*
* @return array
*/
private function get_other_products_data() {
$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.',
],
'neve' => [
'skip_api' => true,
'name' => 'Neve',
'description' => __( 'A fast, lightweight, customizable WordPress theme offering responsive design, speed, and flexibility for various website types.', 'textdomain' ),
'icon' => $this->get_sdk_uri() . 'assets/images/neve.png',
],
'otter-blocks' => [
'name' => 'Otter',
],
'tweet-old-post' => [
'name' => 'Revive Old Post',
],
'feedzy-rss-feeds' => [
'name' => 'Feedzy',
],
'woocommerce-product-addon' => [
'name' => 'PPOM',
'condition' => class_exists( 'WooCommerce', false ),
],
'visualizer' => [
'name' => 'Visualizer',
],
'wp-landing-kit' => [
'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' ),
'icon' => $this->get_sdk_uri() . 'assets/images/wplk.png',
],
'multiple-pages-generator-by-porthas' => [
'name' => 'MPG',
],
'sparks-for-woocommerce' => [
'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' ),
'icon' => $this->get_sdk_uri() . 'assets/images/sparks.png',
'condition' => class_exists( 'WooCommerce', false ),
],
'templates-patterns-collection' => [
'name' => 'Template Cloud',
'description' => __( 'Ultimate Free Templates Cloud for WordPress, for blocks, patters of full pages.', 'textdomain' ),
],
];
foreach ( $products as $slug => $product ) {
if ( isset( $product['condition'] ) && ! $product['condition'] ) {
unset( $products[ $slug ] );
continue;
}
if ( $slug === 'neve' ) {
$theme = get_template();
$themes = wp_get_themes();
$products[ $slug ]['status'] = isset( $themes['neve'] ) ? 'installed' : 'not-installed';
$products[ $slug ]['status'] = $theme === 'neve' ? 'active' : $products[ $slug ]['status'];
$products[ $slug ]['activationLink'] = add_query_arg(
[
'stylesheet' => 'neve',
'action' => 'activate',
'_wpnonce' => wp_create_nonce( 'switch-theme_neve' ),
],
admin_url( 'themes.php' )
);
continue;
}
$products[ $slug ]['status'] = $this->is_plugin_installed( $slug ) ? 'installed' : 'not-installed';
$products[ $slug ]['status'] = $this->is_plugin_active( $slug ) ? 'active' : $products[ $slug ]['status'];
$products[ $slug ]['activationLink'] = $this->get_plugin_activation_link( $slug );
if ( isset( $product['skip_api'] ) ) {
continue;
}
$api_data = $this->call_plugin_api( $slug );
if ( ! isset( $product['icon'] ) ) {
$products[ $slug ]['icon'] = isset( $api_data->icons['2x'] ) ? $api_data->icons['2x'] : $api_data->icons['1x'];
}
if ( ! isset( $product['description'] ) ) {
$products[ $slug ]['description'] = $api_data->short_description;
}
if ( ! isset( $product['name'] ) ) {
$products[ $slug ]['name'] = $api_data->name;
}
}
return $products;
}
/**
* Get the page slug.
*
* @return string
*/
private function get_about_page_slug() {
return 'ti-about-' . $this->product->get_key();
}
}

View File

@ -256,6 +256,7 @@ class Notification extends Abstract_Module {
$default = [
'id' => '',
'heading' => '',
'img_src' => '',
'message' => '',
'ctas' => [
'confirm' => [
@ -267,17 +268,26 @@ class Notification extends Abstract_Module {
'text' => '',
],
],
'type' => 'success',
];
$notification_details = wp_parse_args( $notification_details, $default );
global $pagenow;
$type = in_array( $notification_details['type'], [ 'success', 'info', 'warning', 'error' ], true ) ? $notification_details['type'] : 'success';
$notification_details['ctas']['cancel']['link'] = wp_nonce_url( add_query_arg( [ 'nid' => $notification_details['id'] ], admin_url( $pagenow ) ), $notification_details['id'], 'tsdk_dismiss_nonce' );
$notification_html = '<div class="notice notice-success is-dismissible themeisle-sdk-notice" data-notification-id="' . esc_attr( $notification_details['id'] ) . '" id="' . esc_attr( $notification_details['id'] ) . '-notification"> <div class="themeisle-sdk-notification-box">';
$notification_html = '<div class="notice notice-' . $type . ' is-dismissible themeisle-sdk-notice" data-notification-id="' . esc_attr( $notification_details['id'] ) . '" id="' . esc_attr( $notification_details['id'] ) . '-notification"> <div class="themeisle-sdk-notification-box">';
if ( ! empty( $notification_details['heading'] ) ) {
$notification_html .= sprintf( '<h4>%s</h4>', wp_kses_post( $notification_details['heading'] ) );
}
if ( ! empty( $notification_details['img_src'] ) ) {
$notification_html .= '<div class="wrap-flex">';
$notification_html .= sprintf( '<img src="%s" alt="%s" />', esc_attr( $notification_details['img_src'] ), esc_attr( $notification_details['heading'] ) );
}
if ( ! empty( $notification_details['message'] ) ) {
$notification_html .= wp_kses_post( $notification_details['message'] );
if ( ! empty( $notification_details['img_src'] ) ) {
$notification_html .= '</div>';
}
}
$notification_html .= '<div class="actions">';
@ -317,6 +327,18 @@ class Notification extends Abstract_Module {
padding: 3px;
}
.themeisle-sdk-notification-box .wrap-flex {
display: flex;
align-items: center;
justify-content: start;
gap: 12px;
}
.themeisle-sdk-notification-box .wrap-flex img {
width: 42px;
object-fit: cover;
}
.themeisle-sdk-notification-box .actions {
margin-top: 6px;
margin-bottom: 4px;
@ -377,6 +399,7 @@ class Notification extends Abstract_Module {
if ( empty( $id ) ) {
wp_send_json( [] );
}
self::setup_notifications();
$ids = wp_list_pluck( self::$notifications, 'id' );
if ( ! in_array( $id, $ids, true ) ) {
wp_send_json( [] );

View File

@ -61,6 +61,13 @@ class Promotions extends Abstract_Module {
*/
private $option_rop = 'themeisle_sdk_promotions_rop_installed';
/**
* Option key for Neve FSE promos.
*
* @var string
*/
private $option_neve_fse = 'themeisle_sdk_promotions_neve_fse_installed';
/**
* Loaded promotion.
*
@ -68,6 +75,13 @@ class Promotions extends Abstract_Module {
*/
private $loaded_promo;
/**
* Woo promotions.
*
* @var array
*/
private $woo_promos = array();
/**
* Debug mode.
*
@ -94,6 +108,8 @@ class Promotions extends Abstract_Module {
$promotions_to_load = apply_filters( $product->get_key() . '_load_promotions', array() );
$promotions_to_load[] = 'optimole';
$promotions_to_load[] = 'rop';
$promotions_to_load[] = 'woo_plugins';
$promotions_to_load[] = 'neve-fse';
$this->promotions = $this->get_promotions();
@ -130,7 +146,12 @@ class Promotions extends Abstract_Module {
add_filter( 'attachment_fields_to_edit', array( $this, 'add_attachment_field' ), 10, 2 );
add_action( 'current_screen', [ $this, 'load_available' ] );
add_action( 'elementor/editor/after_enqueue_scripts', array( $this, 'enqueue' ) );
add_action( 'wp_ajax_tisdk_update_option', array( $this, 'dismiss_promotion' ) );
add_filter( 'themeisle_sdk_ran_promos', '__return_true' );
if ( get_option( $this->option_neve_fse, false ) !== true ) {
add_action( 'wp_ajax_themeisle_sdk_dismiss_notice', 'ThemeisleSDK\Modules\Notification::regular_dismiss' );
}
}
/**
@ -164,6 +185,10 @@ class Promotions extends Abstract_Module {
if ( isset( $_GET['rop_reference_key'] ) ) {
update_option( 'rop_reference_key', sanitize_key( $_GET['rop_reference_key'] ) );
}
if ( isset( $_GET['neve_fse_reference_key'] ) ) {
update_option( 'neve_fse_reference_key', sanitize_key( $_GET['neve_fse_reference_key'] ) );
}
}
/**
@ -213,26 +238,16 @@ class Promotions extends Abstract_Module {
'default' => false,
)
);
}
/**
* Get the SDK base url.
*
* @return string
*/
private function get_sdk_uri() {
global $themeisle_sdk_max_path;
/**
* $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/' );
};
return get_template_directory_uri() . '/vendor/codeinwp/themeisle-sdk/';
register_setting(
'themeisle_sdk_settings',
$this->option_neve_fse,
array(
'type' => 'boolean',
'sanitize_callback' => 'rest_sanitize_boolean',
'show_in_rest' => true,
'default' => false,
)
);
}
/**
@ -253,31 +268,6 @@ class Promotions extends Abstract_Module {
return false;
}
/**
* Get the Otter Blocks plugin status.
*
* @param string $plugin Plugin slug.
*
* @return bool
*/
private function is_plugin_installed( $plugin ) {
static $allowed_keys = [
'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 ] ) ) {
return false;
}
if ( file_exists( WP_CONTENT_DIR . '/plugins/' . $allowed_keys[ $plugin ] ) ) {
return true;
}
return false;
}
/**
* Get promotions.
*
@ -290,12 +280,16 @@ class Promotions extends Abstract_Module {
$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 );
$has_woocommerce = class_exists( 'WooCommerce' );
$has_sparks = defined( 'SPARKS_WC_VERSION' ) || $this->is_plugin_installed( 'sparks-for-woocommerce' );
$has_ppom = defined( 'PPOM_VERSION' ) || $this->is_plugin_installed( 'woocommerce-product-addon' );
$is_min_req_v = version_compare( get_bloginfo( 'version' ), '5.8', '>=' );
$is_min_fse_v = version_compare( get_bloginfo( 'version' ), '6.2', '>=' );
$has_enough_attachments = $this->has_min_media_attachments();
$has_enough_old_posts = $this->has_old_posts();
$all = [
'optimole' => [
'optimole' => [
'om-editor' => [
'env' => ! $has_optimole && $is_min_req_v && ! $had_optimole_from_promo,
'screen' => 'editor',
@ -317,7 +311,7 @@ class Promotions extends Abstract_Module {
'screen' => 'elementor',
],
],
'otter' => [
'otter' => [
'blocks-css' => [
'env' => ! $has_otter && $is_min_req_v && ! $had_otter_from_promo,
'screen' => 'editor',
@ -331,12 +325,36 @@ class Promotions extends Abstract_Module {
'screen' => 'editor',
],
],
'rop' => [
'rop' => [
'rop-posts' => [
'env' => ! $has_rop && ! $had_rop_from_promo && $has_enough_old_posts,
'screen' => 'edit-post',
],
],
'woo_plugins' => [
'ppom' => [
'env' => ! $has_ppom && $has_woocommerce,
'screen' => 'edit-product',
],
'sparks-wishlist' => [
'env' => ! $has_sparks && $has_woocommerce,
'screen' => 'edit-product',
],
'sparks-announcement' => [
'env' => ! $has_sparks && $has_woocommerce,
'screen' => 'edit-product',
],
'sparks-product-review' => [
'env' => ! $has_sparks && $has_woocommerce,
'screen' => 'edit-product',
],
],
'neve-fse' => [
'neve-fse-themes-popular' => [
'env' => $is_min_fse_v,
'screen' => 'themes-install-popular',
],
],
];
foreach ( $all as $slug => $data ) {
@ -365,7 +383,7 @@ class Promotions extends Abstract_Module {
*
* @param string $key The upsell key. If empty will return all dismiss times.
*
* @return false | string
* @return false | string | array
*/
private function get_upsells_dismiss_time( $key = '' ) {
$old = get_option( 'themeisle_sdk_promotions_otter', '{}' );
@ -383,18 +401,18 @@ class Promotions extends Abstract_Module {
/**
* Get the last dismiss time of a promotion.
*
* @return false
* @return int The timestamp of last dismiss, or install time - 4 days.
*/
private function get_last_dismiss_time() {
$dismissed = $this->get_upsells_dismiss_time();
if ( empty( $dismissed ) ) {
return false;
// we return the product install time - 4 days because we want to show the upsell after 3 days,
// and we move the product install time 4 days in the past.
return $this->product->get_install_time() - 4 * DAY_IN_SECONDS;
}
$last_dismiss = max( array_values( $dismissed ) );
return $last_dismiss;
return max( array_values( $dismissed ) );
}
/**
@ -405,10 +423,12 @@ class Promotions extends Abstract_Module {
private function filter_by_screen_and_merge() {
$current_screen = get_current_screen();
$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();
$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();
$is_theme_install = isset( $current_screen->id ) && ( $current_screen->id === 'theme-install' || $current_screen->id === 'themes' );
$is_product = isset( $current_screen->id ) && $current_screen->id === 'product';
$return = [];
@ -440,6 +460,16 @@ class Promotions extends Abstract_Module {
unset( $this->promotions[ $slug ][ $key ] );
}
break;
case 'edit-product':
if ( ! $is_product ) {
unset( $this->promotions[ $slug ][ $key ] );
}
break;
case 'themes-install-popular':
if ( ! $is_theme_install ) {
unset( $this->promotions[ $slug ][ $key ] );
}
break;
}
}
@ -466,7 +496,11 @@ class Promotions extends Abstract_Module {
if ( $this->get_upsells_dismiss_time( 'rop-posts' ) === false ) {
add_action( 'admin_notices', [ $this, 'render_rop_dash_notice' ] );
}
if ( $this->get_upsells_dismiss_time( 'neve-fse-themes-popular' ) === false ) {
add_action( 'admin_notices', [ $this, 'render_neve_fse_themes_notice' ] );
}
$this->load_woo_promos();
return;
}
@ -489,6 +523,16 @@ class Promotions extends Abstract_Module {
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] );
add_action( 'admin_notices', [ $this, 'render_rop_dash_notice' ] );
break;
case 'ppom':
case 'sparks-wishlist':
case 'sparks-announcement':
case 'sparks-product-reviews':
$this->load_woo_promos();
break;
case 'neve-fse-themes-popular':
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] );
add_action( 'admin_notices', [ $this, 'render_neve_fse_themes_notice' ] );
break;
}
}
@ -514,10 +558,10 @@ class Promotions extends Abstract_Module {
$saved = $this->get_upsells_dismiss_time();
$themeisle_sdk_src = $this->get_sdk_uri();
$user = wp_get_current_user();
$asset_file = require $themeisle_sdk_max_path . '/assets/js/build/index.asset.php';
$asset_file = require $themeisle_sdk_max_path . '/assets/js/build/promos/index.asset.php';
$deps = array_merge( $asset_file['dependencies'], [ 'updates' ] );
wp_register_script( $handle, $themeisle_sdk_src . 'assets/js/build/index.js', $deps, $asset_file['version'], true );
wp_register_script( $handle, $themeisle_sdk_src . 'assets/js/build/promos/index.js', $deps, $asset_file['version'], true );
wp_localize_script(
$handle,
'themeisleSDKPromotions',
@ -536,12 +580,13 @@ class Promotions extends Abstract_Module {
'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' ) ) ),
'neveFSEMoreUrl' => tsdk_utmify( 'https://themeisle.com/themes/neve-fse/', 'neve-fse-themes-popular', 'theme-install' ),
// translators: %s is the product name.
'title' => esc_html( sprintf( __( 'Recommended by %s', 'textdomain' ), $this->product->get_name() ) ),
]
);
wp_enqueue_script( $handle );
wp_enqueue_style( $handle, $themeisle_sdk_src . 'assets/js/build/style-index.css', [ 'wp-components' ], $asset_file['version'] );
wp_enqueue_style( $handle, $themeisle_sdk_src . 'assets/js/build/promos/style-index.css', [ 'wp-components' ], $asset_file['version'] );
}
/**
@ -557,6 +602,13 @@ class Promotions extends Abstract_Module {
echo '<div id="ti-rop-notice" class="notice notice-info ti-sdk-rop-notice"></div>';
}
/**
* Render Neve FSE Themes notice.
*/
public function render_neve_fse_themes_notice() {
echo '<div id="ti-neve-fse-notice" class="notice notice-info ti-sdk-neve-fse-notice"></div>';
}
/**
* Add promo to attachment modal.
*
@ -593,31 +645,6 @@ class Promotions extends Abstract_Module {
return $fields;
}
/**
* Get plugin activation link.
*
* @param string $slug The plugin slug.
*
* @return string
*/
private function get_plugin_activation_link( $slug ) {
$reference_key = $slug === 'otter-blocks' ? 'reference_key' : 'optimole_reference_key';
return esc_url(
add_query_arg(
array(
'plugin_status' => 'all',
'paged' => '1',
'action' => 'activate',
$reference_key => $this->product->get_key(),
'plugin' => rawurlencode( $slug . '/' . $slug . '.php' ),
'_wpnonce' => wp_create_nonce( 'activate-plugin_' . $slug . '/' . $slug . '.php' ),
),
admin_url( 'plugins.php' )
)
);
}
/**
* Check if has 50 image media items.
*
@ -695,4 +722,285 @@ class Promotions extends Abstract_Module {
// 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;
}
/**
* Check if should load Woo promos.
*
* @return bool
*/
private function load_woo_promos() {
$this->woo_promos = array(
'ppom' => array(
'title' => 'Product Add-Ons',
'description' => 'Add extra custom fields & add-ons on your product pages, like sizes, colors & more.',
'icon' => '<svg width="25" height="25" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1800 1800"><path d="M241.023,324.818c0.252,0,0.505,0.035,0.758,0.035h465.68c17.266,0,31.256-13.99,31.256-31.252 c0-17.262-13.99-31.247-31.256-31.247H351.021h-109.24c-17.258,0-31.252,13.985-31.252,31.247 C210.529,310.605,224.121,324.412,241.023,324.818z"/><path d="M210.529,450.306c0,17.257,13.994,31.252,31.252,31.252h769.451c17.262,0,31.256-13.995,31.256-31.252 c0-17.266-13.994-31.252-31.256-31.252H241.781C224.523,419.054,210.529,433.04,210.529,450.306z"/><path d="M1011.232,575.751H241.781c-8.149,0-15.549,3.147-21.116,8.261c-6.213,5.712-10.136,13.879-10.136,22.987 c0,17.262,13.994,31.26,31.252,31.26h769.451c17.262,0,31.256-13.999,31.256-31.26c0-9.108-3.923-17.275-10.141-22.987 C1026.781,578.898,1019.386,575.751,1011.232,575.751z"/><path d="M1011.232,732.461H241.781c-17.258,0-31.252,13.99-31.252,31.247c0,17.262,13.994,31.257,31.252,31.257 h769.451c17.262,0,31.256-13.995,31.256-31.257C1042.488,746.451,1028.494,732.461,1011.232,732.461z"/><path d="M1011.232,889.157H241.781c-8.149,0-15.549,3.147-21.116,8.261c-6.213,5.713-10.136,13.879-10.136,22.987 c0,17.257,13.994,31.261,31.252,31.261h769.451c17.262,0,31.256-14.004,31.256-31.261c0-9.108-3.923-17.274-10.141-22.987 C1026.781,892.305,1019.386,889.157,1011.232,889.157z"/><path d="M1011.232,1045.867H241.781c-17.258,0-31.252,13.99-31.252,31.243c0,17.271,13.994,31.265,31.252,31.265 h769.451c17.262,0,31.256-13.994,31.256-31.265C1042.488,1059.857,1028.494,1045.867,1011.232,1045.867z"/><path d="M1011.232,1202.576H241.781c-17.258,0-31.252,13.995-31.252,31.252c0,17.258,13.994,31.252,31.252,31.252 h769.451c17.262,0,31.256-13.994,31.256-31.252C1042.488,1216.571,1028.494,1202.576,1011.232,1202.576z"/><path d="M1011.232,1359.273H241.781c-8.149,0-15.549,3.151-21.116,8.265c-6.213,5.713-10.136,13.875-10.136,22.987 c0,17.258,13.994,31.261,31.252,31.261h769.451c17.262,0,31.256-14.003,31.256-31.261c0-9.112-3.923-17.274-10.141-22.987 C1026.781,1362.425,1019.386,1359.273,1011.232,1359.273z"/><path d="M1233.542,251.228l-49.851-45.109L1052.136,87.076l-59.185-53.554c-5.293-4.792-11.947-7.421-18.786-7.836 h-3.49H83.676c-45.688,0-82.858,37.375-82.858,83.316v1583.612c0,45.94,37.17,83.316,82.858,83.316h1078.562 c45.68,0,82.845-37.376,82.845-83.316V277.08v-3.182C1244.646,264.73,1240.261,256.589,1233.542,251.228z M1003.117,125.864 l131.119,118.657h-131.119V125.864z M1183.691,1692.613c0,12.094-9.622,21.926-21.454,21.926H83.676 c-11.836,0-21.467-9.832-21.467-21.926V109.001c0-12.089,9.631-21.925,21.467-21.925h857.857V275.38 c0,17.052,13.785,30.862,30.786,30.862h211.372V1692.613z"/><path d="M1798.578,180.737c-7.049-88.305-81.114-158.02-171.205-158.02c-0.004,0-0.004,0-0.004,0 c-45.889,0-89.033,17.874-121.479,50.32c-29.18,29.175-46.519,67.005-49.73,107.699h-0.586v13.609c0,0.06-0.005,0.115-0.005,0.175 c0,0.026,0.005,0.056,0.005,0.082l-0.005,1369.26h0.197c0.557,5.404,2.522,10.731,6.047,15.373l141.135,185.91 c5.803,7.648,14.851,12.136,24.447,12.136c9.601-0.004,18.646-4.496,24.447-12.14l141.093-185.897 c3.528-4.65,5.494-9.982,6.051-15.391h0.197V180.737H1798.578z M1549.299,116.448c20.854-20.855,48.578-32.339,78.07-32.339h0.004 c50.24,0,92.746,33.723,106.076,79.718h-212.19C1526.358,146.098,1535.896,129.852,1549.299,116.448z M1595.372,1502.468 l-78.413,0.005l0.005-1260.345h220.828v1260.336h-81.103l0.009-1016.486l-61.335,0.004L1595.372,1502.468z M1627.382,1695.821 l-100.171-131.963l200.338-0.004L1627.382,1695.821z"/></svg>',
'has_install' => true,
'link' => wp_nonce_url(
add_query_arg(
array(
'action' => 'install-plugin',
'plugin' => 'woocommerce-product-addon',
),
admin_url( 'update.php' )
),
'install-plugin_woocommerce-product-addon'
),
),
'sparks-wishlist' => array(
'title' => 'Wishlist',
'description' => 'Loyalize your customers by allowing them to save their favorite products.',
'icon' => '<svg width="25" height="25" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/SVG" aria-hidden="true"><path d="M60 21.25H57.5V40.125H60V21.25Z"></path><path d="M2.5 40H0V8.75C0 6.625 1.625 5 3.75 5H25V7.5H3.75C3 7.5 2.5 8 2.5 8.75V40Z"></path><path d="M56.25 51.25H3.75C1.625 51.25 0 49.625 0 47.5V42.5H25V45H2.5V47.5C2.5 48.25 3 48.75 3.75 48.75H56.25C57 48.75 57.5 48.25 57.5 47.5V43.75H60V47.5C60 49.625 58.375 51.25 56.25 51.25Z"></path><path d="M23.75 58.75H21.25V57.25L22.5 51.125V50H25V51.5L23.75 57.625V58.75Z"></path><path d="M38.75 58.75H36.25V57.625L35 51.25V50H37.5V51.125L38.75 57.5V58.75Z"></path><path d="M41.25 57.5H18.75V60H41.25V57.5Z"></path><path d="M56.25 32.5H43.75C41.625 32.5 40 30.875 40 28.75V3.75C40 1.625 41.625 0 43.75 0H56.25C58.375 0 60 1.625 60 3.75V28.75C60 30.875 58.375 32.5 56.25 32.5ZM43.75 2.5C43 2.5 42.5 3 42.5 3.75V28.75C42.5 29.5 43 30 43.75 30H56.25C57 30 57.5 29.5 57.5 28.75V3.75C57.5 3 57 2.5 56.25 2.5H43.75Z"></path><path d="M50 27.5C50.6904 27.5 51.25 26.9404 51.25 26.25C51.25 25.5596 50.6904 25 50 25C49.3096 25 48.75 25.5596 48.75 26.25C48.75 26.9404 49.3096 27.5 50 27.5Z"></path><path d="M51.25 45H31.25C29.125 45 27.5 43.375 27.5 41.25V8.75C27.5 6.625 29.125 5 31.25 5H37.5V7.5H31.25C30.5 7.5 30 8 30 8.75V41.25C30 42 30.5 42.5 31.25 42.5H51.25C52 42.5 52.5 42 52.5 41.25V35H55V41.25C55 43.375 53.375 45 51.25 45Z"></path><path d="M41.25 40C41.9404 40 42.5 39.4404 42.5 38.75C42.5 38.0596 41.9404 37.5 41.25 37.5C40.5596 37.5 40 38.0596 40 38.75C40 39.4404 40.5596 40 41.25 40Z"></path><path d="M21.75 40H18.25L13.25 35H11.75L6.75 40H0V37.5H5.75L10.75 32.5H14.25L19.25 37.5H20.75L52.875 5.375L54.625 7.125L21.75 40Z"></path><path d="M55 11.25H52.5V7.5H48.75V5H55V11.25Z"></path><defs><clip-path id="clip0"><rect width="60" height="60" fill="white"></rect></clip-path></defs></svg>',
'link' => tsdk_utmify( 'https://themeisle.com/plugins/sparks-for-woocommerce/', 'promo', 'products-tabs' ),
),
'sparks-announcement' => array(
'title' => 'Multi-Announcement Bars',
'description' => 'Add a top notification bar on your website to highlight the latest products, offers, or upcoming events.',
'icon' => '<svg width="25" height="25" viewBox="0 0 60 61" fill="none" xmlns="http://www.w3.org/2000/SVG" aria-hidden="true"><path d="M30 8.89282C29.6685 8.89282 29.3505 8.76113 29.1161 8.52671C28.8817 8.29228 28.75 7.97434 28.75 7.64282V1.39282C28.75 1.0613 28.8817 0.743359 29.1161 0.508939C29.3505 0.274518 29.6685 0.142822 30 0.142822C30.3315 0.142822 30.6495 0.274518 30.8839 0.508939C31.1183 0.743359 31.25 1.0613 31.25 1.39282V7.64282C31.25 7.97434 31.1183 8.29228 30.8839 8.52671C30.6495 8.76113 30.3315 8.89282 30 8.89282Z"></path><path d="M30 21.9105L26.25 18.1605V7.82598L26.9409 7.47992C27.8914 7.00723 28.9385 6.76123 30 6.76123C31.0615 6.76123 32.1086 7.00723 33.0591 7.47992L33.75 7.82598V18.1605L30 21.9105ZM28.75 17.1253L30 18.3753L31.25 17.1253V9.44219C30.4344 9.19928 29.5656 9.19928 28.75 9.44219V17.1253Z"></path><path d="M60 60.1428H0V22.6428H17.5C17.8315 22.6428 18.1495 22.7745 18.3839 23.0089C18.6183 23.2434 18.75 23.5613 18.75 23.8928C18.75 24.2243 18.6183 24.5423 18.3839 24.7767C18.1495 25.0111 17.8315 25.1428 17.5 25.1428H2.5V57.6428H57.5V25.1428H42.5C42.1685 25.1428 41.8505 25.0111 41.6161 24.7767C41.3817 24.5423 41.25 24.2243 41.25 23.8928C41.25 23.5613 41.3817 23.2434 41.6161 23.0089C41.8505 22.7745 42.1685 22.6428 42.5 22.6428H60V60.1428Z"></path><path d="M11.2493 53.8933C11.0421 53.8929 10.8383 53.841 10.6561 53.7424C10.474 53.6438 10.3191 53.5015 10.2055 53.3283C10.0919 53.1551 10.0231 52.9564 10.0052 52.75C9.98727 52.5436 10.0209 52.336 10.103 52.1458L26.353 14.6459C26.4182 14.4953 26.5125 14.359 26.6304 14.2448C26.7483 14.1306 26.8876 14.0408 27.0402 13.9804C27.1928 13.9201 27.3559 13.8903 27.52 13.893C27.6841 13.8956 27.8461 13.9306 27.9967 13.9958C28.1473 14.0611 28.2836 14.1553 28.3978 14.2732C28.5119 14.3912 28.6018 14.5304 28.6621 14.683C28.7225 14.8357 28.7522 14.9987 28.7496 15.1628C28.7469 15.3269 28.712 15.4889 28.6467 15.6395L12.3967 53.1395C12.2999 53.3634 12.1397 53.5541 11.9358 53.6881C11.7319 53.822 11.4932 53.8934 11.2493 53.8933Z"></path><path d="M48.7505 53.8935C48.5065 53.8935 48.2679 53.8222 48.064 53.6883C47.8601 53.5543 47.6999 53.3637 47.603 53.1398L31.353 15.6398C31.2212 15.3356 31.2157 14.9915 31.3376 14.6833C31.4595 14.375 31.6989 14.1278 32.003 13.9961C32.3072 13.8643 32.6513 13.8588 32.9595 13.9807C33.2678 14.1026 33.515 14.3419 33.6467 14.6461L49.8967 52.1461C49.9789 52.3363 50.0125 52.5439 49.9946 52.7503C49.9767 52.9566 49.9078 53.1553 49.7942 53.3285C49.6806 53.5018 49.5258 53.6441 49.3436 53.7427C49.1614 53.8413 48.9576 53.8932 48.7505 53.8936V53.8935Z"></path><path d="M30 33.8928C29.6685 33.8928 29.3505 33.7611 29.1161 33.5267C28.8817 33.2923 28.75 32.9743 28.75 32.6428V25.1428C28.75 24.8113 28.8817 24.4934 29.1161 24.2589C29.3505 24.0245 29.6685 23.8928 30 23.8928C30.3315 23.8928 30.6495 24.0245 30.8839 24.2589C31.1183 24.4934 31.25 24.8113 31.25 25.1428V32.6428C31.25 32.9743 31.1183 33.2923 30.8839 33.5267C30.6495 33.7611 30.3315 33.8928 30 33.8928Z"></path><path d="M45 30.1428H15C14.6685 30.1428 14.3505 30.0111 14.1161 29.7767C13.8817 29.5423 13.75 29.2243 13.75 28.8928C13.75 28.5613 13.8817 28.2434 14.1161 28.0089C14.3505 27.7745 14.6685 27.6428 15 27.6428H45C45.3315 27.6428 45.6495 27.7745 45.8839 28.0089C46.1183 28.2434 46.25 28.5613 46.25 28.8928C46.25 29.2243 46.1183 29.5423 45.8839 29.7767C45.6495 30.0111 45.3315 30.1428 45 30.1428Z"></path><defs><clip-path id="clip0"><rect width="60" height="60" fill="white" transform="translate(0 0.142822)"></rect></clip-path></defs></svg>',
'link' => tsdk_utmify( 'https://themeisle.com/plugins/sparks-for-woocommerce/', 'promo', 'products-tabs' ),
),
'sparks-product-review' => array(
'title' => 'Advanced Product Review',
'description' => 'Enable an advanced review section, enlarging the basic review options with lots of capabilities.',
'icon' => '<svg width="25" height="25" viewBox="0 0 60 61" fill="none" xmlns="http://www.w3.org/2000/SVG" aria-hidden="true"><path d="M58.75 54.1797H1.25C1.08584 54.1797 0.923271 54.1474 0.771595 54.0846C0.619919 54.0218 0.482103 53.9297 0.366021 53.8137C0.24994 53.6976 0.157867 53.5598 0.0950637 53.4081C0.0322604 53.2564 -4.26571e-05 53.0939 4.22759e-08 52.9297V6.67969C-4.26571e-05 6.51552 0.0322604 6.35296 0.0950637 6.20128C0.157867 6.04961 0.24994 5.91179 0.366021 5.79571C0.482103 5.67963 0.619919 5.58755 0.771595 5.52475C0.923271 5.46195 1.08584 5.42964 1.25 5.42969H58.75C58.9142 5.42964 59.0767 5.46195 59.2284 5.52475C59.3801 5.58755 59.5179 5.67963 59.634 5.79571C59.7501 5.91179 59.8421 6.04961 59.9049 6.20128C59.9677 6.35296 60 6.51552 60 6.67969V52.9297C60 53.0939 59.9677 53.2564 59.9049 53.4081C59.8421 53.5598 59.7501 53.6976 59.634 53.8137C59.5179 53.9297 59.3801 54.0218 59.2284 54.0846C59.0767 54.1474 58.9142 54.1797 58.75 54.1797ZM2.5 51.6797H57.5V7.92969H2.5V51.6797Z"></path><path d="M6.25 15.4297C6.94036 15.4297 7.5 14.87 7.5 14.1797C7.5 13.4893 6.94036 12.9297 6.25 12.9297C5.55964 12.9297 5 13.4893 5 14.1797C5 14.87 5.55964 15.4297 6.25 15.4297Z"></path><path d="M10 15.4297C10.6904 15.4297 11.25 14.87 11.25 14.1797C11.25 13.4893 10.6904 12.9297 10 12.9297C9.30964 12.9297 8.75 13.4893 8.75 14.1797C8.75 14.87 9.30964 15.4297 10 15.4297Z"></path><path d="M13.75 15.4297C14.4404 15.4297 15 14.87 15 14.1797C15 13.4893 14.4404 12.9297 13.75 12.9297C13.0596 12.9297 12.5 13.4893 12.5 14.1797C12.5 14.87 13.0596 15.4297 13.75 15.4297Z"></path><path d="M58.75 15.4297H18.75C18.4185 15.4297 18.1005 15.298 17.8661 15.0636C17.6317 14.8292 17.5 14.5112 17.5 14.1797C17.5 13.8482 17.6317 13.5302 17.8661 13.2958C18.1005 13.0614 18.4185 12.9297 18.75 12.9297H58.75C59.0815 12.9297 59.3995 13.0614 59.6339 13.2958C59.8683 13.5302 60 13.8482 60 14.1797C60 14.5112 59.8683 14.8292 59.6339 15.0636C59.3995 15.298 59.0815 15.4297 58.75 15.4297Z"></path><path d="M28.7502 37.9297C28.4187 37.9295 28.1009 37.7978 27.8664 37.5634L24.4289 34.1259C24.198 33.8908 24.0693 33.574 24.0708 33.2445C24.0723 32.915 24.2039 32.5994 24.4369 32.3664C24.6699 32.1334 24.9855 32.0018 25.315 32.0003C25.6445 31.9988 25.9613 32.1275 26.1964 32.3584L28.6977 34.8597L38.8588 23.4522C38.968 23.3296 39.1002 23.2298 39.2479 23.1583C39.3957 23.0869 39.5561 23.0452 39.7199 23.0358C39.8838 23.0263 40.0479 23.0492 40.2029 23.1032C40.3579 23.1571 40.5008 23.2411 40.6233 23.3503C40.7459 23.4594 40.8457 23.5917 40.9172 23.7394C40.9886 23.8872 41.0303 24.0476 41.0397 24.2114C41.0492 24.3753 41.0263 24.5394 40.9723 24.6944C40.9184 24.8494 40.8344 24.9922 40.7253 25.1148L29.6834 37.511C29.5702 37.6382 29.4322 37.7409 29.2779 37.8129C29.1237 37.8849 28.9563 37.9247 28.7862 37.9298L28.7502 37.9297Z"></path><path d="M29.977 44.1812C28.3217 44.1775 26.6876 43.8085 25.1912 43.1007C23.6948 42.3928 22.3731 41.3635 21.3203 40.0861C20.2675 38.8087 19.5095 37.3148 19.1004 35.7108C18.6913 34.1068 18.6413 32.4322 18.9537 30.8067C19.2662 29.1811 19.9335 27.6445 20.9081 26.3065C21.8827 24.9684 23.1406 23.862 24.592 23.0659C26.0433 22.2699 27.6525 21.804 29.3046 21.7013C30.9568 21.5987 32.6113 21.8619 34.15 22.4722C34.4579 22.5949 34.7044 22.8349 34.8354 23.1393C34.9663 23.4438 34.9709 23.7878 34.8482 24.0957C34.7255 24.4036 34.4856 24.6501 34.1811 24.7811C33.8766 24.912 33.5326 24.9166 33.2247 24.7939C31.44 24.0862 29.472 23.985 27.6241 24.5059C25.7762 25.0269 24.1508 26.141 22.9985 27.6767C21.8462 29.2124 21.2308 31.0844 21.2473 33.0043C21.2637 34.9242 21.9111 36.7854 23.0895 38.3011C24.268 39.8168 25.9122 40.903 27.7688 41.3922C29.6254 41.8813 31.5913 41.7464 33.3637 41.0082C35.136 40.27 36.6164 38.9694 37.5768 37.3069C38.5372 35.6444 38.9242 33.7122 38.6782 31.8081C38.6568 31.6451 38.6678 31.4795 38.7104 31.3208C38.7531 31.1621 38.8267 31.0133 38.927 30.8831C39.0272 30.7528 39.1522 30.6436 39.2947 30.5617C39.4373 30.4798 39.5945 30.4268 39.7575 30.4058C39.9206 30.3848 40.0861 30.3961 40.2448 30.4391C40.4034 30.4822 40.552 30.5561 40.682 30.6566C40.8121 30.7572 40.921 30.8824 41.0026 31.0251C41.0842 31.1678 41.1368 31.3252 41.1574 31.4883C41.3469 32.9535 41.2459 34.4417 40.8602 35.8679C40.4745 37.294 39.8116 38.6303 38.9094 39.8002C38.0072 40.9702 36.8834 41.9509 35.6021 42.6865C34.3208 43.4221 32.9071 43.898 31.4419 44.0872C30.9561 44.1494 30.4668 44.1807 29.977 44.1812Z"></path><defs><clip-path id="clip0"><rect width="60" height="60" fill="white" transform="translate(0 0.429688)"></rect></clip-path></defs></svg>',
'link' => tsdk_utmify( 'https://themeisle.com/plugins/sparks-for-woocommerce/', 'promo', 'products-tabs' ),
),
);
// Check if $this-promotions isn't empty and has one of the items to load.
$can_load = ! empty( $this->promotions ) && count( array_intersect( $this->promotions, array_keys( $this->woo_promos ) ) ) > 0;
if ( ! $can_load && ! $this->debug ) {
return;
}
add_action(
'woocommerce_product_data_tabs',
function( $tabs ) {
$tabs['tisdk-suggestions'] = array(
'label' => 'More extensions from Themeisle',
'target' => 'tisdk_suggestions',
'class' => array(),
'priority' => 1000,
);
return $tabs;
}
);
add_action( 'woocommerce_product_data_panels', array( $this, 'woocommerce_tab_content' ) );
}
/**
* WooCommerce Tab Content.
*/
public function woocommerce_tab_content() {
// Filter content based on if the key exists in $this->promotions array.
$content = array_filter(
$this->woo_promos,
function( $key ) {
return in_array( $key, $this->promotions, true );
},
ARRAY_FILTER_USE_KEY
);
// Display CSS
self::render_woo_tabs_css();
self::render_notice_dismiss_ajax();
?>
<div id="tisdk_suggestions" class="panel woocommerce_options_panel hidden">
<div class="tisdk-suggestions-header">
<h4>Recommended extensions</h4>
</div>
<div class="tisdk-suggestions-content">
<?php foreach ( $content as $key => $item ) : ?>
<div class="tisdk-suggestion" id="<?php echo esc_attr( $key ); ?>">
<?php if ( isset( $item['icon'] ) ) : ?>
<div class="tisdk-suggestion-icon">
<?php echo $item['icon']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
</div>
<?php endif; ?>
<div class="tisdk-suggestion-content">
<h4><?php echo esc_html( $item['title'] ); ?></h4>
<p><?php echo esc_html( $item['description'] ); ?></p>
</div>
<div class="tisdk-suggestion-cta">
<a href="<?php echo esc_url( $item['link'] ); ?>" target="blank" class="button">
<?php echo ( ( isset( $item['has_install'] ) && $item['has_install'] ) ? 'Install' : 'Learn More' ); ?>
</a>
<a class="suggestion-dismiss" title="Dismiss this suggestion" href="#"></a>
</div>
</div>
<?php endforeach; ?>
</div>
</div>
<?php
}
/**
* CSS for WooCommerce Tabs
*/
public static function render_woo_tabs_css() {
$icon = 'M208 88.286c0-10 6.286-21.714 17.715-21.714 11.142 0 17.714 11.714 17.714 21.714 0 10.285-6.572 21.714-17.714 21.714C214.286 110 208 98.571 208 88.286zm304 160c0 36.001-11.429 102.286-36.286 129.714-22.858 24.858-87.428 61.143-120.857 70.572l-1.143.286v32.571c0 16.286-12.572 30.571-29.143 30.571-10 0-19.429-5.714-24.572-14.286-5.427 8.572-14.856 14.286-24.856 14.286-10 0-19.429-5.714-24.858-14.286-5.142 8.572-14.571 14.286-24.57 14.286-10.286 0-19.429-5.714-24.858-14.286-5.143 8.572-14.571 14.286-24.571 14.286-18.857 0-29.429-15.714-29.429-32.857-16.286 12.285-35.715 19.428-56.571 19.428-22 0-43.429-8.285-60.286-22.857 10.285-.286 20.571-2.286 30.285-5.714-20.857-5.714-39.428-18.857-52-36.286 21.37 4.645 46.209 1.673 67.143-11.143-22-22-56.571-58.857-68.572-87.428C1.143 321.714 0 303.714 0 289.429c0-49.714 20.286-160 86.286-160 10.571 0 18.857 4.858 23.143 14.857a158.792 158.792 0 0 1 12-15.428c2-2.572 5.714-5.429 7.143-8.286 7.999-12.571 11.714-21.142 21.714-34C182.571 45.428 232 17.143 285.143 17.143c6 0 12 .285 17.714 1.143C313.714 6.571 328.857 0 344.572 0c14.571 0 29.714 6 40 16.286.857.858 1.428 2.286 1.428 3.428 0 3.714-10.285 13.429-12.857 16.286 4.286 1.429 15.714 6.858 15.714 12 0 2.857-2.857 5.143-4.571 7.143 31.429 27.714 49.429 67.143 56.286 108 4.286-5.143 10.285-8.572 17.143-8.572 10.571 0 20.857 7.144 28.571 14.001C507.143 187.143 512 221.714 512 248.286zM188 89.428c0 18.286 12.571 37.143 32.286 37.143 19.714 0 32.285-18.857 32.285-37.143 0-18-12.571-36.857-32.285-36.857-19.715 0-32.286 18.858-32.286 36.857zM237.714 194c0-19.714 3.714-39.143 8.571-58.286-52.039 79.534-13.531 184.571 68.858 184.571 21.428 0 42.571-7.714 60-20 2-7.429 3.714-14.857 3.714-22.572 0-14.286-6.286-21.428-20.572-21.428-4.571 0-9.143.857-13.429 1.714-63.343 12.668-107.142 3.669-107.142-63.999zm-41.142 254.858c0-11.143-8.858-20.857-20.286-20.857-11.429 0-20 9.715-20 20.857v32.571c0 11.143 8.571 21.142 20 21.142 11.428 0 20.286-9.715 20.286-21.142v-32.571zm49.143 0c0-11.143-8.572-20.857-20-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20-10 20-21.142v-32.571zm49.713 0c0-11.143-8.857-20.857-20.285-20.857-11.429 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.857 21.142 20.286 21.142 11.428 0 20.285-9.715 20.285-21.142v-32.571zm49.715 0c0-11.143-8.857-20.857-20.286-20.857-11.428 0-20.286 9.715-20.286 20.857v32.571c0 11.143 8.858 21.142 20.286 21.142 11.429 0 20.286-10 20.286-21.142v-32.571zM421.714 286c-30.857 59.142-90.285 102.572-158.571 102.572-96.571 0-160.571-84.572-160.571-176.572 0-16.857 2-33.429 6-49.714-20 33.715-29.714 72.572-29.714 111.429 0 60.286 24.857 121.715 71.429 160.857 5.143-9.714 14.857-16.286 26-16.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.571-14.286 24.858-14.286 10 0 19.428 5.714 24.571 14.286 5.429-8.571 14.857-14.286 24.858-14.286 10 0 19.428 5.714 24.857 14.286 5.143-8.571 14.571-14.286 24.572-14.286 10.857 0 20.857 6.572 25.714 16 43.427-36.286 68.569-92 71.426-148.286zm10.572-99.714c0-53.714-34.571-105.714-92.572-105.714-30.285 0-58.571 15.143-78.857 36.857C240.862 183.812 233.41 254 302.286 254c28.805 0 97.357-28.538 84.286 36.857 28.857-26 45.714-65.714 45.714-104.571z';
?>
<style>
.tisdk-suggestions_options a {
display: flex !important;
align-items: center;
}
.tisdk-suggestions_options a::before {
content: url("data:image/svg+xml,%3Csvg fill='%23135e96' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='<?php echo esc_attr( $icon ); ?>'/%3E%3C/svg%3E") !important;
min-width: 13px;
max-width: 13px;
margin: auto;
}
.tisdk-suggestions_options.active a::before {
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='<?php echo esc_attr( $icon ); ?>'/%3E%3C/svg%3E") !important;
}
.tisdk-suggestions-header {
padding: 1em 1.5em;
border-bottom: 1px solid #eee;
}
.tisdk-suggestions-header h4 {
font-size: 1.1em;
margin: 0;
}
.tisdk-suggestion {
display: flex;
align-items: center;
flex-direction: row;
padding: 1em 1.5em;
}
.tisdk-suggestion-icon {
height: 40px;
margin: 0;
margin-right: 0px;
margin-right: 1.5em;
flex: 0 0 40px;
background: #966ccf;
display: flex;
justify-content: center;
border-radius: 100%;
align-items: center;
padding: 5px;
}
.tisdk-suggestion-icon svg {
fill: #fff;
}
.tisdk-suggestion-content {
flex: 1 1 60%;
}
.tisdk-suggestion-content h4 {
margin: 0;
}
.tisdk-suggestion-content p {
margin: 0;
margin-top: 4px;
padding: 0;
line-height: 1.5;
}
.tisdk-suggestion-cta {
flex: 1 1 30%;
min-width: 160px;
text-align: right;
}
.tisdk-suggestion-cta .button {
display: inline-block;
min-width: 120px;
text-align: center;
margin: 0;
}
.tisdk-suggestion-cta .suggestion-dismiss {
position: relative;
top: 5px;
right: auto;
margin-left: 1em;
text-decoration: none;
}
</style>
<?php
}
/**
* JS for Dismissing Notice
*/
public static function render_notice_dismiss_ajax() {
?>
<script>
jQuery(document).ready(function($) {
// AJAX request to update the option value
$( '.tisdk-suggestion .suggestion-dismiss' ).click(function(e) {
e.preventDefault();
var suggestion = $(this).closest( '.tisdk-suggestion' );
var value = suggestion.attr('id');
var nonce = '<?php echo esc_attr( wp_create_nonce( 'tisdk_update_option' ) ); ?>';
$.ajax({
url: window.ajaxurl,
type: 'POST',
data: {
action: 'tisdk_update_option',
value,
nonce
},
complete() {
suggestion.remove();
// If element with .tisdk-suggestions-content has no children, hide the whole panel. Skip if the selector doesn't exist.
if ( $( '.tisdk-suggestions-content' ).length && ! $( '.tisdk-suggestions-content' ).children().length ) {
$( '.tisdk-suggestions_options' ).remove();
$( '#tisdk_suggestions' ).remove();
$( '.general_options' ).addClass( 'active' );
$( '#general_product_data' ).css( 'display', 'block' );
}
}
});
});
});
</script>
<?php
}
/**
* Update the option value using AJAX
*/
public function dismiss_promotion() {
if ( ! isset( $_POST['nonce'] ) || ! isset( $_POST['value'] ) ) {
$response = array(
'success' => false,
'message' => 'Missing nonce or value.',
);
wp_send_json( $response );
wp_die();
}
$nonce = sanitize_text_field( $_POST['nonce'] );
$value = sanitize_text_field( $_POST['value'] );
if ( ! wp_verify_nonce( $nonce, 'tisdk_update_option' ) ) {
$response = array(
'success' => false,
'message' => 'Invalid nonce.',
);
wp_send_json( $response );
wp_die();
}
$options = get_option( $this->option_main );
$options = json_decode( $options, true );
$options[ $value ] = time();
update_option( $this->option_main, wp_json_encode( $options ) );
$response = array(
'success' => true,
);
wp_send_json( $response );
wp_die();
}
}

View File

@ -238,49 +238,6 @@ class Recommendation extends Abstract_Module {
return $list;
}
/**
* Call plugin api
*
* @param string $slug plugin slug.
*
* @return array|mixed|object
*/
private function call_plugin_api( $slug ) {
include_once ABSPATH . 'wp-admin/includes/plugin-install.php';
$call_api = get_transient( 'ti_plugin_info_' . $slug );
if ( false === $call_api ) {
$call_api = plugins_api(
'plugin_information',
array(
'slug' => $slug,
'fields' => array(
'downloaded' => false,
'rating' => false,
'description' => false,
'short_description' => true,
'donate_link' => false,
'tags' => false,
'sections' => true,
'homepage' => true,
'added' => false,
'last_updated' => false,
'compatibility' => false,
'tested' => false,
'requires' => false,
'downloadlink' => false,
'icons' => true,
'banners' => true,
),
)
);
set_transient( 'ti_plugin_info_' . $slug, $call_api, 30 * MINUTE_IN_SECONDS );
}
return $call_api;
}
/**
* Load css and scripts for the plugin recommend page.
*/

View File

@ -0,0 +1,193 @@
<?php
/**
* The welcome model class for ThemeIsle SDK
*
* Here's how to hook it in your plugin or theme:
* ```php
* add_filter( '<product_slug>_welcome_metadata', function() {
* return [
* 'is_enabled' => <condition_if_pro_available>,
* 'pro_name' => 'Product PRO name',
* 'logo' => '<path_to_logo>',
* 'cta_link' => tsdk_utmify( 'https://link_to_upgrade.with/?discount=<discountCode>')
* ];
* } );
* ```
*
* @package ThemeIsleSDK
* @subpackage Modules
* @copyright Copyright (c) 2023, Bogdan Preda
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
* @since 1.0.0
*/
namespace ThemeisleSDK\Modules;
// Exit if accessed directly.
use ThemeisleSDK\Common\Abstract_Module;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Promotions module for ThemeIsle SDK.
*/
class Welcome extends Abstract_Module {
/**
* Debug mode.
*
* @var bool
*/
private $debug = false;
/**
* Welcome metadata.
*
* @var array
*/
private $welcome_discounts = array();
/**
* Check that we can load this module.
*
* @param \ThemeisleSDK\Product $product The product.
*
* @return bool
*/
public function can_load( $product ) {
$this->debug = apply_filters( 'themeisle_sdk_welcome_debug', $this->debug );
$welcome_metadata = apply_filters( $product->get_key() . '_welcome_metadata', array() );
$is_welcome_enabled = $this->is_welcome_meta_valid( $welcome_metadata );
if ( $is_welcome_enabled ) {
$this->welcome_discounts[ $product->get_key() ] = $welcome_metadata;
}
return $this->debug || $is_welcome_enabled;
}
/**
* Check that the metadata is valid and the welcome is enabled.
*
* @param array $welcome_metadata The metadata to validate.
*
* @return bool
*/
private function is_welcome_meta_valid( $welcome_metadata ) {
return ! empty( $welcome_metadata ) && isset( $welcome_metadata['is_enabled'] ) && $welcome_metadata['is_enabled'];
}
/**
* Load the module.
*
* @param \ThemeisleSDK\Product $product The product.
*
* @return $this
*/
public function load( $product ) {
if ( ! current_user_can( 'install_plugins' ) ) {
return;
}
$this->product = $product;
if ( ! $this->is_time_to_show_welcome() && $this->debug === false ) {
return;
}
add_filter( 'themeisle_sdk_registered_notifications', [ $this, 'add_notification' ], 99, 1 );
return $this;
}
/**
* Check if it's time to show the welcome.
*
* @return bool
*/
private function is_time_to_show_welcome() {
// if 7 days from install have not passed, don't show the welcome.
if ( $this->product->get_install_time() + 7 * DAY_IN_SECONDS > time() ) {
return false;
}
// if 12 days from install have passed, don't show the welcome ( after 7 days for 5 days ).
if ( $this->product->get_install_time() + 12 * DAY_IN_SECONDS < time() ) {
return false;
}
return true;
}
/**
* Add the welcome notification.
* Will block all other notifications if a welcome notification is present.
*
* @return array
*/
public function add_notification( $all_notifications ) {
if ( empty( $this->welcome_discounts ) ) {
return $all_notifications;
}
if ( ! isset( $this->welcome_discounts[ $this->product->get_key() ] ) ) {
return $all_notifications;
}
// filter out the notifications that are not welcome upsells
// if we arrived here we will have at least one welcome upsell
$all_notifications = array_filter(
$all_notifications,
function( $notification ) {
return strpos( $notification['id'], '_welcome_upsell_flag' ) !== false;
}
);
$offer = $this->welcome_discounts[ $this->product->get_key() ];
$response = [];
$logo = isset( $offer['logo'] ) ? $offer['logo'] : '';
$pro_name = isset( $offer['pro_name'] ) ? $offer['pro_name'] : $this->product->get_friendly_name() . ' PRO';
$link = $offer['cta_link'];
$message = apply_filters( $this->product->get_key() . '_welcome_upsell_message', '<p>You\'ve been using <b>{product}</b> 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 <b>{pro_product}</b> in the next 5 days and receive a discount of <b>up to 30%</b>. <a href="{cta_link}" target="_blank">Upgrade now</a> and unlock all the amazing features of <b>{pro_product}</b>!</p>' );
$button_submit = apply_filters( $this->product->get_key() . '_feedback_review_button_do', 'Upgrade Now!' );
$button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', 'No, thanks.' );
$message = str_replace(
[ '{product}', '{pro_product}', '{cta_link}' ],
[
$this->product->get_friendly_name(),
$pro_name,
$link,
],
$message
);
$all_notifications[] = [
'id' => $this->product->get_key() . '_welcome_upsell_flag',
'message' => $message,
'img_src' => $logo,
'ctas' => [
'confirm' => [
'link' => $link,
'text' => $button_submit,
],
'cancel' => [
'link' => '#',
'text' => $button_cancel,
],
],
'type' => 'info',
];
$key = array_rand( $all_notifications );
$response[] = $all_notifications[ $key ];
return $response;
}
}

View File

@ -33,7 +33,9 @@ $files_to_load = [
$themeisle_library_path . '/src/Modules/Review.php',
$themeisle_library_path . '/src/Modules/Recommendation.php',
$themeisle_library_path . '/src/Modules/Promotions.php',
$themeisle_library_path . '/src/Modules/Welcome.php',
$themeisle_library_path . '/src/Modules/Compatibilities.php',
$themeisle_library_path . '/src/Modules/About_us.php',
];
$files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) );

View File

@ -45,35 +45,34 @@ class ClassLoader
/** @var \Closure(string):void */
private static $includeFile;
/** @var ?string */
/** @var string|null */
private $vendorDir;
// PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
* @var list<string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
* @var list<string>
*/
private $fallbackDirsPsr0 = array();
@ -81,8 +80,7 @@ class ClassLoader
private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
* @var array<string, string>
*/
private $classMap = array();
@ -90,21 +88,20 @@ class ClassLoader
private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
* @var array<string, bool>
*/
private $missingClasses = array();
/** @var ?string */
/** @var string|null */
private $apcuPrefix;
/**
* @var self[]
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
@ -113,7 +110,7 @@ class ClassLoader
}
/**
* @return string[]
* @return array<string, list<string>>
*/
public function getPrefixes()
{
@ -125,8 +122,7 @@ class ClassLoader
}
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
* @return array<string, list<string>>
*/
public function getPrefixesPsr4()
{
@ -134,8 +130,7 @@ class ClassLoader
}
/**
* @return array[]
* @psalm-return array<string, string>
* @return list<string>
*/
public function getFallbackDirs()
{
@ -143,8 +138,7 @@ class ClassLoader
}
/**
* @return array[]
* @psalm-return array<string, string>
* @return list<string>
*/
public function getFallbackDirsPsr4()
{
@ -152,8 +146,7 @@ class ClassLoader
}
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
* @return array<string, string> Array of classname => path
*/
public function getClassMap()
{
@ -161,8 +154,7 @@ class ClassLoader
}
/**
* @param string[] $classMap Class to filename map
* @psalm-param array<string, string> $classMap
* @param array<string, string> $classMap Class to filename map
*
* @return void
*/
@ -179,24 +171,25 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
(array) $paths,
$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
(array) $paths
$paths
);
}
@ -205,19 +198,19 @@ class ClassLoader
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = (array) $paths;
$this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
(array) $paths,
$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
(array) $paths
$paths
);
}
}
@ -226,9 +219,9 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
@ -236,17 +229,18 @@ class ClassLoader
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
(array) $paths,
$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
(array) $paths
$paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@ -256,18 +250,18 @@ class ClassLoader
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
$this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
(array) $paths,
$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
(array) $paths
$paths
);
}
}
@ -276,8 +270,8 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 base directories
*
* @return void
*/
@ -294,8 +288,8 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
@ -481,9 +475,9 @@ class ClassLoader
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
* Returns the currently registered loaders keyed by their corresponding vendor directories.
*
* @return self[]
* @return array<string, self>
*/
public static function getRegisteredLoaders()
{

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitbf1297da02d6475c76ee8fa5bb3a7c73
class ComposerAutoloaderInit98ab46cfa4e7ff3e56643c5deb70943f
{
private static $loader;
@ -22,16 +22,16 @@ class ComposerAutoloaderInitbf1297da02d6475c76ee8fa5bb3a7c73
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInitbf1297da02d6475c76ee8fa5bb3a7c73', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit98ab46cfa4e7ff3e56643c5deb70943f', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitbf1297da02d6475c76ee8fa5bb3a7c73', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit98ab46cfa4e7ff3e56643c5deb70943f', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitbf1297da02d6475c76ee8fa5bb3a7c73::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit98ab46cfa4e7ff3e56643c5deb70943f::getInitializer($loader));
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitbf1297da02d6475c76ee8fa5bb3a7c73::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit98ab46cfa4e7ff3e56643c5deb70943f::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitbf1297da02d6475c76ee8fa5bb3a7c73
class ComposerStaticInit98ab46cfa4e7ff3e56643c5deb70943f
{
public static $files = array (
'2c2d2fe92db4cd03403dbb108ac263b7' => __DIR__ . '/..' . '/codeinwp/gutenberg-menu-icons/load.php',
@ -20,7 +20,7 @@ class ComposerStaticInitbf1297da02d6475c76ee8fa5bb3a7c73
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->classMap = ComposerStaticInitbf1297da02d6475c76ee8fa5bb3a7c73::$classMap;
$loader->classMap = ComposerStaticInit98ab46cfa4e7ff3e56643c5deb70943f::$classMap;
}, null, ClassLoader::class);
}

View File

@ -2,17 +2,17 @@
"packages": [
{
"name": "codeinwp/gutenberg-menu-icons",
"version": "1.0.4",
"version_normalized": "1.0.4.0",
"version": "1.0.5",
"version_normalized": "1.0.5.0",
"source": {
"type": "git",
"url": "https://github.com/Codeinwp/gutenberg-menu-icons.git",
"reference": "121ef82c57a556301265cbd1032d28619235e488"
"reference": "fce0fae088cc85001620d83253568aeec2af51c0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeinwp/gutenberg-menu-icons/zipball/121ef82c57a556301265cbd1032d28619235e488",
"reference": "121ef82c57a556301265cbd1032d28619235e488",
"url": "https://api.github.com/repos/Codeinwp/gutenberg-menu-icons/zipball/fce0fae088cc85001620d83253568aeec2af51c0",
"reference": "fce0fae088cc85001620d83253568aeec2af51c0",
"shasum": ""
},
"require-dev": {
@ -22,7 +22,7 @@
"squizlabs/php_codesniffer": "^3.3",
"wp-coding-standards/wpcs": "^1"
},
"time": "2020-05-17T21:08:46+00:00",
"time": "2021-06-23T20:23:12+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@ -43,10 +43,7 @@
],
"description": "Menu Icons for Gutenberg",
"homepage": "https://github.com/Codeinwp/gutenberg-menu-icons",
"support": {
"issues": "https://github.com/Codeinwp/gutenberg-menu-icons/issues",
"source": "https://github.com/Codeinwp/gutenberg-menu-icons/tree/v1.0.4"
},
"abandoned": true,
"install-path": "../codeinwp/gutenberg-menu-icons"
},
{
@ -71,7 +68,6 @@
"wp-coding-standards/wpcs": "^0.10.0"
},
"time": "2021-05-05T18:52:26+00:00",
"default-branch": true,
"type": "wordpress-plugin",
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",
@ -90,9 +86,6 @@
"plugin",
"wordpress"
],
"support": {
"source": "https://github.com/Codeinwp/icon-picker/tree/master"
},
"install-path": "../codeinwp/icon-picker"
},
{
@ -117,7 +110,6 @@
"wp-coding-standards/wpcs": "^0.10.0"
},
"time": "2021-05-05T18:49:57+00:00",
"default-branch": true,
"type": "wordpress-plugin",
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",
@ -132,30 +124,27 @@
"plugin",
"wordpress"
],
"support": {
"source": "https://github.com/Codeinwp/menu-item-custom-fields/tree/master"
},
"install-path": "../codeinwp/menu-item-custom-fields"
},
{
"name": "codeinwp/themeisle-sdk",
"version": "3.2.40",
"version_normalized": "3.2.40.0",
"version": "3.3.1",
"version_normalized": "3.3.1.0",
"source": {
"type": "git",
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
"reference": "d719fff89cb6643e555f5e3daa4ebd627ccb4fd7"
"reference": "efb66935e69935b21ad99b0e55484e611ce4549d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/d719fff89cb6643e555f5e3daa4ebd627ccb4fd7",
"reference": "d719fff89cb6643e555f5e3daa4ebd627ccb4fd7",
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/efb66935e69935b21ad99b0e55484e611ce4549d",
"reference": "efb66935e69935b21ad99b0e55484e611ce4549d",
"shasum": ""
},
"require-dev": {
"codeinwp/phpcs-ruleset": "dev-main"
},
"time": "2023-03-30T09:29:30+00:00",
"time": "2023-06-21T06:55:46+00:00",
"type": "library",
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",
@ -174,10 +163,6 @@
"keywords": [
"wordpress"
],
"support": {
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.40"
},
"install-path": "../codeinwp/themeisle-sdk"
}
],

View File

@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'codeinwp/wp-menu-icons',
'pretty_version' => 'v0.13.5',
'version' => '0.13.5.0',
'reference' => '90e8cdc9710ce66bc735545ccea2bd5048d7f2f6',
'pretty_version' => 'v0.13.6',
'version' => '0.13.6.0',
'reference' => 'fd9b0de0423292fd9404f53beed66a72e5b0c2d5',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@ -11,9 +11,9 @@
),
'versions' => array(
'codeinwp/gutenberg-menu-icons' => array(
'pretty_version' => '1.0.4',
'version' => '1.0.4.0',
'reference' => '121ef82c57a556301265cbd1032d28619235e488',
'pretty_version' => '1.0.5',
'version' => '1.0.5.0',
'reference' => 'fce0fae088cc85001620d83253568aeec2af51c0',
'type' => 'library',
'install_path' => __DIR__ . '/../codeinwp/gutenberg-menu-icons',
'aliases' => array(),
@ -25,9 +25,7 @@
'reference' => '0c60ce3a41653e41a20e710c4d5a6a2104c85020',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../codeinwp/icon-picker',
'aliases' => array(
0 => '9999999-dev',
),
'aliases' => array(),
'dev_requirement' => false,
),
'codeinwp/menu-item-custom-fields' => array(
@ -36,24 +34,22 @@
'reference' => 'f491fcfa873e92006e3d92a4ede8775e9cf53bae',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../codeinwp/menu-item-custom-fields',
'aliases' => array(
0 => '9999999-dev',
),
'aliases' => array(),
'dev_requirement' => false,
),
'codeinwp/themeisle-sdk' => array(
'pretty_version' => '3.2.40',
'version' => '3.2.40.0',
'reference' => 'd719fff89cb6643e555f5e3daa4ebd627ccb4fd7',
'pretty_version' => '3.3.1',
'version' => '3.3.1.0',
'reference' => 'efb66935e69935b21ad99b0e55484e611ce4549d',
'type' => 'library',
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
'aliases' => array(),
'dev_requirement' => false,
),
'codeinwp/wp-menu-icons' => array(
'pretty_version' => 'v0.13.5',
'version' => '0.13.5.0',
'reference' => '90e8cdc9710ce66bc735545ccea2bd5048d7f2f6',
'pretty_version' => 'v0.13.6',
'version' => '0.13.6.0',
'reference' => 'fd9b0de0423292fd9404f53beed66a72e5b0c2d5',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),