diff --git a/wp-content/plugins/menu-icons/CHANGELOG.md b/wp-content/plugins/menu-icons/CHANGELOG.md index 20d17f01..470c9cd1 100644 --- a/wp-content/plugins/menu-icons/CHANGELOG.md +++ b/wp-content/plugins/menu-icons/CHANGELOG.md @@ -1,3 +1,29 @@ +##### [Version 0.13.23](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.22...v0.13.23) (2026-04-23) + +- Fixed issue with SVG menu icons rendering too small +- Fixed issue with vertical alignment not working on frontend + +##### [Version 0.13.22](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.21...v0.13.22) (2026-04-09) + +- Updated dependencies + +##### [Version 0.13.21](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.20...v0.13.21) (2026-02-03) + +- Enhanced security + +##### [Version 0.13.20](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.19...v0.13.20) (2025-12-15) + +- Fixed compatibility with PHP 8.1+ versions +- Updated dependencies + +##### [Version 0.13.19](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.18...v0.13.19) (2025-09-05) + +- Updated dependencies + +##### [Version 0.13.18](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.17...v0.13.18) (2025-05-23) + +- Updated dependencies + ##### [Version 0.13.17](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.16...v0.13.17) (2025-04-17) - Updated dependencies diff --git a/wp-content/plugins/menu-icons/includes/front.php b/wp-content/plugins/menu-icons/includes/front.php index a411d97e..2ae6c1ec 100644 --- a/wp-content/plugins/menu-icons/includes/front.php +++ b/wp-content/plugins/menu-icons/includes/front.php @@ -51,6 +51,19 @@ final class Menu_Icons_Front_End { */ protected static $hidden_label_class = 'visuallyhidden'; + /** + * Align-self map for vertical-align values. + * + * @access private + * @var array + */ + private static $align_self_map = array( + 'top' => 'flex-start', + 'middle' => 'center', + 'bottom' => 'flex-end', + 'baseline' => 'baseline', + ); + /** * Add hooks for front-end functionalities @@ -339,6 +352,18 @@ final class Menu_Icons_Front_End { $rule = self::$default_style[ $key ]; + // Special handling for vertical-align because it affects the layout of flex containers. + if ( 'vertical_align' === $key ) { + if ( ! isset( $meta[ $key ] ) || $meta[ $key ] === $rule['value'] ) { + continue; + } + + $stored = $meta[ $key ]; + $style_a[ $rule['property'] ] = $stored; + $style_a['align-self'] = isset( self::$align_self_map[ $stored ] ) ? self::$align_self_map[ $stored ] : 'center'; + continue; + } + if ( ! isset( $meta[ $key ] ) || $meta[ $key ] === $rule['value'] ) { continue; } @@ -355,13 +380,13 @@ final class Menu_Icons_Front_End { return $style_s; } - foreach ( $style_a as $key => $value ) { - $style_s .= "{$key}:{$value};"; + foreach ( $style_a as $prop => $value ) { + $style_s .= "{$prop}:{$value};"; } $style_s = esc_attr( $style_s ); - if ( $as_attribute ) { + if ( $as_attribute ) { $style_s = sprintf( ' style="%s"', $style_s ); } @@ -483,10 +508,10 @@ final class Menu_Icons_Front_End { } } if ( ! empty( $width ) ) { - $width = sprintf( ' width="%d"', $width ); + $width = sprintf( ' width="%d"', esc_attr( $width ) ); } if ( ! empty( $height ) ) { - $height = sprintf( ' height="%d"', $height ); + $height = sprintf( ' height="%d"', esc_attr( $height ) ); } $image_alt = get_post_meta( $meta['icon'], '_wp_attachment_image_alt', true ); $image_alt = $image_alt ? wp_strip_all_tags( $image_alt ) : ''; @@ -494,7 +519,7 @@ final class Menu_Icons_Front_End { '', esc_url( wp_get_attachment_url( $meta['icon'] ) ), esc_attr( $classes ), - $image_alt, + esc_attr( $image_alt ), $width, $height, $style diff --git a/wp-content/plugins/menu-icons/includes/library/font-awesome/font-awesome.php b/wp-content/plugins/menu-icons/includes/library/font-awesome/font-awesome.php index 3f674bf4..234ab453 100644 --- a/wp-content/plugins/menu-icons/includes/library/font-awesome/font-awesome.php +++ b/wp-content/plugins/menu-icons/includes/library/font-awesome/font-awesome.php @@ -113,7 +113,7 @@ final class Menu_Icons_Font_Awesome {
', - esc_attr__( 'Deselect', 'icon-picker' ) + esc_attr__( 'Deselect', 'menu-icons' ) ), ); diff --git a/wp-content/plugins/menu-icons/includes/library/form-fields.php b/wp-content/plugins/menu-icons/includes/library/form-fields.php index a63962ce..fa778afc 100644 --- a/wp-content/plugins/menu-icons/includes/library/form-fields.php +++ b/wp-content/plugins/menu-icons/includes/library/form-fields.php @@ -75,6 +75,15 @@ abstract class Kucrut_Form_Field { 'multiple', ); + /** + * URL path to this directory + * + * @since 0.1.0 + * @var string + * @access protected + */ + protected static $url_path; + /** * Holds allowed html tags * @@ -114,6 +123,15 @@ abstract class Kucrut_Form_Field { */ protected $attributes = array(); + /** + * Holds field arguments + * + * @since 0.1.0 + * @var stdClass + * @access protected + */ + protected $args; + /** * Loader @@ -149,6 +167,7 @@ abstract class Kucrut_Form_Field { ) { trigger_error( sprintf( + // translators: %1$s - the name of the class, %2$s - the type of the field. esc_html__( '%1$s: Type %2$s is not supported, reverting to text.', 'menu-icons' ), __CLASS__, esc_html( $field['type'] ) @@ -384,6 +403,13 @@ class Kucrut_Form_Field_Textarea extends Kucrut_Form_Field { ); + protected function set_properties() { + if ( ! is_string( $this->field['value'] ) ) { + $this->field['value'] = ''; + } + } + + public function render() { printf( // WPCS: XSS ok. $this->template, diff --git a/wp-content/plugins/menu-icons/includes/meta.php b/wp-content/plugins/menu-icons/includes/meta.php index fd8563dc..51c8d0fa 100644 --- a/wp-content/plugins/menu-icons/includes/meta.php +++ b/wp-content/plugins/menu-icons/includes/meta.php @@ -103,6 +103,14 @@ final class Menu_Icons_Meta { $value['position'] = $defaults['position']; } + // Backward-compatibility: values removed in favour of align-self support. + $supported_vertical_align = array( 'top', 'middle', 'bottom', 'baseline' ); + if ( isset( $value['vertical_align'] ) && + ! in_array( $value['vertical_align'], $supported_vertical_align, true ) + ) { + $value['vertical_align'] = 'middle'; + } + if ( isset( $value['size'] ) && ! isset( $value['font_size'] ) ) { $value['font_size'] = $value['size']; unset( $value['size'] ); diff --git a/wp-content/plugins/menu-icons/includes/settings.php b/wp-content/plugins/menu-icons/includes/settings.php index aeb046dd..c7f88f4c 100644 --- a/wp-content/plugins/menu-icons/includes/settings.php +++ b/wp-content/plugins/menu-icons/includes/settings.php @@ -473,6 +473,7 @@ final class Menu_Icons_Settings { 'id' => $menu_key, 'title' => __( 'Current Menu', 'menu-icons' ), 'description' => sprintf( + // translators: %s - the name of the menu. __( '"%s" menu settings', 'menu-icons' ), apply_filters( 'single_term_title', $menu_term->name ) ), @@ -534,18 +535,10 @@ final class Menu_Icons_Settings { 'label' => __( 'Vertical Align', 'menu-icons' ), 'default' => 'middle', 'choices' => array( - array( - 'value' => 'super', - 'label' => __( 'Super', 'menu-icons' ), - ), array( 'value' => 'top', 'label' => __( 'Top', 'menu-icons' ), ), - array( - 'value' => 'text-top', - 'label' => __( 'Text Top', 'menu-icons' ), - ), array( 'value' => 'middle', 'label' => __( 'Middle', 'menu-icons' ), @@ -554,18 +547,10 @@ final class Menu_Icons_Settings { 'value' => 'baseline', 'label' => __( 'Baseline', 'menu-icons' ), ), - array( - 'value' => 'text-bottom', - 'label' => __( 'Text Bottom', 'menu-icons' ), - ), array( 'value' => 'bottom', 'label' => __( 'Bottom', 'menu-icons' ), ), - array( - 'value' => 'sub', - 'label' => __( 'Sub', 'menu-icons' ), - ), ), ), 'font_size' => array( @@ -770,6 +755,7 @@ final class Menu_Icons_Settings { 'all' => __( 'All', 'menu-icons' ), 'preview' => __( 'Preview', 'menu-icons' ), 'settingsInfo' => sprintf( + // translators: %2$s - a link to the Customizer with the label `the customizer`. '
%1$s

' . esc_html__( 'Please note that the actual look of the icons on the front-end will also be affected by the style of your active theme. You can add your own CSS using %2$s.', 'menu-icons' ) . '

', $box_data, sprintf( diff --git a/wp-content/plugins/menu-icons/menu-icons.php b/wp-content/plugins/menu-icons/menu-icons.php index 3023bd2f..d248b90d 100644 --- a/wp-content/plugins/menu-icons/menu-icons.php +++ b/wp-content/plugins/menu-icons/menu-icons.php @@ -11,7 +11,7 @@ * Plugin name: Menu Icons * Plugin URI: https://github.com/Codeinwp/wp-menu-icons * Description: Spice up your navigation menus with pretty icons, easily. - * Version: 0.13.17 + * Version: 0.13.23 * 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.17'; + const VERSION = '0.13.23'; /** * Holds plugin data @@ -113,6 +113,8 @@ final class Menu_Icons { return array( 'om-editor', 'om-image-block' ); } ); + + add_filter( 'themeisle_sdk_blackfriday_data', array( __CLASS__, 'add_black_friday_data' ) ); } @@ -255,6 +257,37 @@ final class Menu_Icons { 'free', + ), + tsdk_translate_link( tsdk_utmify( 'https://themeisle.link/neve-claim-bf', 'bfcm', 'menu-icons' ) ) + ); + + $configs[ $product_slug ] = $config; + + return $configs; + } } add_action( 'plugins_loaded', array( 'Menu_Icons', '_load' ) ); diff --git a/wp-content/plugins/menu-icons/readme.txt b/wp-content/plugins/menu-icons/readme.txt index 078c52c1..aa69bfd7 100644 --- a/wp-content/plugins/menu-icons/readme.txt +++ b/wp-content/plugins/menu-icons/readme.txt @@ -1,13 +1,13 @@ -=== Menu Icons by ThemeIsle === +=== Menu Icons by Themeisle – Add Icons to Navigation Menus === Contributors: codeinwp, themeisle -Tags: menu, nav-menu, icons, navigation +Tags: menu icons, navigation menu, font awesome, dashicons, image icons Requires at least: 4.7 -Tested up to: 6.8 +Tested up to: 7.0 Stable tag: trunk License: GPLv2 License URI: http://www.gnu.org/licenses/gpl-2.0.html -Spice up your navigation menus with pretty icons, easily. +Add icons to WordPress navigation menus easily — pick from Font Awesome, Dashicons, image icons & more. Style menu items with custom colors & sizes. == Description == @@ -220,8 +220,57 @@ add_filter( 'menu_icons_menu_settings', 'my_menu_icons_menu_settings', 10, 2 ); = I can't select a custom image size from the *Image Size* dropdown = Read [this blog post](http://kucrut.org/add-custom-image-sizes-right-way/). += How to report a security issue? = + +Plugin security is a core priority for us. If you identify a potential vulnerability, we ask that you disclose it responsibly. +Please follow the reporting protocols outlined on our [Security Page](https://themeisle.com/security/). + == Changelog == +##### [Version 0.13.23](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.22...v0.13.23) (2026-04-23) + +- Fixed issue with SVG menu icons rendering too small +- Fixed issue with vertical alignment not working on frontend + + + + +##### [Version 0.13.22](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.21...v0.13.22) (2026-04-09) + +- Updated dependencies + + + + +##### [Version 0.13.21](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.20...v0.13.21) (2026-02-03) + +- Enhanced security + + + + +##### [Version 0.13.20](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.19...v0.13.20) (2025-12-15) + +- Fixed compatibility with PHP 8.1+ versions +- Updated dependencies + + + + +##### [Version 0.13.19](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.18...v0.13.19) (2025-09-05) + +- Updated dependencies + + + + +##### [Version 0.13.18](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.17...v0.13.18) (2025-05-23) + +- Updated dependencies + + + + ##### [Version 0.13.17](https://github.com/codeinwp/wp-menu-icons/compare/v0.13.16...v0.13.17) (2025-04-17) - Updated dependencies diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/AGENTS.md b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/AGENTS.md new file mode 100644 index 00000000..c6073cda --- /dev/null +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/AGENTS.md @@ -0,0 +1,184 @@ +# ThemeIsle SDK — Agent Reference + +> Quick-reference guide for AI agents working on this codebase. + +## What This Is + +A shared WordPress library bundled into Themeisle plugins and themes. It provides common features (licensing, analytics, notifications, promotions, etc.) so each product doesn't reimplement them. Multiple products may bundle different versions; only the highest version ever loads. + +## Directory Map + +``` +themeisle-sdk-main/ +├── load.php Entry point bundled by each product. Handles version arbitration. +├── start.php Bootstrap: requires all class files, calls Loader::init(). +├── src/ +│ ├── Loader.php Singleton. Owns $products, $available_modules, $labels. +│ ├── Product.php Model for a registered plugin/theme. Reads file headers. +│ ├── Common/ +│ │ ├── Abstract_module.php Base class every module extends. +│ │ └── Module_factory.php Instantiates + attaches modules to products. +│ └── Modules/ One file per feature module (18 total). +├── tests/ PHPUnit tests. One file per module. +├── docs/ Integration guides. One file per feature. +└── assets/ Compiled JS/CSS for SDK UI components. +``` + +## Key Concepts + +### How Products Register +Products add their base file to the `themeisle_sdk_products` filter — that is the *only* required step: + +```php +add_filter( 'themeisle_sdk_products', function( $products ) { + $products[] = __FILE__; + return $products; +} ); +``` + +### Product File Headers +The SDK reads WordPress file headers to configure itself per product: + +``` +WordPress Available: yes # yes = on WP.org (free). no = premium only. +Requires License: yes # yes = activates the Licenser module. +Pro Slug: neve-pro # Slug of the companion pro plugin. +``` + +### Module Loading Contract +Each module in `src/Modules/` extends `Abstract_Module` and implements: +- `can_load( $product ) : bool` — Should this module run for this product? +- `load( $product ) : self` — Register WordPress hooks. + +`Module_Factory::attach()` calls both methods for every registered module/product pair. + +### Labels (UI Strings) +All UI strings are in `Loader::$labels` (see [src/Loader.php](src/Loader.php) lines 73–328). Products and plugins override them via: + +```php +add_filter( 'themeisle_sdk_labels', function( $labels ) { + $labels['review']['notice'] = __( 'Custom message', 'text-domain' ); + return $labels; +} ); +``` + +The merge logic ensures the first real translation wins; later callbacks cannot overwrite already-translated values. + +## All 18 Modules + +| Module | File | Loads when | Doc | +|--------|------|-----------|-----| +| `licenser` | `Licenser.php` | `Requires License: yes` in header | [docs/LICENSER.md](docs/LICENSER.md) | +| `logger` | `Logger.php` | Always (filterable) | [docs/LOGGER.md](docs/LOGGER.md) | +| `notification` | `Notification.php` | Installed >100h, admin user | [docs/NOTIFICATIONS.md](docs/NOTIFICATIONS.md) | +| `review` | `Review.php` | `WordPress Available: yes`, not partner | [docs/REVIEW.md](docs/REVIEW.md) | +| `promotions` | `Promotions.php` | Not partner, not recently dismissed | [docs/PROMOTIONS.md](docs/PROMOTIONS.md) | +| `rollback` | `Rollback.php` | Always | [docs/ROLLBACK.md](docs/ROLLBACK.md) | +| `uninstall_feedback` | `Uninstall_feedback.php` | Always | [docs/UNINSTALL-FEEDBACK.md](docs/UNINSTALL-FEEDBACK.md) | +| `about_us` | `About_us.php` | `{key}_about_us_metadata` filter returns data | [docs/ABOUT-US.md](docs/ABOUT-US.md) | +| `float_widget` | `Float_widget.php` | `{key}_float_widget_metadata` filter returns data | [docs/FLOAT-WIDGET.md](docs/FLOAT-WIDGET.md) | +| `announcements` | `Announcements.php` | Not partner | [docs/ANNOUNCEMENTS.md](docs/ANNOUNCEMENTS.md) | +| `welcome` | `Welcome.php` | `{key}_welcome_metadata` filter returns enabled data | [docs/WELCOME.md](docs/WELCOME.md) | +| `compatibilities` | `Compatibilities.php` | Not partner, admin user | [docs/COMPATIBILITIES.md](docs/COMPATIBILITIES.md) | +| `dashboard_widget` | `Dashboard_widget.php` | Not partner | — | +| `featured_plugins` | `Featured_plugins.php` | Always | — | +| `recommendation` | `Recommendation.php` | Always | — | +| `script_loader` | `Script_loader.php` | Always | [docs/TELEMETRY.md](docs/TELEMETRY.md) | +| `translate` | `Translate.php` | Always | — | +| `translations` | `Translations.php` | Always | — | + +## Common Filter Reference + +| Filter | Purpose | +|--------|---------| +| `themeisle_sdk_products` | Register a product base file | +| `themeisle_sdk_labels` | Override any UI string | +| `themeisle_sdk_modules` | Add custom module names | +| `themeisle_sdk_required_files` | Add custom module PHP files | +| `themeisle_sdk_enable_telemetry` | Enable JS telemetry (return `true`) | +| `themeisle_sdk_disable_telemetry` | Disable all telemetry (return `true`) | +| `themeisle_sdk_hide_notifications` | Suppress all admin notices | +| `themeisle_sdk_is_black_friday_sale` | Force Black Friday banner on/off | +| `themeisle_sdk_promo_debug` | Force promotions to show (dev only) | +| `themeisle_sdk_welcome_debug` | Force welcome notice to show (dev only) | +| `themeisle_sdk_current_date` | Override current date (useful in tests) | +| `{product_key}_about_us_metadata` | Configure About Us page | +| `{product_key}_float_widget_metadata` | Configure floating help widget | +| `{product_key}_welcome_metadata` | Configure welcome/upgrade notice | +| `{product_key}_load_promotions` | Add promotion slugs for this product | +| `{product_key}_dissallowed_promotions` | Block specific promotion slugs | +| `{product_slug}_sdk_enable_logger` | Enable/disable logger for product | +| `{product_slug}_sdk_should_review` | Enable/disable review prompt | +| `{product_key}_enable_licenser` | Enable/disable licenser module | +| `{product_key}_hide_license_field` | Hide license field on settings page | +| `{product_key}_hide_license_notices` | Suppress license admin notices | +| `themeisle_sdk_compatibilities/{slug}` | Declare version compatibility requirements | +| `themesle_sdk_namespace_{md5(basefile)}` | Set product namespace for license filters | +| `themeisle_sdk_license_process_{ns}` | Trigger license activate/deactivate | +| `product_{ns}_license_status` | Read license status | +| `product_{ns}_license_key` | Read license key | +| `product_{ns}_license_plan` | Read license plan/price ID | +| `tsdk_utmify_{content}` | Override UTM params for a URL | +| `tsdk_utmify_url_{content}` | Override final UTM-ified URL | + +## Global Helper Functions + +Defined in `load.php`, available everywhere after `init`: + +```php +tsdk_utmify( $url, $area, $location ) // Append UTM params +tsdk_lstatus( $file ) // License status string +tsdk_lis_valid( $file ) // bool — is license valid? +tsdk_lplan( $file ) // int — license price_id +tsdk_lkey( $file ) // string — license key +tsdk_translate_link( $url, $type, $langs ) // Localize a URL +tsdk_support_link( $file ) // Pre-filled support URL or false +``` + +## Options Written by the SDK + +All options use `{product_key}` where key = slug with hyphens replaced by underscores. + +| Option | Content | +|--------|---------| +| `{key}_install` | Unix timestamp of first activation | +| `{key}_version` | Last known product version | +| `{key}_license` | Raw license key (free products) | +| `{key}_license_data` | JSON object from license API | +| `{key}_license_status` | `valid` \| `not_active` \| `active_expired` | +| `{key}_logger_flag` | `yes` \| `no` | +| `themeisle_sdk_notifications` | Notification queue metadata | +| `themeisle_sdk_promotions` | Promotion dismiss timestamps | +| `themeisle_sdk_promotions_{promo}_installed` | Whether a promoted plugin was installed | + +## API Endpoints + +``` +https://api.themeisle.com/license/check/{product}/{key}/{url}/{token} +https://api.themeisle.com/license/activate/{product}/{key} +https://api.themeisle.com/license/deactivate/{product}/{key} +https://api.themeisle.com/license/version/{product}/{key}/{version}/{url} +https://api.themeisle.com/license/versions/{product}/{key}/{url}/{version} +https://api.themeisle.com/tracking/log +https://api.themeisle.com/tracking/events +https://api.themeisle.com/tracking/uninstall +``` + +## Tests + +```bash +composer install +./vendor/bin/phpunit +``` + +Test files mirror module names: `tests/licenser-test.php`, `tests/loader-test.php`, etc. +Sample products used in tests live in `tests/sample_products/`. + +## Adding a New Module + +1. Create `src/Modules/My_Feature.php` extending `Abstract_Module` +2. Implement `can_load()` and `load()` +3. Add `'my_feature'` to `$available_modules` in `Loader.php` +4. Add the file path to the `$files_to_load` array in `start.php` +5. Add a test in `tests/my-feature-test.php` +6. Add a doc in `docs/MY-FEATURE.md` diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md index df2bc528..04b74f8f 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/CHANGELOG.md @@ -1,3 +1,38 @@ +##### [Version 3.3.51](https://github.com/Codeinwp/themeisle-sdk-main/compare/v3.3.50...v3.3.51) (2026-03-30) + +- Add SDK docs +- Add Migration Module +- Update Black Friday module +- Update the labels for the sharing data notice +- Update the design of the expired notice + +##### [Version 3.3.50](https://github.com/Codeinwp/themeisle-sdk-main/compare/v3.3.49...v3.3.50) (2025-11-25) + +> Things are getting better every day. 🚀 + +##### [Version 3.3.49](https://github.com/Codeinwp/themeisle-sdk-main/compare/v3.3.48...v3.3.49) (2025-09-18) + +> Things are getting better every day. 🚀 + +##### [Version 3.3.48](https://github.com/Codeinwp/themeisle-sdk-main/compare/v3.3.47...v3.3.48) (2025-08-11) + +Development + +##### [Version 3.3.47](https://github.com/Codeinwp/themeisle-sdk-main/compare/v3.3.46...v3.3.47) (2025-07-21) + +- Fixed review link +- Fixed plugins ranking + +##### [Version 3.3.46](https://github.com/Codeinwp/themeisle-sdk-main/compare/v3.3.45...v3.3.46) (2025-05-16) + +- Add masteriyo recommandation +- Add bf helpers +- update formbricks + +##### [Version 3.3.45](https://github.com/Codeinwp/themeisle-sdk-main/compare/v3.3.44...v3.3.45) (2025-04-28) + +- feat: add review_link param to about_us filter + ##### [Version 3.3.44](https://github.com/Codeinwp/themeisle-sdk-main/compare/v3.3.43...v3.3.44) (2025-02-18) - Fix variable mismatch in the install category function. diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/css/banner.css b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/css/banner.css deleted file mode 100644 index 20477478..00000000 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/css/banner.css +++ /dev/null @@ -1,54 +0,0 @@ -.tsdk-banner-cta { - position: relative; - display: inline-block; -} - -.tsdk-banner-urgency-text { - position: absolute; - top: 6%; - left: 1%; - color: white; - padding: 5px; - font-size: 16px; - z-index: 10; - text-transform: uppercase; - font-weight: 700; -} - -.tsdk-banner-img { - width: 100%; - height: auto; -} - -@media (max-width: 1100px) { - .tsdk-banner-urgency-text { - font-size: 10px; - top: 0; - left: 1%; - } -} - -@media (max-width: 950px) { - .tsdk-banner-urgency-text { - font-size: 10px; - left: 1%; - } -} - -@media (max-width: 500px) { - .tsdk-banner-urgency-text { - font-size: 6px; - top: -10%; - left: 1%; - } -} - -@media (max-width: 420px) { - .tsdk-banner-urgency-text { - left: 0%; - } -} - -.notice:not(#tsdk_banner) { - display: none; -} \ No newline at end of file diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.asset.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.asset.php index 2479fd8d..5d619c77 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.asset.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.asset.php @@ -1 +1 @@ - array('react', 'wp-components', 'wp-element'), 'version' => '7d782affa8469fa8f48d'); + array('react', 'wp-components', 'wp-element'), 'version' => '8d9c74cada5a40e4082b'); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.css b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.css index 7340054f..deb84536 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.css +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.css @@ -1 +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 p.review-link{margin-left:auto}.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.active 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;border:var(--border);display:flex;flex-direction:column}.ti-about .product-card *{box-sizing:border-box}.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;width:100%;align-items:center}.ti-about .product-card .body{padding:20px 15px;width:100%}.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;width:100%;margin-top:auto;align-self:flex-end;justify-content:space-between}.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}.ti-about .product-page{margin:0 auto;padding:0;width:100%;max-width:960px;border:1px solid #ccc;border-radius:8px;background-color:#fff}.ti-about .product-page .hero{display:flex;flex-direction:column;align-items:center;padding:64px;border-bottom:1px solid #ccc}.ti-about .product-page .hero h1{font-size:30px;line-height:42px;max-width:500px;text-align:center}.ti-about .product-page .hero p{font-size:14px;line-height:24px;max-width:500px;text-align:center}.ti-about .product-page .hero .logo{width:64px;margin-bottom:24px}.ti-about .product-page .hero .label{font-size:10px;line-height:12px;color:#ed6f57;background-color:rgba(237,111,87,.1803921569);padding:8px 16px;border-radius:4px}.ti-about .product-page .col-3-highlights{display:flex;flex-direction:column;justify-content:space-evenly;padding:24px 0;border-bottom:1px solid #ccc;align-items:center;text-align:center}.ti-about .product-page .col-3-highlights .col{max-width:360px}.ti-about .product-page .col-3-highlights .col h3{font-size:21px;line-height:32px;margin-bottom:8px}.ti-about .product-page .col-3-highlights .col p{font-size:14px;line-height:24px}.ti-about .product-page .col-2-highlights{display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;padding:24px 0;border-bottom:1px solid #ccc}.ti-about .product-page .col-2-highlights .col{width:90%}.ti-about .product-page .col-2-highlights .col img{max-width:450px;width:100%}.ti-about .product-page .col-2-highlights .col h2{font-size:24px;line-height:35px;margin-bottom:8px}.ti-about .product-page .col-2-highlights .col p{font-size:14px;line-height:24px}.ti-about .product-page .button-row{display:flex;gap:12px;margin-top:48px}.ti-about .otter-blocks .testimonial-nav{display:flex;gap:8px}.ti-about .otter-blocks .testimonial-nav .testimonial-button{width:10px;height:10px;background-color:#d9d9d9;margin:0;padding:0;border-radius:50%}.ti-about .otter-blocks .testimonial-nav .testimonial-button.active{background-color:#ed6f57}.ti-about .otter-blocks .testimonial-container{width:100%;max-width:450px;display:flex;overflow-x:scroll;scroll-behavior:smooth;margin:0;padding:0}.ti-about .otter-blocks .testimonial-container::-webkit-scrollbar{display:none}.ti-about .otter-blocks .testimonial-container .testimonial{width:100%;flex:1 0 100%;display:flex;flex-wrap:wrap;justify-content:left;gap:14px;align-items:center}.ti-about .otter-blocks .testimonial-container .testimonial p{width:100%;font-size:14px;line-height:24px}.ti-about .otter-blocks .testimonial-container .testimonial h3{font-size:16px;line-height:20px;font-weight:700;color:#1c1c1c}.ti-about .otter-blocks .testimonial-container .testimonial img{width:36px;height:36px;border-radius:50%}.ti-about .otter-blocks .otter-button.is-primary{background-color:#ed6f57}.ti-about .otter-blocks .otter-button.is-secondary{color:#ed6f57;box-shadow:inset 0 0 0 1px #ed6f57}.ti-about .otter-blocks .otter-button.is-loading{background-color:#6c6c6c;color:#fff}@media (min-width: 660px){.ti-about .product-cards{grid-template-columns:1fr 1fr}.ti-about .product-page .col-3-highlights,.ti-about .product-page .col-2-highlights{flex-direction:row;padding:64px 0}.ti-about .product-page .col-3-highlights{text-align:left}.ti-about .product-page .col-3-highlights .col{max-width:200px}.ti-about .product-page .col-2-highlights .col{width:45%}}@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:repeat(3, minmax(0, 1fr))}} +#wpcontent{padding-left:0 !important}.notice:not(.themeisle-sale){display:none}.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}.ti-about #tsdk_banner:has(.themeisle-sale){max-width:990px;margin:0 auto;width:100%}.ti-about #tsdk_banner:has(.themeisle-sale) .themeisle-sale{margin:0 15px}@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 p.review-link{margin-left:auto}.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.active 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;border:var(--border);display:flex;flex-direction:column}.ti-about .product-card *{box-sizing:border-box}.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;width:100%;align-items:center}.ti-about .product-card .body{padding:20px 15px;width:100%}.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;width:100%;margin-top:auto;align-self:flex-end;justify-content:space-between}.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}.ti-about .product-page{margin:0 auto;padding:0;width:100%;max-width:960px;border:1px solid #ccc;border-radius:8px;background-color:#fff}.ti-about .product-page .hero{display:flex;flex-direction:column;align-items:center;padding:64px;border-bottom:1px solid #ccc}.ti-about .product-page .hero h1{font-size:30px;line-height:42px;max-width:500px;text-align:center}.ti-about .product-page .hero p{font-size:14px;line-height:24px;max-width:500px;text-align:center}.ti-about .product-page .hero .logo{width:64px;margin-bottom:24px}.ti-about .product-page .hero .label{font-size:10px;line-height:12px;color:#ed6f57;background-color:rgba(237,111,87,.1803921569);padding:8px 16px;border-radius:4px}.ti-about .product-page .col-3-highlights{display:flex;flex-direction:column;justify-content:space-evenly;padding:24px 0;border-bottom:1px solid #ccc;align-items:center;text-align:center}.ti-about .product-page .col-3-highlights .col{max-width:360px}.ti-about .product-page .col-3-highlights .col h3{font-size:21px;line-height:32px;margin-bottom:8px}.ti-about .product-page .col-3-highlights .col p{font-size:14px;line-height:24px}.ti-about .product-page .col-2-highlights{display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;padding:24px 0;border-bottom:1px solid #ccc}.ti-about .product-page .col-2-highlights .col{width:90%}.ti-about .product-page .col-2-highlights .col img{max-width:450px;width:100%}.ti-about .product-page .col-2-highlights .col h2{font-size:24px;line-height:35px;margin-bottom:8px}.ti-about .product-page .col-2-highlights .col p{font-size:14px;line-height:24px}.ti-about .product-page .button-row{display:flex;gap:12px;margin-top:48px}.ti-about .otter-blocks .testimonial-nav{display:flex;gap:8px}.ti-about .otter-blocks .testimonial-nav .testimonial-button{width:10px;height:10px;background-color:#d9d9d9;margin:0;padding:0;border-radius:50%}.ti-about .otter-blocks .testimonial-nav .testimonial-button.active{background-color:#ed6f57}.ti-about .otter-blocks .testimonial-container{width:100%;max-width:450px;display:flex;overflow-x:scroll;scroll-behavior:smooth;margin:0;padding:0}.ti-about .otter-blocks .testimonial-container::-webkit-scrollbar{display:none}.ti-about .otter-blocks .testimonial-container .testimonial{width:100%;flex:1 0 100%;display:flex;flex-wrap:wrap;justify-content:left;gap:14px;align-items:center}.ti-about .otter-blocks .testimonial-container .testimonial p{width:100%;font-size:14px;line-height:24px}.ti-about .otter-blocks .testimonial-container .testimonial h3{font-size:16px;line-height:20px;font-weight:700;color:#1c1c1c}.ti-about .otter-blocks .testimonial-container .testimonial img{width:36px;height:36px;border-radius:50%}.ti-about .otter-blocks .otter-button.is-primary{background-color:#ed6f57}.ti-about .otter-blocks .otter-button.is-secondary{color:#ed6f57;box-shadow:inset 0 0 0 1px #ed6f57}.ti-about .otter-blocks .otter-button.is-loading{background-color:#6c6c6c;color:#fff}@media (min-width: 660px){.ti-about .product-cards{grid-template-columns:1fr 1fr}.ti-about .product-page .col-3-highlights,.ti-about .product-page .col-2-highlights{flex-direction:row;padding:64px 0}.ti-about .product-page .col-3-highlights{text-align:left}.ti-about .product-page .col-3-highlights .col{max-width:200px}.ti-about .product-page .col-2-highlights .col{width:45%}}@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:repeat(3, minmax(0, 1fr))}} diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.js b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.js index cfe9c6b2..84fc23f5 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.js +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/about/about.js @@ -1 +1 @@ -(()=>{"use strict";const e=window.React,t=window.wp.element;function a({pages:t=[],selected:a=""}){const{currentProduct:n,logoUrl:l,strings:s,links:c}=window.tiSDKAboutData,i=(e="")=>e===a?"active":"",r=`https://wordpress.org/support/${["neve","hestia"].indexOf(n.slug)>-1?"theme":"plugin"}/${n.slug?.replaceAll("_","-")}/reviews/#new-post`;return(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"head"},(0,e.createElement)("div",{className:"container"},(0,e.createElement)("img",{src:l,alt:n.name}),(0,e.createElement)("p",null,"by ",(0,e.createElement)("a",{href:"https://themeisle.com"},"Themeisle")),(0,e.createElement)("p",{className:"review-link"},"Enjoying ",n.name,"? ",(0,e.createElement)("a",{href:r,target:"_blank"},"Give us a rating!")))),(c.length>0||t.length>0)&&(0,e.createElement)("div",{className:"container"},(0,e.createElement)("ul",{className:"nav"},(0,e.createElement)("li",{className:i()},(0,e.createElement)("a",{href:window.location},s.aboutUs)),t.map(((t,a)=>(0,e.createElement)("li",{className:i(t.hash),key:a},(0,e.createElement)("a",{href:t.hash},t.name)))),c.map(((t,a)=>(0,e.createElement)("li",{key:a},(0,e.createElement)("a",{href:t.url},t.text)))))))}const n=window.wp.components;function l(){const{strings:a,teamImage:l,homeUrl:s,pageSlug:c}=window.tiSDKAboutData,{heroHeader:i,heroTextFirst:r,heroTextSecond:o,teamImageCaption:m,newsHeading:d,emailPlaceholder:u,signMeUp:E}=a,[p,h]=(0,t.useState)(""),[g,v]=(0,t.useState)(!1),[N,b]=(0,t.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,i),(0,e.createElement)("p",null,r),(0,e.createElement)("p",null,o)),(0,e.createElement)("figure",null,(0,e.createElement)("img",{src:l,alt:m}),(0,e.createElement)("figcaption",null,m))),(0,e.createElement)("div",{className:"footer"},(0,e.createElement)("h2",null,d),(0,e.createElement)("form",{onSubmit:e=>{e.preventDefault(),v(!0),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:s,from:c,email:p})}).then((e=>e.json())).then((e=>{v(!1),"success"===e.code&&b(!0)}))?.catch((e=>{v(!1)}))}},(0,e.createElement)("input",{disabled:g||N,type:"email",value:p,onChange:e=>{h(e.target.value)},placeholder:u}),!g&&!N&&(0,e.createElement)(n.Button,{isPrimary:!0,type:"submit"},E),g&&(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),N&&(0,e.createElement)("span",{className:"dashicons dashicons-yes-alt"})))))}const s=(e,t=!1)=>new Promise((a=>{wp.updates.ajax(!0===t?"install-theme":"install-plugin",{slug:e,success:e=>{a({success:!0,data:e})},error:e=>{a({success:!1,code:e.errorCode})}})}));function c({product:a,slug:l}){const{icon:c,name:i,description:r,status:o,premiumUrl:m,activationLink:d}=a,{strings:u,canInstallPlugins:E,canActivatePlugins:p}=window.tiSDKAboutData,{installNow:h,installed:g,notInstalled:v,active:N,activate:b,learnMore:w}=u,f=!!m,[y,k]=(0,t.useState)(o),[S,T]=(0,t.useState)(!1),D=async()=>{T(!0),await s(l,"neve"===l).then((e=>{e.success&&k("installed")})),T(!1)},x=async()=>{T(!0),window.location.href=d},_=()=>"not-installed"===y&&f?(0,e.createElement)(n.Button,{isLink:!0,icon:"external",href:m,target:"_blank"},w):"not-installed"!==y||f?"installed"===y?(0,e.createElement)(n.Button,{isSecondary:!0,onClick:x,disabled:S||!p},b):null:(0,e.createElement)(n.Button,{isPrimary:!0,onClick:D,disabled:S||!E},h),C=!E&&"not-installed"===y||!p&&"installed"===y?(0,e.createElement)(n.Tooltip,{text:`Ask your admin to enable ${i} on your site`,position:"top center"},_()):_();return(0,e.createElement)("div",{className:"product-card"},(0,e.createElement)("div",{className:"header"},c&&(0,e.createElement)("img",{src:c,alt:i}),(0,e.createElement)("h2",null,i)),(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:y},"installed"===y&&g,"not-installed"===y&&v,"active"===y&&N)),"active"!==y&&!S&&C,S&&(0,e.createElement)("span",{className:"dashicons dashicons-update spin"})))}function i(){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)(c,{key:a,slug:a,product:t[a]})))))}const r={"otter-page":function({page:a={}}){const{products:l,canInstallPlugins:c,canActivatePlugins:i}=window.tiSDKAboutData,{strings:r,plugin:o}=a,m=a&&a.product?a.product:"",d=m&&l[m]&&l[m].icon?l[m].icon:null,[u,E]=(0,t.useState)(r.testimonials.users[0]),[p,h]=(0,t.useState)(o.status),[g,v]=(0,t.useState)(!1),N="In Progress",b=async()=>{v(!0),await s(m,!1).then((e=>{e.success&&(h("installed"),w())}))},w=async()=>{v(!0),window.location.href=o.activationLink},f=(0,e.createElement)(n.Button,{variant:"primary",disabled:g||("not-installed"===p?!c:!i),className:"otter-button"+(g?" is-loading":""),onClick:"not-installed"===p?b:w},g?(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"dashicons dashicons-update spin"})," ",N):r.buttons.install_otter_free),y=(0,e.createElement)(n.Button,{variant:"primary",disabled:g||("not-installed"===p?!c:!i),className:"otter-button"+(g?" is-loading":""),onClick:"not-installed"===p?b:w},g?(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),N):r.buttons.install_now),k=!c&&"not-installed"===p||!i&&"installed"===p||!1,S=t=>k?(0,e.createElement)(n.Tooltip,{text:"Ask your admin to enable Otter on your site",position:"top center"},t):t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"hero"},d&&(0,e.createElement)("img",{className:"logo",src:d,alt:a.name||""}),(0,e.createElement)("span",{className:"label"},"Neve + Otter = New Possibilities 🤝"),(0,e.createElement)("h1",null,r.heading),(0,e.createElement)("p",null,r.text),("not-installed"===p||"installed"===p)&&S(f)),(0,e.createElement)("div",{className:"col-3-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h3",null,r.features.advancedTitle),(0,e.createElement)("p",null,r.features.advancedDesc)),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h3",null,r.features.fastTitle),(0,e.createElement)("p",null,r.features.fastDesc)),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h3",null,r.features.mobileTitle),(0,e.createElement)("p",null,r.features.mobileDesc))),(0,e.createElement)("div",{className:"col-2-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("img",{src:r.details.s1Image,alt:r.details.s1Title})),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.details.s1Title),(0,e.createElement)("p",null,r.details.s1Text))),(0,e.createElement)("div",{className:"col-2-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.details.s2Title),(0,e.createElement)("p",null,r.details.s2Text)),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("img",{src:r.details.s2Image,alt:r.details.s1Title}))),(0,e.createElement)("div",{className:"col-2-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("img",{src:r.details.s3Image,alt:r.details.s1Title})),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.details.s3Title),(0,e.createElement)("p",null,r.details.s3Text))),(0,e.createElement)("div",{className:"col-2-highlights",style:{backgroundColor:"#F7F7F7",borderBottom:"none",borderBottomRightRadius:"8px",borderBottomLeftRadius:"8px"}},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.testimonials.heading),(0,e.createElement)("div",{className:"button-row"},("not-installed"===p||"installed"===p)&&S(y),(0,e.createElement)("a",{className:"components-button otter-button is-secondary",href:r.buttons.learn_more_link,target:"_blank",rel:"external noreferrer noopener"},r.buttons.learn_more))),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("div",{className:"testimonials"},(0,e.createElement)("ul",{id:"testimonial-container",className:"testimonial-container"},r.testimonials.users.map(((t,a)=>(0,e.createElement)("li",{className:"testimonial",id:"ts_"+a,key:"ts_"+a},(0,e.createElement)("p",null,'"',t.text,'"'),(0,e.createElement)("img",{src:t.avatar,alt:t.name}),(0,e.createElement)("h3",null,t.name))))),(0,e.createElement)("div",{className:"testimonial-nav"},r.testimonials.users.map(((t,a)=>(0,e.createElement)(n.Button,{className:"testimonial-button"+(t.name===u.name?" active":""),key:"button_"+a,onClick:()=>(e=>{const t=r.testimonials.users[e];document.getElementById("ts_"+e).scrollIntoView({behavior:"smooth"}),E(t)})(a)}))))))))}};function o(t){const a=r[t.id];return(0,e.createElement)(a,{page:t.page})}function m({page:t={}}){return(0,e.createElement)("div",{className:"product-page"+(t&&t.product?" "+t.product:"")},(0,e.createElement)(o,{id:t.id,page:t}))}const d=()=>{let e=window.location.hash;return"string"!=typeof window.location.hash?null:e};function u(){const{productPages:n}=window.tiSDKAboutData,s=n?Object.keys(n).map((e=>{const t=n[e];return t.id=e,t})):[],[c,r]=(0,t.useState)(d()),o=()=>{const e=d();null!==e&&r(e)};(0,t.useEffect)((()=>(o(),window.addEventListener("hashchange",o),()=>{window.removeEventListener("hashchange",o)})),[]);const u=s.filter((e=>e.hash===c));return u.length>0?(0,e.createElement)("div",{className:"ti-about"},(0,e.createElement)(a,{pages:s,selected:c}),(0,e.createElement)(m,{page:u[0]})):(0,e.createElement)("div",{className:"ti-about"},(0,e.createElement)(a,{pages:s}),(0,e.createElement)(l,null),(0,e.createElement)(i,null))}document.addEventListener("DOMContentLoaded",(()=>{const a=document.querySelector("#ti-sdk-about");a&&(0,t.render)((0,e.createElement)(u,null),a)}))})(); \ No newline at end of file +(()=>{"use strict";const e=window.React,t=window.wp.element;function a({pages:t=[],selected:a=""}){const{currentProduct:n,logoUrl:l,strings:s,links:c,showReviewLink:i}=window.tiSDKAboutData,r=(e="")=>e===a?"active":"",o=`https://wordpress.org/support/${["neve","hestia","hestia_pro"].indexOf(n.slug)>-1?"theme":"plugin"}/${n.slug?.replaceAll("_pro","")?.replaceAll("_","-")}/reviews/#new-post`;return console.log("object"),(0,e.createElement)("div",null,(0,e.createElement)("div",{className:"head"},(0,e.createElement)("div",{className:"container"},(0,e.createElement)("img",{src:l,alt:n.name}),(0,e.createElement)("p",null,"by ",(0,e.createElement)("a",{href:"https://themeisle.com"},"Themeisle")),Boolean(i)&&(0,e.createElement)("p",{className:"review-link"},"Enjoying ",n.name,"? ",(0,e.createElement)("a",{href:o,target:"_blank"},"Give us a rating!")))),(c.length>0||t.length>0)&&(0,e.createElement)("div",{className:"container"},(0,e.createElement)("ul",{className:"nav"},(0,e.createElement)("li",{className:r()},(0,e.createElement)("a",{href:window.location},s.aboutUs)),t.map(((t,a)=>(0,e.createElement)("li",{className:r(t.hash),key:a},(0,e.createElement)("a",{href:t.hash},t.name)))),c.map(((t,a)=>(0,e.createElement)("li",{key:a},(0,e.createElement)("a",{href:t.url},t.text)))))))}const n=window.wp.components;function l(){const{strings:a,teamImage:l,homeUrl:s,pageSlug:c}=window.tiSDKAboutData,{heroHeader:i,heroTextFirst:r,heroTextSecond:o,teamImageCaption:m,newsHeading:d,emailPlaceholder:u,signMeUp:E}=a,[p,h]=(0,t.useState)(""),[g,v]=(0,t.useState)(!1),[N,w]=(0,t.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,i),(0,e.createElement)("p",null,r),(0,e.createElement)("p",null,o)),(0,e.createElement)("figure",null,(0,e.createElement)("img",{src:l,alt:m}),(0,e.createElement)("figcaption",null,m))),(0,e.createElement)("div",{className:"footer"},(0,e.createElement)("h2",null,d),(0,e.createElement)("form",{onSubmit:e=>{e.preventDefault(),v(!0),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:s,from:c,email:p})}).then((e=>e.json())).then((e=>{v(!1),"success"===e.code&&w(!0)}))?.catch((e=>{v(!1)}))}},(0,e.createElement)("input",{disabled:g||N,type:"email",value:p,onChange:e=>{h(e.target.value)},placeholder:u}),!g&&!N&&(0,e.createElement)(n.Button,{isPrimary:!0,type:"submit"},E),g&&(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),N&&(0,e.createElement)("span",{className:"dashicons dashicons-yes-alt"})))))}const s=(e,t=!1)=>new Promise((a=>{wp.updates.ajax(!0===t?"install-theme":"install-plugin",{slug:e,success:e=>{a({success:!0,data:e})},error:e=>{a({success:!1,code:e.errorCode})}})}));function c({product:a,slug:l}){const{icon:c,name:i,description:r,status:o,premiumUrl:m,activationLink:d}=a,{strings:u,canInstallPlugins:E,canActivatePlugins:p}=window.tiSDKAboutData,{installNow:h,installed:g,notInstalled:v,active:N,activate:w,learnMore:b}=u,f=!!m,[y,k]=(0,t.useState)(o),[S,_]=(0,t.useState)(!1),T=async()=>{_(!0),await s(l,"neve"===l).then((e=>{e.success&&k("installed")})),_(!1)},D=async()=>{_(!0),window.location.href=d},x=()=>"not-installed"===y&&f?(0,e.createElement)(n.Button,{isLink:!0,icon:"external",href:m,target:"_blank"},b):"not-installed"!==y||f?"installed"===y?(0,e.createElement)(n.Button,{isSecondary:!0,onClick:D,disabled:S||!p},w):null:(0,e.createElement)(n.Button,{isPrimary:!0,onClick:T,disabled:S||!E},h),A=!E&&"not-installed"===y||!p&&"installed"===y?(0,e.createElement)(n.Tooltip,{text:`Ask your admin to enable ${i} on your site`,position:"top center"},x()):x();return(0,e.createElement)("div",{className:"product-card"},(0,e.createElement)("div",{className:"header"},c&&(0,e.createElement)("img",{src:c,alt:i}),(0,e.createElement)("h2",null,i)),(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:y},"installed"===y&&g,"not-installed"===y&&v,"active"===y&&N)),"active"!==y&&!S&&A,S&&(0,e.createElement)("span",{className:"dashicons dashicons-update spin"})))}function i(){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)(c,{key:a,slug:a,product:t[a]})))))}const r={"otter-page":function({page:a={}}){const{products:l,canInstallPlugins:c,canActivatePlugins:i}=window.tiSDKAboutData,{strings:r,plugin:o}=a,m=a&&a.product?a.product:"",d=m&&l[m]&&l[m].icon?l[m].icon:null,[u,E]=(0,t.useState)(r.testimonials.users[0]),[p,h]=(0,t.useState)(o.status),[g,v]=(0,t.useState)(!1),N="In Progress",w=async()=>{v(!0),await s(m,!1).then((e=>{e.success&&(h("installed"),b())}))},b=async()=>{v(!0),window.location.href=o.activationLink},f=(0,e.createElement)(n.Button,{variant:"primary",disabled:g||("not-installed"===p?!c:!i),className:"otter-button"+(g?" is-loading":""),onClick:"not-installed"===p?w:b},g?(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"dashicons dashicons-update spin"})," ",N):r.buttons.install_otter_free),y=(0,e.createElement)(n.Button,{variant:"primary",disabled:g||("not-installed"===p?!c:!i),className:"otter-button"+(g?" is-loading":""),onClick:"not-installed"===p?w:b},g?(0,e.createElement)("span",null,(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),N):r.buttons.install_now),k=!c&&"not-installed"===p||!i&&"installed"===p||!1,S=t=>k?(0,e.createElement)(n.Tooltip,{text:"Ask your admin to enable Otter on your site",position:"top center"},t):t;return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"hero"},d&&(0,e.createElement)("img",{className:"logo",src:d,alt:a.name||""}),(0,e.createElement)("span",{className:"label"},"Neve + Otter = New Possibilities 🤝"),(0,e.createElement)("h1",null,r.heading),(0,e.createElement)("p",null,r.text),("not-installed"===p||"installed"===p)&&S(f)),(0,e.createElement)("div",{className:"col-3-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h3",null,r.features.advancedTitle),(0,e.createElement)("p",null,r.features.advancedDesc)),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h3",null,r.features.fastTitle),(0,e.createElement)("p",null,r.features.fastDesc)),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h3",null,r.features.mobileTitle),(0,e.createElement)("p",null,r.features.mobileDesc))),(0,e.createElement)("div",{className:"col-2-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("img",{src:r.details.s1Image,alt:r.details.s1Title})),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.details.s1Title),(0,e.createElement)("p",null,r.details.s1Text))),(0,e.createElement)("div",{className:"col-2-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.details.s2Title),(0,e.createElement)("p",null,r.details.s2Text)),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("img",{src:r.details.s2Image,alt:r.details.s1Title}))),(0,e.createElement)("div",{className:"col-2-highlights"},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("img",{src:r.details.s3Image,alt:r.details.s1Title})),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.details.s3Title),(0,e.createElement)("p",null,r.details.s3Text))),(0,e.createElement)("div",{className:"col-2-highlights",style:{backgroundColor:"#F7F7F7",borderBottom:"none",borderBottomRightRadius:"8px",borderBottomLeftRadius:"8px"}},(0,e.createElement)("div",{className:"col"},(0,e.createElement)("h2",null,r.testimonials.heading),(0,e.createElement)("div",{className:"button-row"},("not-installed"===p||"installed"===p)&&S(y),(0,e.createElement)("a",{className:"components-button otter-button is-secondary",href:r.buttons.learn_more_link,target:"_blank",rel:"external noreferrer noopener"},r.buttons.learn_more))),(0,e.createElement)("div",{className:"col"},(0,e.createElement)("div",{className:"testimonials"},(0,e.createElement)("ul",{id:"testimonial-container",className:"testimonial-container"},r.testimonials.users.map(((t,a)=>(0,e.createElement)("li",{className:"testimonial",id:"ts_"+a,key:"ts_"+a},(0,e.createElement)("p",null,'"',t.text,'"'),(0,e.createElement)("img",{src:t.avatar,alt:t.name}),(0,e.createElement)("h3",null,t.name))))),(0,e.createElement)("div",{className:"testimonial-nav"},r.testimonials.users.map(((t,a)=>(0,e.createElement)(n.Button,{className:"testimonial-button"+(t.name===u.name?" active":""),key:"button_"+a,onClick:()=>(e=>{const t=r.testimonials.users[e];document.getElementById("ts_"+e).scrollIntoView({behavior:"smooth"}),E(t)})(a)}))))))))}};function o(t){const a=r[t.id];return(0,e.createElement)(a,{page:t.page})}function m({page:t={}}){return(0,e.createElement)("div",{className:"product-page"+(t&&t.product?" "+t.product:"")},(0,e.createElement)(o,{id:t.id,page:t}))}const d=()=>{let e=window.location.hash;return"string"!=typeof window.location.hash?null:e};function u(){const{productPages:n}=window.tiSDKAboutData,s=n?Object.keys(n).map((e=>{const t=n[e];return t.id=e,t})):[],[c,r]=(0,t.useState)(d()),o=()=>{const e=d();null!==e&&r(e)};(0,t.useEffect)((()=>(o(),window.addEventListener("hashchange",o),window.tsdk_reposition_notice&&window.tsdk_reposition_notice(),()=>{window.removeEventListener("hashchange",o)})),[]);const u=s.filter((e=>e.hash===c));return u.length>0?(0,e.createElement)("div",{className:"ti-about"},(0,e.createElement)(a,{pages:s,selected:c}),(0,e.createElement)(m,{page:u[0]})):(0,e.createElement)("div",{className:"ti-about"},(0,e.createElement)(a,{pages:s}),(0,e.createElement)("div",{id:"tsdk_banner"}),(0,e.createElement)(l,null),(0,e.createElement)(i,null))}document.addEventListener("DOMContentLoaded",(()=>{const a=document.querySelector("#ti-sdk-about");a&&(0,t.render)((0,e.createElement)(u,null),a)}))})(); \ No newline at end of file diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/banner/banner.asset.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/banner/banner.asset.php deleted file mode 100644 index 13b23d6e..00000000 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/banner/banner.asset.php +++ /dev/null @@ -1 +0,0 @@ - array(), 'version' => '9c795bb600f6ae533935'); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/banner/banner.js b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/banner/banner.js deleted file mode 100644 index be98c34e..00000000 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/banner/banner.js +++ /dev/null @@ -1 +0,0 @@ -document.addEventListener("DOMContentLoaded",(()=>{document.dispatchEvent(new Event("themeisle:banner:init"))})),document.addEventListener("themeisle:banner:init",(()=>{!function(){if(void 0===window.tsdk_banner_data)return;const n=document.getElementById("tsdk_banner");n&&(n.innerHTML=window.tsdk_banner_data.content)}()})); \ No newline at end of file diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.asset.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.asset.php index 2d6fecb5..ea4d57ba 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.asset.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.asset.php @@ -1 +1 @@ - array('react', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins'), 'version' => '3997ba6be36742082cb2'); + array('react', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-edit-post', 'wp-element', 'wp-hooks', 'wp-plugins'), 'version' => '1e086c2d21f2850672d5'); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.js b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.js index 9321acf9..043d526a 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.js +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/promos/index.js @@ -1 +1 @@ -(()=>{"use strict";var e,t={536:()=>{const e=window.React,t=window.wp.blockEditor,n=window.wp.components,o=window.wp.compose,i=window.wp.data,s=window.wp.element,a=window.wp.hooks,l=()=>{const{createNotice:e}=(0,i.dispatch)("core/notices"),[t,n]=(0,s.useState)({}),[o,a]=(0,s.useState)("loading");return(0,i.useSelect)((e=>{if(Object.keys(t).length)return;const{getEntityRecord:o}=e("core"),i=o("root","site");i&&(a("loaded"),n(i))}),[]),[e=>t?.[e],async(t,o,i="Settings saved.")=>{const s={[t]:o};try{const t=await fetch("/wp-json/wp/v2/settings",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpApiSettings.nonce},body:JSON.stringify(s)});t.ok||(a("error"),e("error","Could not save the settings.",{isDismissible:!0,type:"snackbar"}));const o=await t.json();a("loaded"),e("success",i,{isDismissible:!0,type:"snackbar"}),n(o)}catch(e){console.error("Error updating option:",e)}},o]},r=(e,t=!1)=>new Promise((n=>{wp.updates.ajax(!0===t?"install-theme":"install-plugin",{slug:e,success:e=>{n({success:!0,data:e})},error:e=>{n({success:!1,code:e.errorCode})}})})),c=e=>new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))})),m=(e,t)=>{const n={};return Object.keys(t).forEach((function(e){"innerBlocks"!==e&&(n[e]=t[e])})),e.push(n),Array.isArray(t.innerBlocks)?(n.innerBlocks=t.innerBlocks.map((e=>e.id)),t.innerBlocks.reduce(m,e)):e},d={button:{display:"flex",justifyContent:"center",width:"100%"},image:{padding:"20px 0"},skip:{container:{display:"flex",flexDirection:"column",alignItems:"center"},button:{fontSize:"9px"},poweredby:{fontSize:"9px",textTransform:"uppercase"}}},p={"blocks-css":{title:"Custom CSS",description:"Enable Otter Blocks to add Custom CSS for this block.",image:"css.jpg"},"blocks-animation":{title:"Animations",description:"Enable Otter Blocks to add Animations for this block.",image:"animation.jpg"},"blocks-conditions":{title:"Visibility Conditions",description:"Enable Otter Blocks to add Visibility Conditions for this block.",image:"conditions.jpg"}},u=({onClick:t})=>(0,e.createElement)("div",{style:d.skip.container},(0,e.createElement)(n.Button,{style:d.skip.button,variant:"tertiary",onClick:t},"Skip for now"),(0,e.createElement)("span",{style:d.skip.poweredby},"Recommended by ",window.themeisleSDKPromotions.product)),h=(0,o.createHigherOrderComponent)((o=>i=>{const[a,m]=(0,s.useState)(!1),[h,w]=(0,s.useState)("default"),[g,E]=(0,s.useState)(!1),[y,v,f]=l();if((0,s.useEffect)((()=>{g&&(()=>{const e={...window.themeisleSDKPromotions.option};e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,v("themeisle_sdk_promotions",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1})()}),[g]),!i.isSelected||!Boolean(window.themeisleSDKPromotions.showPromotion))return(0,e.createElement)(o,{...i});const k=async()=>{m(!0),await r("otter-blocks"),v("themeisle_sdk_promotions_otter_installed",!Boolean(y("themeisle_sdk_promotions_otter_installed"))),await c(window.themeisleSDKPromotions.otterActivationUrl),m(!1),w("installed")},S=()=>"installed"===h?(0,e.createElement)("p",null,(0,e.createElement)("strong",null,"Awesome! Refresh the page to see Otter Blocks in action.")):(0,e.createElement)(n.Button,{variant:"secondary",onClick:k,isBusy:a,style:d.button},"Install & Activate Otter Blocks");return g?(0,e.createElement)(o,{...i}):(0,e.createElement)(s.Fragment,null,(0,e.createElement)(o,{...i}),(0,e.createElement)(t.InspectorControls,null,Object.keys(p).map((t=>{if(t===window.themeisleSDKPromotions.showPromotion){const o=p[t];return(0,e.createElement)(n.PanelBody,{key:t,title:o.title,initialOpen:!1},(0,e.createElement)("p",null,o.description),(0,e.createElement)(S,null),(0,e.createElement)("img",{style:d.image,src:window.themeisleSDKPromotions.assets+o.image}),(0,e.createElement)(u,{onClick:()=>E(!0)}))}}))))}),"withInspectorControl");(0,i.select)("core/edit-site")||(0,a.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",h);const w=window.wp.plugins,g=window.wp.editPost;function E({stacked:t=!1,type:o,onDismiss:i,onSuccess:a,initialStatus:m=null}){const{title:d,option:p,optionKey:u,labels:h,optimoleActivationUrl:w,optimoleDash:g}=window.themeisleSDKPromotions,[E,y]=(0,s.useState)(!1),[v,f]=(0,s.useState)(m),[k,S]=l(),P=async()=>{y(!0);const e={...p};e[o]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await S(u,JSON.stringify(e)),i&&i()},_=async e=>{e.preventDefault(),f("installing"),await r("optimole-wp"),f("activating"),await c(w),S("themeisle_sdk_promotions_optimole_installed",!0).then((()=>{f("done")}))};if(E)return null;const b=()=>"done"===v?(0,e.createElement)("div",{className:"done"},(0,e.createElement)("p",null," ",h.all_set),(0,e.createElement)(n.Button,{icon:"external",isPrimary:!0,href:g,target:"_blank"},h.optimole.gotodash)):(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===v&&h.installing,"activating"===v&&h.activating,"…")),D=()=>(0,e.createElement)(n.Button,{disabled:v&&"done"!==v,onClick:P,isLink:!0,className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},h.optimole.dismisscta)),N=(t=!1)=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.Button,{isPrimary:!0,onClick:_,className:t?"cta":""},h.optimole.installOptimole),(0,e.createElement)(n.Button,{isLink:!0,target:"_blank",href:"https://wordpress.org/plugins/optimole-wp"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null," ",h.learnmore))),B=(0,e.createElement)("div",{className:"ti-om-stack-wrap ti-sdk-om-notice"},(0,e.createElement)("div",{className:"om-stack-notice"},D(),(0,e.createElement)("i",null,d),(0,e.createElement)("p",null,["om-editor","om-image-block"].includes(o)?h.optimole.message1:h.optimole.message2),v?b():N(!0))),K=(0,e.createElement)(e.Fragment,null,D(),(0,e.createElement)("div",{className:"content"},(0,e.createElement)("div",null,(0,e.createElement)("p",null,d),(0,e.createElement)("p",{className:"description"},"om-media"===o?h.optimole.message3:h.optimole.message4),v?b():(0,e.createElement)("div",{className:"actions"},N()))));return t?B:K}const y=()=>{const[t,n]=(0,s.useState)(!0),{getBlocks:o}=(0,i.useSelect)((e=>{const{getBlocks:t}=e("core/block-editor");return{getBlocks:t}}));var a;if((a=o(),"core/image",a.reduce(m,[]).filter((e=>"core/image"===e.name))).length<2)return null;const l="ti-sdk-optimole-post-publish "+(t?"":"hidden");return(0,e.createElement)(g.PluginPostPublishPanel,{className:l},(0,e.createElement)(E,{stacked:!0,type:"om-editor",onDismiss:()=>{n(!1)}}))};new class{constructor(){const{showPromotion:e,debug:t}=window.themeisleSDKPromotions;this.promo=e,this.debug="1"===t,this.domRef=null,this.run()}run(){if(this.debug)this.runAll();else switch(this.promo){case"om-attachment":this.runAttachmentPromo();break;case"om-media":this.runMediaPromo();break;case"om-editor":this.runEditorPromo();break;case"om-image-block":this.runImageBlockPromo();break;case"om-elementor":this.runElementorPromo()}}runAttachmentPromo(){wp.media.view.Attachment.Details.prototype.on("ready",(()=>{setTimeout((()=>{this.removeAttachmentPromo(),this.addAttachmentPromo()}),100)})),wp.media.view.Modal.prototype.on("close",(()=>{setTimeout(this.removeAttachmentPromo,100)}))}runMediaPromo(){if(window.themeisleSDKPromotions.option["om-media"])return;const t=document.querySelector("#ti-optml-notice");t&&(0,s.render)((0,e.createElement)(E,{type:"om-media",onDismiss:()=>{t.style.opacity=0}}),t)}runImageBlockPromo(){if(window.themeisleSDKPromotions.option["om-image-block"])return;let n=!0,i=null;const l=(0,o.createHigherOrderComponent)((o=>a=>"core/image"===a.name&&n?(0,e.createElement)(s.Fragment,null,(0,e.createElement)(o,{...a}),(0,e.createElement)(t.InspectorControls,null,(0,e.createElement)(E,{stacked:!0,type:"om-image-block",initialStatus:i,onDismiss:()=>{n=!1},onSuccess:()=>{i="done"}}))):(0,e.createElement)(o,{...a})),"withImagePromo");(0,a.addFilter)("editor.BlockEdit","optimole-promo/image-promo",l,99)}runEditorPromo(){window.themeisleSDKPromotions.option["om-editor"]||(0,w.registerPlugin)("optimole-promo",{render:y})}runElementorPromo(){if(!window.elementor)return;const e=this;elementor.on("preview:loaded",(()=>{elementor.panel.currentView.on("set:page:editor",(t=>{e.domRef&&(0,s.unmountComponentAtNode)(e.domRef),t.activeSection&&"section_image"===t.activeSection&&e.runElementorActions(e)}))}))}addAttachmentPromo(){if(this.domRef&&(0,s.unmountComponentAtNode)(this.domRef),window.themeisleSDKPromotions.option["om-attachment"])return;const t=document.querySelector("#ti-optml-notice-helper");t&&(this.domRef=t,(0,s.render)((0,e.createElement)("div",{className:"notice notice-info ti-sdk-om-notice",style:{margin:0}},(0,e.createElement)(E,{type:"om-attachment",onDismiss:()=>{t.style.opacity=0}})),t))}removeAttachmentPromo(){const e=document.querySelector("#ti-optml-notice-helper");e&&(0,s.unmountComponentAtNode)(e)}runElementorActions(t){if(window.themeisleSDKPromotions.option["om-elementor"])return;const n=document.querySelector("#elementor-panel__editor__help"),o=document.createElement("div");o.id="ti-optml-notice",t.domRef=o,n&&(n.parentNode.insertBefore(o,n),(0,s.render)((0,e.createElement)(E,{stacked:!0,type:"om-elementor",onDismiss:()=>{o.style.opacity=0}}),o))}runAll(){this.runAttachmentPromo(),this.runMediaPromo(),this.runEditorPromo(),this.runImageBlockPromo(),this.runElementorPromo()}};const v=({onDismiss:t=(()=>{})})=>{const[o,i]=(0,s.useState)(""),[a,m]=l();return(0,e.createElement)(s.Fragment,null,(0,e.createElement)(n.Button,{disabled:"installing"===o,onClick:async()=>{const e={...window.themeisleSDKPromotions.option};e["rop-posts"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await m(window.themeisleSDKPromotions.optionKey,JSON.stringify(e)),t&&t()},variant:"link",className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice.")),(0,e.createElement)("p",null,"Boost your content's reach effortlessly! Introducing ",(0,e.createElement)("b",null,"Revive Social"),", a cutting-edge plugin from the makers of ",window.themeisleSDKPromotions.product,". Seamlessly auto-share old & new content across social media, driving traffic like never before."),(0,e.createElement)("div",{className:"rop-notice-actions"},"installed"!==o?(0,e.createElement)(n.Button,{variant:"primary",isBusy:"installing"===o,onClick:async()=>{i("installing"),await r("tweet-old-post"),await c(window.themeisleSDKPromotions.ropActivationUrl),m("themeisle_sdk_promotions_rop_installed",!Boolean(a("themeisle_sdk_promotions_rop_installed"))),i("installed")}},"Install & Activate"):(0,e.createElement)(n.Button,{variant:"primary",href:window.themeisleSDKPromotions.ropDash},"Visit Dashboard"),(0,e.createElement)(n.Button,{variant:"link",target:"_blank",href:"https://wordpress.org/plugins/tweet-old-post/"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null,"Learn more"))))};new class{constructor(){const{showPromotion:e,debug:t}=window.themeisleSDKPromotions;this.promo=e,this.debug="1"===t,this.domRef=null,this.run()}run(){if(window.themeisleSDKPromotions.option["rop-posts"])return;const t=document.querySelector("#ti-rop-notice");t&&(0,s.render)((0,e.createElement)(v,{onDismiss:()=>{t.style.display="none"}}),t)}};const f=({onDismiss:t=(()=>{})})=>{const{title:o,optionKey:i,labels:a,neveAction:c,activateNeveURL:m}=window.themeisleSDKPromotions,[d,p]=l(),[u,h]=(0,s.useState)(null);return(0,e.createElement)(s.Fragment,null,(0,e.createElement)(n.Button,{disabled:u&&"done"!==u,onClick:async()=>{const e={...window.themeisleSDKPromotions.option};e["neve-themes-popular"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await p(i,JSON.stringify(e)),t&&t()},isLink:!0,className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},a.redirectionCF7.dismisscta)),(0,e.createElement)("div",{className:"content"},(0,e.createElement)("div",null,(0,e.createElement)("p",null,o),(0,e.createElement)("p",{className:"description"},"Meet ",(0,e.createElement)("b",null,"Neve"),", from the creators of ",window.themeisleSDKPromotions.product,". A very fast and free theme, trusted by over 300,000 users for building their websites and rated 4.7 stars!"),!u&&(0,e.createElement)("div",{className:"actions"},(0,e.createElement)(n.Button,{variant:"primary",onClick:e=>{if(e.preventDefault(),"activate"===c)return h("activating"),void p("themeisle_sdk_promotions_neve_installed",!0).then((()=>{window.location.href=m}));h("installing"),r("neve",!0).then((e=>{h("activating"),p("themeisle_sdk_promotions_neve_installed",!0).then((()=>{window.location.href=e.data.activateUrl}))}))}},"install"===c&&a.installActivate,"activate"===c&&a.activate),(0,e.createElement)(n.Button,{variant:"link",href:window.themeisleSDKPromotions.nevePreviewURL},a.preview)),u&&"done"!==u&&(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===u&&a.installing,"activating"===u&&a.activating,"…")))))};function k({type:t,onDismiss:o}){const{title:i,option:a,optionKey:m,labels:d,rfCF7ActivationUrl:p,cf7Dash:u}=window.themeisleSDKPromotions,[h,w]=(0,s.useState)(!1),[g,E]=(0,s.useState)(null),[y,v]=l();if(h)return null;const f=(0,e.createElement)("div",{className:"actions"},(0,e.createElement)(n.Button,{isPrimary:!0,onClick:async e=>{e.preventDefault(),E("installing"),await r("wpcf7-redirect"),E("activating"),await c(p),v("themeisle_sdk_promotions_redirection_cf7_installed",!Boolean(y("themeisle_sdk_promotions_redirection_cf7_installed"))),E("done")}},d.redirectionCF7.gst),(0,e.createElement)(n.Button,{isLink:!0,target:"_blank",href:"https://wordpress.org/plugins/wpcf7-redirect/"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null," ",d.learnmore)));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.Button,{disabled:g&&"done"!==g,onClick:async()=>{w(!0);const e={...a};e[t]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await v(m,JSON.stringify(e)),o&&o()},isLink:!0,className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},d.redirectionCF7.dismisscta)),(0,e.createElement)("div",{className:"content"},(0,e.createElement)("div",null,(0,e.createElement)("p",null,i),(0,e.createElement)("p",{className:"description"},d.redirectionCF7.message),g?"done"===g?(0,e.createElement)("div",{className:"done"},(0,e.createElement)("p",null," ",d.all_set),(0,e.createElement)(n.Button,{icon:"external",variant:"primary",href:u,target:"_blank"},d.redirectionCF7.gotodash)):(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===g&&d.installing,"activating"===g&&d.activating,"…")):f)))}new class{constructor(){const{showPromotion:e,debug:t}=window.themeisleSDKPromotions;this.promo=e,this.debug="1"===t,this.domRef=null,this.run()}run(){if(window.themeisleSDKPromotions.option["neve-themes-popular"])return;const t=document.querySelector("#ti-neve-notice");t&&(0,s.render)((0,e.createElement)(f,{onDismiss:()=>{t.style.display="none"}}),t)}},new class{constructor(){this.run()}run(){if(window.themeisleSDKPromotions.option["redirection-cf7"])return;const t=document.querySelector("#ti-redirection-cf7-notice");t&&(0,s.render)((0,e.createElement)(k,{type:"redirection-cf7",onDismiss:()=>{t.style.display="none"}}),t)}};const S=({onDismiss:t=(()=>{})})=>{const{title:o,option:i,optionKey:a,labels:m,hyveActivationUrl:d,hyveDash:p}=window.themeisleSDKPromotions,[u,h]=(0,s.useState)(!1),[w,g]=(0,s.useState)(null),[E,y]=l();if(u)return null;const v=(0,e.createElement)("div",{className:"actions"},(0,e.createElement)(n.Button,{variant:"primary",onClick:async e=>{e.preventDefault(),g("installing"),await r("hyve-lite"),g("activating"),await c(d),y("themeisle_sdk_promotions_hyve_installed",!Boolean(E("themeisle_sdk_promotions_hyve_installed"))),g("done")}},m.hyve.install),(0,e.createElement)(n.Button,{variant:"link",target:"_blank",href:"https://wordpress.org/plugins/hyve-lite/"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null,m.learnmore)));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.Button,{disabled:w&&"done"!==w,onClick:async()=>{h(!0);const e={...i};e["hyve-plugins-install"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await y(a,JSON.stringify(e)),t&&t()},variant:"link",className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},m.hyve.dismisscta)),(0,e.createElement)("div",{className:"content"},(0,e.createElement)("div",null,(0,e.createElement)("p",null,o),(0,e.createElement)("p",{className:"description"},m.hyve.message),w?"done"===w?(0,e.createElement)("div",{className:"done"},(0,e.createElement)("p",null,m.all_set),(0,e.createElement)(n.Button,{icon:"external",variant:"primary",href:p,target:"_blank"},m.hyve.gotodash)):(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===w&&m.installing,"activating"===w&&m.activating,"…")):v)))};(()=>{if(window.themeisleSDKPromotions.option["hyve-plugins-install"])return;const t=document.querySelector("#ti-hyve-notice");t&&(0,s.createRoot)(t).render((0,e.createElement)(S,{onDismiss:()=>{t.style.display="none"}}))})();const P=(0,o.createHigherOrderComponent)((o=>i=>{if("core/rss"!==i.name||!Boolean(window.themeisleSDKPromotions.showPromotion))return(0,e.createElement)(o,{...i});if("feedzy-editor"!==window.themeisleSDKPromotions.showPromotion)return(0,e.createElement)(o,{...i});const[a,r,c]=l(),[m,d]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{m&&(()=>{const e={...window.themeisleSDKPromotions.option};e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,r("themeisle_sdk_promotions",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1})()}),[m]),m?(0,e.createElement)(o,{...i}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o,{...i}),(0,e.createElement)(t.InspectorControls,null,(0,e.createElement)(n.PanelBody,null,(0,e.createElement)("div",{style:{padding:"16px 10px",backgroundColor:"#f0f6fc",borderLeft:"4px solid #72aee6",margin:"5px 0",fontSize:"13px",color:"#1e1e1e",position:"relative"}},(0,e.createElement)("div",{dangerouslySetInnerHTML:{__html:window.themeisleSDKPromotions.labels.feedzy.editor_recommends}}),(0,e.createElement)("button",{onClick:()=>d(!0),style:{position:"absolute",top:"-2px",right:"3px",cursor:"pointer",background:"none",border:"none",padding:"2px",color:"#757575",fontSize:"16px"}},"×")))))}),"withFeedzyNotice");(0,a.addFilter)("editor.BlockEdit","feedzy/with-notice",P);const _=({onDismiss:t=(()=>{})})=>{const{title:o,option:i,optionKey:a,labels:m,wpFullPayActivationUrl:d,wpFullPayDash:p}=window.themeisleSDKPromotions,[u,h]=(0,s.useState)(!1),[w,g]=(0,s.useState)(null),[E,y]=l();if(u)return null;const v=(0,e.createElement)("div",{className:"actions"},(0,e.createElement)(n.Button,{variant:"primary",onClick:async e=>{e.preventDefault(),g("installing"),await r("wp-full-stripe-free"),g("activating"),await c(d),y("themeisle_sdk_promotions_wp_full_pay_installed",!Boolean(E("themeisle_sdk_promotions_wp_full_pay_installed"))),g("done")}},m.wp_full_pay.install),(0,e.createElement)(n.Button,{variant:"link",target:"_blank",href:"https://wordpress.org/plugins/wp-full-stripe-free/"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null,m.learnmore)));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.Button,{disabled:w&&"done"!==w,onClick:async()=>{h(!0);const e={...i};e["wp-full-pay-plugins-install"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await y(a,JSON.stringify(e)),t&&t()},variant:"link",className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},m.wp_full_pay.dismisscta)),(0,e.createElement)("div",{className:"content"},(0,e.createElement)("div",null,(0,e.createElement)("p",null,o),(0,e.createElement)("p",{className:"description"},m.wp_full_pay.message),w?"done"===w?(0,e.createElement)("div",{className:"done"},(0,e.createElement)("p",null,m.all_set),(0,e.createElement)(n.Button,{icon:"external",variant:"primary",href:p,target:"_blank"},m.wp_full_pay.gotodash)):(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===w&&m.installing,"activating"===w&&m.activating,"…")):v)))};(()=>{if(window.themeisleSDKPromotions.option["wp-full-pay-plugins-install"])return;const t=document.querySelector("#ti-wp-full-pay-notice");t&&(0,s.createRoot)(t).render((0,e.createElement)(_,{onDismiss:()=>{t.style.display="none"}}))})()}},n={};function o(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.m=t,e=[],o.O=(t,n,i,s)=>{if(!n){var a=1/0;for(m=0;m=s)&&Object.keys(o.O).every((e=>o.O[e](n[r])))?n.splice(r--,1):(l=!1,s0&&e[m-1][2]>s;m--)e[m]=e[m-1];e[m]=[n,i,s]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var i,s,[a,l,r]=n,c=0;if(a.some((t=>0!==e[t]))){for(i in l)o.o(l,i)&&(o.m[i]=l[i]);if(r)var m=r(o)}for(t&&t(n);co(536)));i=o.O(i)})(); \ No newline at end of file +(()=>{"use strict";var e,t={150:()=>{const e=window.React,t=window.wp.blockEditor,n=window.wp.components,o=window.wp.compose,i=window.wp.data,s=window.wp.element,a=window.wp.hooks,l=()=>{const{createNotice:e}=(0,i.dispatch)("core/notices"),[t,n]=(0,s.useState)({}),[o,a]=(0,s.useState)("loading");return(0,i.useSelect)((e=>{if(Object.keys(t).length)return;const{getEntityRecord:o}=e("core"),i=o("root","site");i&&(a("loaded"),n(i))}),[]),[e=>t?.[e],async(t,o,i="Settings saved.")=>{const s={[t]:o};try{const t=await fetch("/wp-json/wp/v2/settings",{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":wpApiSettings.nonce},body:JSON.stringify(s)});t.ok||(a("error"),e("error","Could not save the settings.",{isDismissible:!0,type:"snackbar"}));const o=await t.json();a("loaded"),e("success",i,{isDismissible:!0,type:"snackbar"}),n(o)}catch(e){console.error("Error updating option:",e)}},o]},r=(e,t=!1)=>new Promise((n=>{wp.updates.ajax(!0===t?"install-theme":"install-plugin",{slug:e,success:e=>{n({success:!0,data:e})},error:e=>{n({success:!1,code:e.errorCode})}})})),c=e=>new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))})),m=(e,t)=>{const n={};return Object.keys(t).forEach((function(e){"innerBlocks"!==e&&(n[e]=t[e])})),e.push(n),Array.isArray(t.innerBlocks)?(n.innerBlocks=t.innerBlocks.map((e=>e.id)),t.innerBlocks.reduce(m,e)):e},d={button:{display:"flex",justifyContent:"center",width:"100%"},image:{padding:"20px 0"},skip:{container:{display:"flex",flexDirection:"column",alignItems:"center"},button:{fontSize:"9px"},poweredby:{fontSize:"9px",textTransform:"uppercase"}}},p={"blocks-css":{title:"Custom CSS",description:"Enable Otter Blocks to add Custom CSS for this block.",image:"css.jpg"},"blocks-animation":{title:"Animations",description:"Enable Otter Blocks to add Animations for this block.",image:"animation.jpg"},"blocks-conditions":{title:"Visibility Conditions",description:"Enable Otter Blocks to add Visibility Conditions for this block.",image:"conditions.jpg"}},u=({onClick:t})=>(0,e.createElement)("div",{style:d.skip.container},(0,e.createElement)(n.Button,{style:d.skip.button,variant:"tertiary",onClick:t},"Skip for now"),(0,e.createElement)("span",{style:d.skip.poweredby},"Recommended by ",window.themeisleSDKPromotions.product)),h=(0,o.createHigherOrderComponent)((o=>i=>{const[a,m]=(0,s.useState)(!1),[h,w]=(0,s.useState)("default"),[g,y]=(0,s.useState)(!1),[E,f,v]=l();if((0,s.useEffect)((()=>{g&&(()=>{const e={...window.themeisleSDKPromotions.option};e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,f("themeisle_sdk_promotions",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1})()}),[g]),!i.isSelected||!Boolean(window.themeisleSDKPromotions.showPromotion))return(0,e.createElement)(o,{...i});const k=async()=>{m(!0),await r("otter-blocks"),f("themeisle_sdk_promotions_otter_installed",!Boolean(E("themeisle_sdk_promotions_otter_installed"))),await c(window.themeisleSDKPromotions.otterActivationUrl),m(!1),w("installed")},S=()=>"installed"===h?(0,e.createElement)("p",null,(0,e.createElement)("strong",null,"Awesome! Refresh the page to see Otter Blocks in action.")):(0,e.createElement)(n.Button,{variant:"secondary",onClick:k,isBusy:a,style:d.button},"Install & Activate Otter Blocks");return g?(0,e.createElement)(o,{...i}):(0,e.createElement)(s.Fragment,null,(0,e.createElement)(o,{...i}),(0,e.createElement)(t.InspectorControls,null,Object.keys(p).map((t=>{if(t===window.themeisleSDKPromotions.showPromotion){const o=p[t];return(0,e.createElement)(n.PanelBody,{key:t,title:o.title,initialOpen:!1},(0,e.createElement)("p",null,o.description),(0,e.createElement)(S,null),(0,e.createElement)("img",{style:d.image,src:window.themeisleSDKPromotions.assets+o.image}),(0,e.createElement)(u,{onClick:()=>y(!0)}))}}))))}),"withInspectorControl");(0,i.select)("core/edit-site")||(0,a.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",h);const w=window.wp.plugins,g=window.wp.editPost;function y({stacked:t=!1,type:o,onDismiss:i,onSuccess:a,initialStatus:m=null}){const{title:d,option:p,optionKey:u,labels:h,optimoleActivationUrl:w,optimoleDash:g}=window.themeisleSDKPromotions,[y,E]=(0,s.useState)(!1),[f,v]=(0,s.useState)(m),[k,S]=l(),b=async()=>{E(!0);const e={...p};e[o]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await S(u,JSON.stringify(e)),i&&i()},P=async e=>{e.preventDefault(),v("installing"),await r("optimole-wp"),v("activating"),await c(w),S("themeisle_sdk_promotions_optimole_installed",!0).then((()=>{v("done")}))};if(y)return null;const D=()=>"done"===f?(0,e.createElement)("div",{className:"done"},(0,e.createElement)("p",null," ",h.all_set),(0,e.createElement)(n.Button,{icon:"external",isPrimary:!0,href:g,target:"_blank"},h.optimole.gotodash)):(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===f&&h.installing,"activating"===f&&h.activating,"…")),_=()=>(0,e.createElement)(n.Button,{disabled:f&&"done"!==f,onClick:b,isLink:!0,className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},h.optimole.dismisscta)),K=(t=!1)=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.Button,{isPrimary:!0,onClick:P,className:t?"cta":""},h.optimole.installOptimole),(0,e.createElement)(n.Button,{isLink:!0,target:"_blank",href:"https://wordpress.org/plugins/optimole-wp"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null," ",h.learnmore))),N=(0,e.createElement)("div",{className:"ti-om-stack-wrap ti-sdk-om-notice"},(0,e.createElement)("div",{className:"om-stack-notice"},_(),(0,e.createElement)("i",null,d),(0,e.createElement)("p",null,["om-editor","om-image-block"].includes(o)?h.optimole.message1:h.optimole.message2),f?D():K(!0))),B=(0,e.createElement)(e.Fragment,null,_(),(0,e.createElement)("div",{className:"content"},(0,e.createElement)("div",null,(0,e.createElement)("p",null,d),(0,e.createElement)("p",{className:"description"},"om-media"===o?h.optimole.message3:h.optimole.message4),f?D():(0,e.createElement)("div",{className:"actions"},K()))));return t?N:B}const E=()=>{const[t,n]=(0,s.useState)(!0),{getBlocks:o}=(0,i.useSelect)((e=>{const{getBlocks:t}=e("core/block-editor");return{getBlocks:t}}));var a;if((a=o(),"core/image",a.reduce(m,[]).filter((e=>"core/image"===e.name))).length<2)return null;const l="ti-sdk-optimole-post-publish "+(t?"":"hidden");return(0,e.createElement)(g.PluginPostPublishPanel,{className:l},(0,e.createElement)(y,{stacked:!0,type:"om-editor",onDismiss:()=>{n(!1)}}))};new class{constructor(){const{showPromotion:e,debug:t}=window.themeisleSDKPromotions;this.promo=e,this.debug="1"===t,this.domRef=null,this.run()}run(){if(this.debug)this.runAll();else switch(this.promo){case"om-attachment":this.runAttachmentPromo();break;case"om-media":this.runMediaPromo();break;case"om-editor":this.runEditorPromo();break;case"om-image-block":this.runImageBlockPromo();break;case"om-elementor":this.runElementorPromo()}}runAttachmentPromo(){wp.media.view.Attachment.Details.prototype.on("ready",(()=>{setTimeout((()=>{this.removeAttachmentPromo(),this.addAttachmentPromo()}),100)})),wp.media.view.Modal.prototype.on("close",(()=>{setTimeout(this.removeAttachmentPromo,100)}))}runMediaPromo(){if(window.themeisleSDKPromotions.option["om-media"])return;const t=document.querySelector("#ti-optml-notice");t&&(0,s.render)((0,e.createElement)(y,{type:"om-media",onDismiss:()=>{t.style.opacity=0}}),t)}runImageBlockPromo(){if(window.themeisleSDKPromotions.option["om-image-block"])return;let n=!0,i=null;const l=(0,o.createHigherOrderComponent)((o=>a=>"core/image"===a.name&&n?(0,e.createElement)(s.Fragment,null,(0,e.createElement)(o,{...a}),(0,e.createElement)(t.InspectorControls,null,(0,e.createElement)(y,{stacked:!0,type:"om-image-block",initialStatus:i,onDismiss:()=>{n=!1},onSuccess:()=>{i="done"}}))):(0,e.createElement)(o,{...a})),"withImagePromo");(0,a.addFilter)("editor.BlockEdit","optimole-promo/image-promo",l,99)}runEditorPromo(){window.themeisleSDKPromotions.option["om-editor"]||(0,w.registerPlugin)("optimole-promo",{render:E})}runElementorPromo(){if(!window.elementor)return;const e=this;elementor.on("preview:loaded",(()=>{elementor.panel.currentView.on("set:page:editor",(t=>{e.domRef&&(0,s.unmountComponentAtNode)(e.domRef),t.activeSection&&"section_image"===t.activeSection&&e.runElementorActions(e)}))}))}addAttachmentPromo(){if(this.domRef&&(0,s.unmountComponentAtNode)(this.domRef),window.themeisleSDKPromotions.option["om-attachment"])return;const t=document.querySelector("#ti-optml-notice-helper");t&&(this.domRef=t,(0,s.render)((0,e.createElement)("div",{className:"notice notice-info ti-sdk-om-notice",style:{margin:0}},(0,e.createElement)(y,{type:"om-attachment",onDismiss:()=>{t.style.opacity=0}})),t))}removeAttachmentPromo(){const e=document.querySelector("#ti-optml-notice-helper");e&&(0,s.unmountComponentAtNode)(e)}runElementorActions(t){if(window.themeisleSDKPromotions.option["om-elementor"])return;const n=document.querySelector("#elementor-panel__editor__help"),o=document.createElement("div");o.id="ti-optml-notice",t.domRef=o,n&&(n.parentNode.insertBefore(o,n),(0,s.render)((0,e.createElement)(y,{stacked:!0,type:"om-elementor",onDismiss:()=>{o.style.opacity=0}}),o))}runAll(){this.runAttachmentPromo(),this.runMediaPromo(),this.runEditorPromo(),this.runImageBlockPromo(),this.runElementorPromo()}};const f=({onDismiss:t=(()=>{})})=>{const[o,i]=(0,s.useState)(""),[a,m]=l();return(0,e.createElement)(s.Fragment,null,(0,e.createElement)(n.Button,{disabled:"installing"===o,onClick:async()=>{const e={...window.themeisleSDKPromotions.option};e["rop-posts"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await m(window.themeisleSDKPromotions.optionKey,JSON.stringify(e)),t&&t()},variant:"link",className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},"Dismiss this notice.")),(0,e.createElement)("p",null,"Boost your content's reach effortlessly! Introducing ",(0,e.createElement)("b",null,"Revive Social"),", a cutting-edge plugin from the makers of ",window.themeisleSDKPromotions.product,". Seamlessly auto-share old & new content across social media, driving traffic like never before."),(0,e.createElement)("div",{className:"rop-notice-actions"},"installed"!==o?(0,e.createElement)(n.Button,{variant:"primary",isBusy:"installing"===o,onClick:async()=>{i("installing"),await r("tweet-old-post"),await c(window.themeisleSDKPromotions.ropActivationUrl),m("themeisle_sdk_promotions_rop_installed",!Boolean(a("themeisle_sdk_promotions_rop_installed"))),i("installed")}},"Install & Activate"):(0,e.createElement)(n.Button,{variant:"primary",href:window.themeisleSDKPromotions.ropDash},"Visit Dashboard"),(0,e.createElement)(n.Button,{variant:"link",target:"_blank",href:"https://wordpress.org/plugins/tweet-old-post/"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null,"Learn more"))))};new class{constructor(){const{showPromotion:e,debug:t}=window.themeisleSDKPromotions;this.promo=e,this.debug="1"===t,this.domRef=null,this.run()}run(){if(window.themeisleSDKPromotions.option["rop-posts"])return;const t=document.querySelector("#ti-rop-notice");t&&(0,s.render)((0,e.createElement)(f,{onDismiss:()=>{t.style.display="none"}}),t)}};const v=({onDismiss:t=(()=>{})})=>{const{title:o,optionKey:i,labels:a,neveAction:c,activateNeveURL:m}=window.themeisleSDKPromotions,[d,p]=l(),[u,h]=(0,s.useState)(null);return(0,e.createElement)(s.Fragment,null,(0,e.createElement)(n.Button,{disabled:u&&"done"!==u,onClick:async()=>{const e={...window.themeisleSDKPromotions.option};e["neve-themes-popular"]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await p(i,JSON.stringify(e)),t&&t()},isLink:!0,className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},a.redirectionCF7.dismisscta)),(0,e.createElement)("div",{className:"content"},(0,e.createElement)("div",null,(0,e.createElement)("p",null,o),(0,e.createElement)("p",{className:"description"},"Meet ",(0,e.createElement)("b",null,"Neve"),", from the creators of ",window.themeisleSDKPromotions.product,". A very fast and free theme, trusted by over 300,000 users for building their websites and rated 4.7 stars!"),!u&&(0,e.createElement)("div",{className:"actions"},(0,e.createElement)(n.Button,{variant:"primary",onClick:e=>{if(e.preventDefault(),"activate"===c)return h("activating"),void p("themeisle_sdk_promotions_neve_installed",!0).then((()=>{window.location.href=m}));h("installing"),r("neve",!0).then((e=>{h("activating"),p("themeisle_sdk_promotions_neve_installed",!0).then((()=>{window.location.href=e.data.activateUrl}))}))}},"install"===c&&a.installActivate,"activate"===c&&a.activate),(0,e.createElement)(n.Button,{variant:"link",href:window.themeisleSDKPromotions.nevePreviewURL},a.preview)),u&&"done"!==u&&(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===u&&a.installing,"activating"===u&&a.activating,"…")))))};function k({type:t,onDismiss:o}){const{title:i,option:a,optionKey:m,labels:d,rfCF7ActivationUrl:p,cf7Dash:u}=window.themeisleSDKPromotions,[h,w]=(0,s.useState)(!1),[g,y]=(0,s.useState)(null),[E,f]=l();if(h)return null;const v=(0,e.createElement)("div",{className:"actions"},(0,e.createElement)(n.Button,{isPrimary:!0,onClick:async e=>{e.preventDefault(),y("installing"),await r("wpcf7-redirect"),y("activating"),await c(p),f("themeisle_sdk_promotions_redirection_cf7_installed",!Boolean(E("themeisle_sdk_promotions_redirection_cf7_installed"))),y("done")}},d.redirectionCF7.gst),(0,e.createElement)(n.Button,{isLink:!0,target:"_blank",href:"https://wordpress.org/plugins/wpcf7-redirect/"},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null," ",d.learnmore)));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.Button,{disabled:g&&"done"!==g,onClick:async()=>{w(!0);const e={...a};e[t]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions.option=e,await f(m,JSON.stringify(e)),o&&o()},isLink:!0,className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},d.redirectionCF7.dismisscta)),(0,e.createElement)("div",{className:"content"},(0,e.createElement)("div",null,(0,e.createElement)("p",null,i),(0,e.createElement)("p",{className:"description"},d.redirectionCF7.message),g?"done"===g?(0,e.createElement)("div",{className:"done"},(0,e.createElement)("p",null," ",d.all_set),(0,e.createElement)(n.Button,{icon:"external",variant:"primary",href:u,target:"_blank"},d.redirectionCF7.gotodash)):(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===g&&d.installing,"activating"===g&&d.activating,"…")):v)))}new class{constructor(){const{showPromotion:e,debug:t}=window.themeisleSDKPromotions;this.promo=e,this.debug="1"===t,this.domRef=null,this.run()}run(){if(window.themeisleSDKPromotions.option["neve-themes-popular"])return;const t=document.querySelector("#ti-neve-notice");t&&(0,s.render)((0,e.createElement)(v,{onDismiss:()=>{t.style.display="none"}}),t)}},new class{constructor(){this.run()}run(){if(window.themeisleSDKPromotions.option["redirection-cf7"])return;const t=document.querySelector("#ti-redirection-cf7-notice");t&&(0,s.render)((0,e.createElement)(k,{type:"redirection-cf7",onDismiss:()=>{t.style.display="none"}}),t)}};const S=({title:t,option:o,optionKey:i,labels:a,pluginSlug:m,activationUrl:d,dashboardUrl:p,learnMoreUrl:u,labelKey:h,optionInstallKey:w,installedOptionKey:g,onDismiss:y=(()=>{})})=>{const[E,f]=(0,s.useState)(!1),[v,k]=(0,s.useState)(null),[S,b]=l();if(E)return null;const P=(0,e.createElement)("div",{className:"actions"},(0,e.createElement)(n.Button,{variant:"primary",onClick:async e=>{e.preventDefault(),k("installing"),await r(m),k("activating"),await c(d),b(g,!Boolean(S(g))),k("done")}},a[h].install),(0,e.createElement)(n.Button,{variant:"link",target:"_blank",href:u},(0,e.createElement)("span",{className:"dashicons dashicons-external"}),(0,e.createElement)("span",null,a.learnmore)));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(n.Button,{disabled:v&&"done"!==v,onClick:async()=>{f(!0);const e={...o};e[w]=(new Date).getTime()/1e3|0,window.themeisleSDKPromotions&&(window.themeisleSDKPromotions.option=e),await b(i,JSON.stringify(e)),y&&y()},variant:"link",className:"om-notice-dismiss"},(0,e.createElement)("span",{className:"dashicons-no-alt dashicons"}),(0,e.createElement)("span",{className:"screen-reader-text"},a[h].dismisscta)),(0,e.createElement)("div",{className:"content"},(0,e.createElement)("div",null,(0,e.createElement)("p",null,t),(0,e.createElement)("p",{className:"description"},a[h].message),v?"done"===v?(0,e.createElement)("div",{className:"done"},(0,e.createElement)("p",null,a.all_set),(0,e.createElement)(n.Button,{icon:"external",variant:"primary",href:p,target:"_blank"},a[h].gotodash)):(0,e.createElement)("p",{className:"om-progress"},(0,e.createElement)("span",{className:"dashicons dashicons-update spin"}),(0,e.createElement)("span",null,"installing"===v&&a.installing,"activating"===v&&a.activating,"…")):P)))};(()=>{if(window.themeisleSDKPromotions.option["hyve-plugins-install"])return;const t=document.querySelector("#ti-hyve-notice");if(!t)return;const{title:n,option:o,optionKey:i,labels:a,hyveActivationUrl:l,hyveDash:r}=window.themeisleSDKPromotions;(0,s.createRoot)(t).render((0,e.createElement)(S,{title:n,option:o,optionKey:i,labels:a,pluginSlug:"hyve-lite",activationUrl:l,dashboardUrl:r,learnMoreUrl:"https://wordpress.org/plugins/hyve-lite/",labelKey:"hyve",optionInstallKey:"hyve-plugins-install",installedOptionKey:"themeisle_sdk_promotions_hyve_installed",onDismiss:()=>{t.style.display="none"}}))})();const b=(0,o.createHigherOrderComponent)((o=>i=>{if("core/rss"!==i.name||!Boolean(window.themeisleSDKPromotions.showPromotion))return(0,e.createElement)(o,{...i});if("feedzy-editor"!==window.themeisleSDKPromotions.showPromotion)return(0,e.createElement)(o,{...i});const[a,r,c]=l(),[m,d]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{m&&(()=>{const e={...window.themeisleSDKPromotions.option};e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,r("themeisle_sdk_promotions",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1})()}),[m]),m?(0,e.createElement)(o,{...i}):(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o,{...i}),(0,e.createElement)(t.InspectorControls,null,(0,e.createElement)(n.PanelBody,null,(0,e.createElement)("div",{style:{padding:"16px 10px",backgroundColor:"#f0f6fc",borderLeft:"4px solid #72aee6",margin:"5px 0",fontSize:"13px",color:"#1e1e1e",position:"relative"}},(0,e.createElement)("div",{dangerouslySetInnerHTML:{__html:window.themeisleSDKPromotions.labels.feedzy.editor_recommends}}),(0,e.createElement)("button",{onClick:()=>d(!0),style:{position:"absolute",top:"-2px",right:"3px",cursor:"pointer",background:"none",border:"none",padding:"2px",color:"#757575",fontSize:"16px"}},"×")))))}),"withFeedzyNotice");(0,a.addFilter)("editor.BlockEdit","feedzy/with-notice",b),(()=>{if(window.themeisleSDKPromotions.option["wp-full-pay-plugins-install"])return;const t=document.querySelector("#ti-wp-full-pay-notice");if(!t)return;const{title:n,option:o,optionKey:i,labels:a,wpFullPayActivationUrl:l,wpFullPayDash:r}=window.themeisleSDKPromotions;(0,s.createRoot)(t).render((0,e.createElement)(S,{title:n,option:o,optionKey:i,labels:a,pluginSlug:"wp-full-stripe-free",activationUrl:l,dashboardUrl:r,learnMoreUrl:"https://wordpress.org/plugins/wp-full-stripe-free/",labelKey:"wp_full_pay",optionInstallKey:"wp-full-pay-plugins-install",installedOptionKey:"themeisle_sdk_promotions_wp_full_pay_installed",onDismiss:()=>{t.style.display="none"}}))})(),(()=>{if(window.themeisleSDKPromotions.option["masteriyo-plugins-install"])return;const t=document.querySelector("#ti-masteriyo-notice");if(!t)return;const{title:n,option:o,optionKey:i,labels:a,masteriyoActivationUrl:l,masteriyoDash:r}=window.themeisleSDKPromotions;(0,s.createRoot)(t).render((0,e.createElement)(S,{title:n,option:o,optionKey:i,labels:a,pluginSlug:"learning-management-system",activationUrl:l,dashboardUrl:r,learnMoreUrl:"https://wordpress.org/plugins/learning-management-system/",labelKey:"masteriyo",optionInstallKey:"masteriyo-plugins-install",installedOptionKey:"themeisle_sdk_promotions_masteriyo_installed",onDismiss:()=>{t.style.display="none"}}))})()}},n={};function o(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.m=t,e=[],o.O=(t,n,i,s)=>{if(!n){var a=1/0;for(m=0;m=s)&&Object.keys(o.O).every((e=>o.O[e](n[r])))?n.splice(r--,1):(l=!1,s0&&e[m-1][2]>s;m--)e[m]=e[m-1];e[m]=[n,i,s]},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var i,s,[a,l,r]=n,c=0;if(a.some((t=>0!==e[t]))){for(i in l)o.o(l,i)&&(o.m[i]=l[i]);if(r)var m=r(o)}for(t&&t(n);co(150)));i=o.O(i)})(); \ No newline at end of file diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/survey/survey_deps.asset.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/survey/survey_deps.asset.php index dacfad07..fc1f91db 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/survey/survey_deps.asset.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/survey/survey_deps.asset.php @@ -1 +1 @@ - array(), 'version' => '92a432317d1433f31603'); + array(), 'version' => '44eb6f2a376d36991f76'); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/survey/survey_deps.js b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/survey/survey_deps.js index 20408ebd..49e206fb 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/survey/survey_deps.js +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/assets/js/build/survey/survey_deps.js @@ -1 +1 @@ -(()=>{"use strict";let i=!1,r=!1;const o=[],t=new Proxy({},{get:(t,e,n)=>(...t)=>(async(t,...e)=>{if(r){if(window.formbricks){const i=t;await window.formbricks[i](...e)}}else if("init"===t){if(i)return void console.warn("🧱 Formbricks - Warning: Formbricks is already initializing.");i=!0;const t=e[0].apiHost;if((await(async i=>{if(!window.formbricks){const r=document.createElement("script");r.type="text/javascript",r.src=`${i}/js/formbricks.umd.cjs`,r.async=!0;const o=async()=>new Promise(((i,o)=>{const t=setTimeout((()=>{o(new Error("Formbricks SDK loading timed out"))}),1e4);r.onload=()=>{clearTimeout(t),i()},r.onerror=()=>{clearTimeout(t),o(new Error("Failed to load Formbricks SDK"))}}));document.head.appendChild(r);try{return await o(),{ok:!0,data:void 0}}catch(i){return{ok:!1,error:new Error(i.message??"Failed to load Formbricks SDK")}}}return{ok:!0,data:void 0}})(t)).ok&&window.formbricks){window.formbricks.init(...e),i=!1,r=!0;for(const{prop:i,args:r}of o)"function"==typeof window.formbricks[i]?window.formbricks[i](...r):console.error(`🧱 Formbricks - Error: Method ${i} does not exist on formbricks`)}}else console.warn("🧱 Formbricks - Warning: Formbricks not initialized. This method will be queued and executed after initialization."),o.push({prop:t,args:e})})(e,...t)});document.addEventListener("DOMContentLoaded",(()=>{window.tsdk_formbricks={init:i=>{var r,o;"object"==typeof i&&null!==i||(i={});const e={...window.tsdk_survey_data,...i,attributes:{...null!==(r=window.tsdk_survey_data.attributes)&&void 0!==r?r:{},...null!==(o=i.attributes)&&void 0!==o?o:{}}};t?.init(e)}};let i=null;var r;r=window.tsdk_survey_data?.attributes?.install_days_number,isNaN(r)||"boolean"==typeof r||(i=setTimeout((()=>{window.tsdk_formbricks?.init()}),350)),window.addEventListener("themeisle:survey:trigger:cancel",(()=>{clearTimeout(i)})),window.dispatchEvent(new Event("themeisle:survey:loaded"))}))})(); \ No newline at end of file +(()=>{"use strict";let r=!1,e=!1;const t=[],o=new Proxy({},{get:(o,i,n)=>(...o)=>(async(o,...i)=>{if(e){if(window.formbricks){const r=window.formbricks,e=o;await r[e](...i)}}else if("setup"===o){if(r)return void console.warn("🧱 Formbricks - Warning: Formbricks is already initializing.");r=!0;const o=i[0],{appUrl:n,environmentId:s}=o;if(!n)return void console.error("🧱 Formbricks - Error: appUrl is required");if(!s)return void console.error("🧱 Formbricks - Error: environmentId is required");if((await(async r=>{if(!window.formbricks){const e=document.createElement("script");e.type="text/javascript",e.src=`${r}/js/formbricks.umd.cjs`,e.async=!0;const t=async()=>new Promise(((r,t)=>{const o=setTimeout((()=>{t(new Error("Formbricks SDK loading timed out"))}),1e4);e.onload=()=>{clearTimeout(o),r()},e.onerror=()=>{clearTimeout(o),t(new Error("Failed to load Formbricks SDK"))}}));document.head.appendChild(e);try{return await t(),{ok:!0,data:void 0}}catch(r){return{ok:!1,error:new Error(r.message??"Failed to load Formbricks SDK")}}}return{ok:!0,data:void 0}})(n)).ok&&window.formbricks){const o=window.formbricks;o.setup(...i),r=!1,e=!0;for(const{prop:r,args:e}of t)"function"==typeof o[r]?o[r](...e):console.error(`🧱 Formbricks - Error: Method ${r} does not exist on formbricks`)}}else console.warn("🧱 Formbricks - Warning: Formbricks not initialized. This method will be queued and executed after initialization."),t.push({prop:o,args:i})})(i,...o)});document.addEventListener("DOMContentLoaded",(()=>{window.tsdk_formbricks={init:async r=>{var e,t;"object"==typeof r&&null!==r||(r={});const i={...window.tsdk_survey_data,...r,attributes:{...null!==(e=window.tsdk_survey_data.attributes)&&void 0!==e?e:{},...null!==(t=r.attributes)&&void 0!==t?t:{}}},{environmentId:n,appUrl:s,attributes:a,userId:d}=i;await(o?.setup({environmentId:n,appUrl:s})),o?.setAttributes(a),function(){const r=localStorage.getItem("formbricks-js");if(!r)return!0;try{const e=JSON.parse(r);if(e?.user?.data?.userId)return!1}catch(r){console.warn(r)}return!0}()&&o?.setUserId(d)}};let r=null;var e;e=window.tsdk_survey_data?.attributes?.install_days_number,isNaN(e)||"boolean"==typeof e||(r=setTimeout((()=>{window.tsdk_formbricks?.init()}),350)),window.addEventListener("themeisle:survey:trigger:cancel",(()=>{clearTimeout(r)})),window.dispatchEvent(new Event("themeisle:survey:loaded"))}))})(); \ No newline at end of file diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php index 411c4eb3..0ed64866 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/load.php @@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) { return; } // Current SDK version and path. -$themeisle_sdk_version = '3.3.44'; +$themeisle_sdk_version = '3.3.51'; $themeisle_sdk_path = dirname( __FILE__ ); global $themeisle_sdk_max_version; diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php index 54b9a59d..2121b85b 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Common/Abstract_module.php @@ -41,6 +41,7 @@ abstract class Abstract_Module { 'templates-patterns-collection' => 'templates-patterns-collection/templates-patterns-collection.php', 'wpcf7-redirect' => 'wpcf7-redirect/wpcf7-redirect.php', 'wp-full-stripe-free' => 'wp-full-stripe-free/wp-full-stripe.php', + 'learning-management-system' => 'learning-management-system/lms.php', ]; /** @@ -220,4 +221,13 @@ abstract class Abstract_Module { return is_plugin_active( $plugin ); } + + /** + * Get the current date. + * + * @return \DateTime The date time. + */ + public function get_current_date() { + return apply_filters( 'themeisle_sdk_current_date', new \DateTime( 'now' ) ); + } } diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php index afd4917c..da4f2538 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Loader.php @@ -64,6 +64,7 @@ final class Loader { 'announcements', 'featured_plugins', 'float_widget', + 'migrator', ]; /** * Holds the labels for the modules. @@ -72,10 +73,11 @@ final class Loader { */ public static $labels = [ 'announcements' => [ - 'hurry_up' => 'Hurry up! Only %s left.', - 'sale_live' => 'Themeisle Black Friday Sale is Live!', - 'learn_more' => 'Learn more', - 'max_savings' => 'Enjoy Maximum Savings on %s', + 'notice_link_label' => 'See the deals', + 'max_savings' => 'Best WordPress Black Friday deals of %s — themes, plugins, hosting. Curated by the Themeisle team.', + 'black_friday' => 'Black Friday Sale', + 'time_left' => '%s left', + 'plugin_meta_message' => 'Black Friday Sale - 60% OFF', ], 'compatibilities' => [ 'notice' => '%s requires a newer version of %s. Please %supdate%s %s %s to the latest version.', @@ -108,10 +110,14 @@ final class Loader { 'valid' => 'Valid', 'invalid' => 'Invalid', 'notice' => 'Enter your license from %s purchase history in order to get %s updates', - 'expired' => 'Your %s\'s License Key has expired. In order to continue receiving support and software updates you must %srenew%s your license key.', + 'expired' => '%s license expired', + 'expired_date' => 'Expired on %s', + 'expired_notice' => 'Your current setup continues working, but premium features are disabled and you\'re no longer receive updates - including critical patches - or support.', 'inactive' => 'In order to benefit from updates and support for %s, please add your license code from your %spurchase history%s and validate it %shere%s.', 'no_activations' => 'No more activations left for %s. You need to upgrade your plan in order to use %s on more websites. If you need assistance, please get in touch with %s staff.', + 'renew_license' => 'Renew License', + 'learn_more' => 'Learn More', ], 'promotions' => [ 'recommended' => 'Recommended by %s', @@ -172,6 +178,12 @@ final class Loader { 'dismisscta' => 'Dismiss this notice.', 'message' => 'Enhance your donation page with WP Full Pay—create custom Stripe forms for one-time and recurring donations, manage transactions easily, and boost support with a seamless setup.', ], + 'masteriyo' => [ + 'gotodash' => 'Go to Masteriyo Dashboard', + 'install' => 'Install Masteriyo', + 'dismisscta' => 'Dismiss this notice.', + 'message' => 'Transform your site into a learning hub with Masteriyo LMS. Build engaging courses with intuitive tools, track student progress effortlessly, and grow your education business with powerful marketing features and seamless payment integration.', + ], ], 'welcome' => [ 'ctan' => 'No, thanks.', @@ -243,9 +255,9 @@ final class Loader { 'cta' => 'Rollback to v%s', ], 'logger' => [ - 'notice' => 'Do you enjoy {product}? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.', - 'cta_y' => 'Sure, I would love to help.', - 'cta_n' => 'No, thanks.', + 'notice' => 'Help improve {product} by sharing anonymous usage data about your setup. No personal data collected.', + 'cta_y' => 'Count me in', + 'cta_n' => 'No thanks', ], 'about_us' => [ 'title' => 'About Us', @@ -325,10 +337,7 @@ final class Loader { * Initialize the sdk logic. */ public static function init() { - /** - * This filter can be used to localize the labels inside each product. - */ - self::$labels = apply_filters( 'themeisle_sdk_labels', self::$labels ); + self::localize_labels(); if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Loader ) ) { self::$instance = new Loader(); $modules = array_merge( self::$available_modules, apply_filters( 'themeisle_sdk_modules', [] ) ); @@ -338,8 +347,92 @@ final class Loader { } } self::$available_modules = $modules; + + add_action( 'themeisle_sdk_first_activation', array( __CLASS__, 'activate' ) ); + } } + + /** + * Localize the labels. + */ + public static function localize_labels() { + $originals = self::$labels; + $all_translations = []; + + global $wp_filter; + if ( isset( $wp_filter['themeisle_sdk_labels'] ) ) { + foreach ( $wp_filter['themeisle_sdk_labels']->callbacks as $priority => $hooks ) { + foreach ( $hooks as $hook ) { + // Each callback gets fresh originals, not previous callback's output + $result = call_user_func( $hook['function'], $originals ); + $all_translations[] = $result; + } + } + + // Remove the filter so it doesn't run again via apply_filters + remove_all_filters( 'themeisle_sdk_labels' ); + } + + // Merge all results, first real translation wins + self::$labels = self::merge_all_translations( $originals, $all_translations ); + } + /** + * Merge all translations. + * + * @param array $originals The original labels. + * @param array $all_translations The all translations. + * + * @return array The merged labels. + */ + private static function merge_all_translations( $originals, $all_translations ) { + $result = $originals; + + foreach ( $all_translations as $translations ) { + $result = self::merge_if_translated( $result, $translations, $originals ); + } + + return $result; + } + /** + * Merge if translated. + * + * @param array $current The current labels. + * @param array $new The new labels. + * @param array $originals The original labels. + * @return array The merged labels. + */ + private static function merge_if_translated( $current, $new, $originals ) { + foreach ( $new as $key => $value ) { + if ( ! isset( $originals[ $key ] ) ) { + // New key, accept it + if ( ! isset( $current[ $key ] ) ) { + $current[ $key ] = $value; + } + continue; + } + + if ( is_array( $value ) && is_array( $originals[ $key ] ) ) { + $current[ $key ] = self::merge_if_translated( + $current[ $key ], + $value, + $originals[ $key ] + ); + } else { + // Only accept if: + // 1. New value is actually translated (differs from original) + // 2. Current value is NOT already translated + $is_new_translated = ( $value !== $originals[ $key ] ); + $is_current_untranslated = ( $current[ $key ] === $originals[ $key ] ); + + if ( $is_new_translated && $is_current_untranslated ) { + $current[ $key ] = $value; + } + } + } + + return $current; + } /** * Get cache token used in API requests. @@ -384,6 +477,28 @@ final class Loader { return self::$instance; } + /** + * Activate the product routine. + * + * @param string $file The base file of the product. + * + * @return void + */ + public static function activate( $file ) { + + $dirname = trailingslashit( dirname( ( $file ) ) ); + if ( ! file_exists( $dirname . '_reference.php' ) ) { + return; + } + $reference_data = require_once $dirname . '_reference.php'; + if ( ! is_array( $reference_data ) || + ! isset( $reference_data['key'] ) || + ! isset( $reference_data['value'] ) || + ! preg_match( '/^[a-zA-Z0-9_]+_reference_key$/', $reference_data['key'] ) ) { + return; + } + add_option( $reference_data['key'], sanitize_key( $reference_data['value'] ) ); + } /** * Get all registered modules by the SDK. * diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/About_us.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/About_us.php index cae77736..02a06835 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/About_us.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/About_us.php @@ -14,6 +14,7 @@ * 'has_upgrade_menu' => , * 'upgrade_link' => , * 'upgrade_text' => 'Get Pro Version', + * 'review_link' => false, // Leave it empty for default WPorg link or false to hide it. * ] * } * @@ -95,6 +96,9 @@ class About_Us extends Abstract_Module { return; } + // Refresh the about data to get the latest changes. + $this->about_data = apply_filters( $this->product->get_key() . '_about_us_metadata', array() ); + add_submenu_page( $this->about_data['location'], Loader::$labels['about_us']['title'], @@ -182,6 +186,8 @@ class About_Us extends Abstract_Module { $asset_file = require $themeisle_sdk_max_path . '/assets/js/build/about/about.asset.php'; $deps = array_merge( $asset_file['dependencies'], [ 'updates' ] ); + do_action( 'themeisle_internal_page', $this->product->get_slug(), 'about_us' ); + 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() ); @@ -228,6 +234,7 @@ class About_Us extends Abstract_Module { ], 'canInstallPlugins' => current_user_can( 'install_plugins' ), 'canActivatePlugins' => current_user_can( 'activate_plugins' ), + 'showReviewLink' => ! ( isset( $this->about_data['review_link'] ) && false === $this->about_data['review_link'] ), ]; } @@ -334,6 +341,9 @@ class About_Us extends Abstract_Module { 'description' => Loader::$labels['about_us']['others']['neve_desc'], 'icon' => $this->get_sdk_uri() . 'assets/images/neve.png', ], + 'learning-management-system' => [ + 'name' => 'Masteriyo LMS', + ], 'otter-blocks' => [ 'name' => 'Otter', ], diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Abstract_Migration.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Abstract_Migration.php new file mode 100644 index 00000000..524f7ae4 --- /dev/null +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Abstract_Migration.php @@ -0,0 +1,88 @@ +wpdb = $wpdb; + $this->prefix = $wpdb->prefix; + $this->charset_collate = $wpdb->get_charset_collate(); + } + + /** + * Run the migration. + */ + abstract public function up(); + + /** + * Reverse the migration. + * + * Override in concrete migrations to undo what up() did. Called by + * Migrator::rollback() — never invoked automatically. + * + * @return void + */ + public function down() { + // No-op by default. Override to implement rollback logic. + } + + /** + * Determine whether this migration should run. + * + * Override to add a custom idempotency check beyond name-based tracking. + * Return false to skip the migration without recording it. + * + * @return bool + */ + public function should_run() { + return true; + } +} diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Announcements.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Announcements.php index f9fac09f..a859255a 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Announcements.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Announcements.php @@ -13,6 +13,7 @@ namespace ThemeisleSDK\Modules; +use DateTime; use ThemeisleSDK\Common\Abstract_Module; use ThemeisleSDK\Loader; use ThemeisleSDK\Product; @@ -22,56 +23,29 @@ use ThemeisleSDK\Product; */ class Announcements extends Abstract_Module { + const SALE_DURATION_BLACK_FRIDAY = '+7 days'; // DateTime modifier. (Include Cyber Monday) + const MINIMUM_INSTALL_AGE = 3 * DAY_IN_SECONDS; + /** - * Holds the timeline for the announcements. + * Mark if the notice was already loaded. * - * @var array + * @var boolean */ - private static $timeline = array( - 'black_friday' => array( - 'start' => '2024-11-25 00:00:00', - 'end' => '2024-12-03 23:59:59', - 'rendered' => false, - ), - ); + private static $notice_loaded = false; /** - * Mark is a banner for a product was already loaded. + * Mark if the plugin meta link was already loaded. * - * @var array + * @var boolean */ - private static $banner_loaded = array(); - - const PLUGIN_PAGE = 'https://themeisle.com/plugins'; - const THEME_PAGE = 'https://themeisle.com/themes'; - const REVIVE_SOCIAL = 'https://revive.social/plugins'; + private static $meta_link_loaded = false; /** - * Holds the option prefix for the announcements. - * - * This is used to store the dismiss date for each announcement. + * The product to be used. * * @var string */ - public $option_prefix = 'themeisle_sdk_announcement_'; - - /** - * Holds the time for the current request. - * - * @var string - */ - public $time = ''; - - /** - * Constructor for the Announcements module. - * - * @param array $timeline Optional. An array representing the timeline of announcements. Default is an empty array. - */ - public function __construct( $timeline = array() ) { - if ( is_array( $timeline ) && ! empty( $timeline ) ) { - self::$timeline = $timeline; - } - } + private static $current_product = ''; /** * Check if the module can be loaded. @@ -96,16 +70,17 @@ class Announcements extends Abstract_Module { * @return void */ public function load( $product ) { - if ( ! current_user_can( 'install_plugins' ) ) { - return; - } - $this->product = $product; - add_action( 'admin_init', array( $this, 'load_announcements' ) ); - add_filter( 'themeisle_sdk_active_announcements', array( $this, 'get_active_announcements' ) ); - add_filter( 'themeisle_sdk_announcements', array( $this, 'get_announcements_for_plugins' ) ); - add_action( 'themeisle_sdk_load_banner', array( $this, 'load_dashboard_banner_renderer' ) ); + add_filter( + 'themeisle_sdk_is_black_friday_sale', + function( $is_black_friday ) { + return $this->is_black_friday_sale( $this->get_current_date() ); + } + ); + + add_action( 'admin_menu', array( $this, 'load_announcements' ), 9 ); + add_action( 'wp_ajax_themeisle_sdk_dismiss_black_friday_notice', array( $this, 'disable_notification_ajax' ) ); } /** @@ -114,197 +89,132 @@ class Announcements extends Abstract_Module { * @return void */ public function load_announcements() { - $active = $this->get_active_announcements(); - - if ( empty( $active ) ) { + $current_date = $this->get_current_date(); + if ( ! $this->is_black_friday_sale( $current_date ) ) { return; } - foreach ( $active as $announcement ) { - - $method = $announcement . '_notice_render'; - - if ( method_exists( $this, $method ) ) { - add_action( 'admin_notices', array( $this, $method ) ); - } + if ( self::MINIMUM_INSTALL_AGE > ( $current_date->getTimestamp() - $this->product->get_install_time() ) ) { + return; } - // Load the ajax handler. - add_action( 'wp_ajax_themeisle_sdk_dismiss_announcement', array( $this, 'disable_notification_ajax' ) ); + add_action( 'admin_notices', array( $this, 'black_friday_notice_render' ) ); + + add_action( + 'themeisle_internal_page', + function( $plugin, $page_slug ) { + self::$current_product = $plugin; + }, + 10, + 2 + ); + + add_filter( 'plugin_row_meta', array( $this, 'add_plugin_meta_links' ), 10, 2 ); + add_filter( $this->product->get_key() . '_about_us_metadata', array( $this, 'override_about_us_metadata' ), 100 ); } /** - * Get all active announcements. + * Get the remaining time for the event in a human-readable format. * - * @return array List of active announcements. - */ - public function get_active_announcements() { - $active = array(); - - foreach ( self::$timeline as $announcement_slug => $dates ) { - if ( $this->is_active( $dates ) && $this->can_show( $announcement_slug, $dates ) ) { - $active[] = $announcement_slug; - } - } - - return $active; - } - - /** - * Get all announcements along with plugin specific data. - * - * @return array List of announcements. - */ - public function get_announcements_for_plugins() { - - $announcements = array(); - - foreach ( self::$timeline as $announcement => $dates ) { - $announcements[ $announcement ] = $dates; - - if ( false !== strpos( $announcement, 'black_friday' ) ) { - $announcements[ $announcement ]['active'] = $this->is_active( $dates ); - - // Dashboard banners URLs. - $announcements[ $announcement ]['neve_dashboard_url'] = tsdk_utmify( self::THEME_PAGE . '/neve/blackfriday/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['hestia_dashboard_url'] = tsdk_utmify( self::THEME_PAGE . '/hestia/blackfriday/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['feedzy_dashboard_url'] = tsdk_utmify( self::PLUGIN_PAGE . '/feedzy-rss-feeds/blackfriday/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['otter_dashboard_url'] = tsdk_utmify( self::PLUGIN_PAGE . '/otter-blocks/blackfriday/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['mpg_dashboard_url'] = tsdk_utmify( self::PLUGIN_PAGE . '/multi-pages-generator/blackfriday', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['ppom_dashboard_url'] = tsdk_utmify( self::PLUGIN_PAGE . '/ppom-pro/blackfriday/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['rfc7r_dashboard_url'] = tsdk_utmify( self::PLUGIN_PAGE . '/wpcf7-redirect/blackfriday/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['hyve_dashboard_url'] = tsdk_utmify( self::PLUGIN_PAGE . '/hyve/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['spc_dashboard_url'] = tsdk_utmify( self::PLUGIN_PAGE . '/super-page-cache-pro/blackfriday/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['visualizer_dashboard_url'] = tsdk_utmify( self::PLUGIN_PAGE . '/visualizer-charts-and-graphs/blackfriday/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['feedzy_dashboard_url'] = tsdk_utmify( self::PLUGIN_PAGE . '/feedzy-rss-feeds/blackfriday/', 'bfcm24', 'dashboard' ); - $announcements[ $announcement ]['rop_dashboard_url'] = tsdk_utmify( self::REVIVE_SOCIAL . '/revive-old-post/', 'bfcm24', 'dashboard' ); - - // Customizer banners URLs. - $announcements[ $announcement ]['hestia_customizer_url'] = tsdk_utmify( 'https://themeisle.com/black-friday/', 'bfcm24', 'hestiacustomizer' ); - $announcements[ $announcement ]['neve_customizer_url'] = tsdk_utmify( 'https://themeisle.com/black-friday/', 'bfcm24', 'nevecustomizer' ); - - // Banners urgency text. - $remaining_time = $this->get_remaining_time_for_event( $dates['end'] ); - $announcements[ $announcement ]['remaining_time'] = $remaining_time; - $announcements[ $announcement ]['urgency_text'] = ! empty( $remaining_time ) ? sprintf( Loader::$labels['announcements']['hurry_up'], $remaining_time ) : ''; - - $announcements[ $announcement ]['feedzy_banner_src'] = defined( 'FEEDZY_ABSURL' ) ? FEEDZY_ABSURL . 'img/black-friday.jpg' : ''; - $announcements[ $announcement ]['visualizer_banner_src'] = defined( 'VISUALIZER_ABSURL' ) ? VISUALIZER_ABSURL . 'images/black-friday.jpg' : ''; - $announcements[ $announcement ]['ppom_banner_src'] = defined( 'PPOM_URL' ) ? PPOM_URL . '/images/black-friday.jpg' : ''; - $announcements[ $announcement ]['mpg_banner_src'] = defined( 'MPG_BASE_IMG_PATH' ) ? MPG_BASE_IMG_PATH . '/black-friday.jpg' : ''; - $announcements[ $announcement ]['spc_banner_src'] = defined( 'SWCFPC_PLUGIN_URL' ) ? SWCFPC_PLUGIN_URL . 'assets/img/black-friday.jpg' : ''; - $announcements[ $announcement ]['hestia_banner_src'] = defined( 'HESTIA_ASSETS_URL' ) ? HESTIA_ASSETS_URL . 'img/black-friday.jpg' : ''; - $announcements[ $announcement ]['hyve_banner_src'] = defined( 'HYVE_LITE_URL' ) ? HYVE_LITE_URL . 'assets/images/black-friday.jpg' : ''; - $announcements[ $announcement ]['rfc7r_banner_src'] = defined( 'WPCF7_PRO_REDIRECT_ASSETS_PATH' ) ? WPCF7_PRO_REDIRECT_ASSETS_PATH . 'images/black-friday.jpg' : ''; - $announcements[ $announcement ]['rop_banner_src'] = defined( 'ROP_LITE_URL' ) ? ROP_LITE_URL . 'assets/img/black-friday.jpg' : ''; - - foreach ( $announcements[ $announcement ] as $key => $value ) { - if ( strpos( $key, '_url' ) !== false ) { - $announcements[ $announcement ][ $key ] = tsdk_translate_link( $value ); - } - } - } - } - - return apply_filters( 'themeisle_sdk_announcements_data', $announcements ); - } - - /** - * Get the announcement data. - * - * @param string $announcement The announcement to get the data for. - * - * @return array - */ - public function get_announcement_data( $announcement ) { - return ! empty( $announcement ) && is_string( $announcement ) && isset( self::$timeline[ $announcement ] ) ? self::$timeline[ $announcement ] : array(); - } - - /** - * Check if the announcement has an active timeline. - * - * @param array $dates The announcement to check. - * - * @return bool - */ - public function is_active( $dates ) { - - if ( empty( $this->time ) ) { - $this->time = current_time( 'Y-m-d' ); - } - - $start = isset( $dates['start'] ) ? $dates['start'] : null; - $end = isset( $dates['end'] ) ? $dates['end'] : null; - - if ( $start && $end ) { - return $start <= $this->time && $this->time <= $end; - } elseif ( $start ) { - return $this->time >= $start; - } elseif ( $end ) { - return $this->time <= $end; - } - - return false; - } - - /** - * Get the remaining time for the event in a human readable format. - * - * @param string $end_date The end date for event. + * @param DateTime $end_date The end date for event. * * @return string Remaining time for the event. */ public function get_remaining_time_for_event( $end_date ) { - if ( empty( $end_date ) || ! is_string( $end_date ) ) { - return ''; - } - - return human_time_diff( time(), strtotime( $end_date ) ); - + return human_time_diff( $this->get_current_date()->getTimestamp(), $end_date->getTimestamp() ); } /** * Check if the announcement can be shown. * - * @param string $announcement_slug The announcement to check. - * @param array $dates The announcement to check. + * @param DateTime $current_date The announcement to check. + * @param int $user_id The user id to show the notice. * * @return bool */ - public function can_show( $announcement_slug, $dates ) { - $dismiss_date = get_option( $this->option_prefix . $announcement_slug, false ); + public function can_show_notice( $current_date, $user_id ) { + $current_year = $current_date->format( 'Y' ); + $user_notice_dismiss_timestamp = get_user_meta( $user_id, 'themeisle_sdk_dismissed_notice_black_friday', true ); - if ( false === $dismiss_date ) { + if ( empty( $user_notice_dismiss_timestamp ) ) { return true; } - // If the start date is after the dismiss date, show the notice. - $start = isset( $dates['start'] ) ? $dates['start'] : null; - if ( $start && $dismiss_date < $start ) { - return true; - } + $dismissed_year = wp_date( 'Y', $user_notice_dismiss_timestamp ); - return false; + return $current_year !== $dismissed_year; } /** - * Disable the notification via ajax. + * Calculate the start date for Black Friday based on the year of the given date. * - * @return void + * Black Friday is the day after the Thanksgiving and the sale starts on the Monday of that week. + * + * @param DateTime $date The current date object, used to determine the year. + * @return DateTime The start date of Black Friday for the given year. */ - public function disable_notification_ajax() { - if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['nonce'] ), 'dismiss_themeisle_event_notice' ) ) { - wp_die( 'Invalid nonce! Refresh the page and try again.' ); + public function get_start_date( $date ) { + $year = $date->format( 'Y' ); + $black_friday = new DateTime( "last friday of november {$year}" ); + + $sale_start = clone $black_friday; + $sale_start->modify( 'monday this week' ); + $sale_start->setTime( 0, 0 ); + + return $sale_start; + } + + /** + * Calculate the event end date. + * + * @param DateTime $start_date The start date. + * @return DateTime The end date. + */ + public function get_end_date( $start_date ) { + $black_friday_end = clone $start_date; + $black_friday_end->modify( self::SALE_DURATION_BLACK_FRIDAY ); + $black_friday_end->setTime( 23, 59, 59 ); + return $black_friday_end; + } + + /** + * Check if the current date falls within the Black Friday sale period. + * + * @param DateTime $current_date The date to check. + * @return bool True if the date is within the Black Friday sale period, false otherwise. + */ + public function is_black_friday_sale( $current_date ) { + $black_friday_start_date = $this->get_start_date( $current_date ); + $black_friday_end = $this->get_end_date( $black_friday_start_date ); + return $black_friday_start_date <= $current_date && $current_date <= $black_friday_end; + } + + /** + * Get the notice data. + * + * @return array The notice data. + */ + public function get_notice_data() { + $time_left_label = $this->get_remaining_time_for_event( $this->get_end_date( $this->get_start_date( $this->get_current_date() ) ) ); + $time_left_label = sprintf( Loader::$labels['announcements']['time_left'], $time_left_label ); + + $utm_location = 'globalnotice'; + if ( ! empty( $this->product ) ) { + $utm_location = $this->product->get_friendly_name(); } - if ( ! isset( $_POST['announcement'] ) || ! is_string( $_POST['announcement'] ) ) { - wp_die( 'Invalid announcement! Refresh the page and try again.' ); - } + $sale_title = Loader::$labels['announcements']['black_friday']; + $sale_url = tsdk_translate_link( tsdk_utmify( 'https://themeisle.com/blackfriday/', 'bfcm26', $utm_location ) ); - $announcement = sanitize_key( $_POST['announcement'] ); + $current_year = $this->get_current_date()->format( 'Y' ); + $sale_message = sprintf( Loader::$labels['announcements']['max_savings'], $current_year ); - update_option( $this->option_prefix . $announcement, current_time( 'Y-m-d' ) ); - wp_die( 'success' ); + return array( + 'title' => $sale_title, + 'sale_url' => $sale_url, + 'message' => $sale_message, + 'time_left' => $time_left_label, + ); } /** @@ -315,183 +225,322 @@ class Announcements extends Abstract_Module { public function black_friday_notice_render() { // Prevent the notice from being rendered twice. - if ( self::$timeline['black_friday']['rendered'] ) { + if ( self::$notice_loaded ) { return; } - self::$timeline['black_friday']['rendered'] = true; + self::$notice_loaded = true; - $product_names = array(); + $current_user_id = get_current_user_id(); - foreach ( Loader::get_products() as $product ) { - $slug = $product->get_slug(); - - // NOTE: No notice if the user has at least one Pro product. - if ( $product->requires_license() ) { - return; - } - - $product_names[] = $product->get_name(); + if ( ! $this->can_show_notice( $this->get_current_date(), $current_user_id ) ) { + return; } - // Randomize the products and get only 4. - shuffle( $product_names ); - $product_names = array_slice( $product_names, 0, 4 ); + $all_configs = apply_filters( 'themeisle_sdk_blackfriday_data', array( 'default' => $this->get_notice_data() ) ); + + if ( empty( $all_configs ) || ! is_array( $all_configs ) ) { + return; + } + + $data = isset( $all_configs['default'] ) ? $all_configs['default'] : $this->get_notice_data(); + $products = Loader::get_products(); + $current_time = $this->get_current_date()->getTimestamp(); + $can_show = false; + + // Check if we have products that are eligible to show the notice with the default data. If the product provide its own config, use it. + foreach ( $products as $product ) { + $slug = $product->get_slug(); + + if ( self::MINIMUM_INSTALL_AGE < ( $current_time - $product->get_install_time() ) ) { + $can_show = true; + + if ( isset( $all_configs[ $slug ] ) && ! empty( $all_configs[ $slug ] ) && is_array( $all_configs[ $slug ] ) ) { + $data = $all_configs[ $slug ]; + + if ( self::$current_product === $slug ) { + $data = $all_configs[ $slug ]; + break; + } + } + } + } + + if ( ! $can_show ) { + return; + } + + $displayed_on_internal_page = 0 < did_action( 'themeisle_internal_page' ); + + $title = ! empty( $data['title'] ) ? $data['title'] : Loader::$labels['announcements']['black_friday']; + $time_left_label = ! empty( $data['time_left'] ) ? $data['time_left'] : ''; + $message = ! empty( $data['message'] ) ? $data['message'] : ''; + $logo_url = ! empty( $data['logo_url'] ) ? $data['logo_url'] : $this->get_sdk_uri() . 'assets/images/themeisle-logo.png'; + $cta_label = ! empty( $data['cta_label'] ) ? $data['cta_label'] : Loader::$labels['announcements']['notice_link_label']; + $sale_url = ! empty( $data['sale_url'] ) ? $data['sale_url'] : ''; + $hide_other_notices = ! empty( $data['hide_other_notices'] ) ? $data['hide_other_notices'] : $displayed_on_internal_page; + $dismiss_notice_url = wp_nonce_url( + add_query_arg( + array( 'action' => 'themeisle_sdk_dismiss_black_friday_notice' ), + admin_url( 'admin-ajax.php' ) + ), + 'dismiss_themeisle_event_notice' + ); + + if ( empty( $sale_url ) ) { + return; + } + + if ( ! current_user_can( 'install_plugins' ) ) { + $sale_url = remove_query_arg( 'lkey', $sale_url ); + } ?> -
- -

- - - . - - -

+
+
+ +
+

+ + + + +

+

+ +

+
+
+ + + +
+ + + +
- get_current_date()->getTimestamp() ); - if ( empty( $banner_handler ) ) { - return; + $return_page_url = wp_get_referer(); + if ( empty( $return_page_url ) ) { + $return_page_url = admin_url(); } - if ( isset( self::$banner_loaded[ $product_key ] ) && true === self::$banner_loaded[ $product_key ] ) { - return; - } - self::$banner_loaded[ $product_key ] = true; - - $banner_data = array(); - - // Get the first active banner. - foreach ( $this->get_announcements_for_plugins() as $announcement ) { - if ( false === $announcement['active'] ) { - continue; - } - - $cta_key = $product_key . '_dashboard_url'; - $banner_src_key = $product_key . '_banner_src'; - - if ( - ! isset( $announcement[ $cta_key ] ) || - ! isset( $announcement[ $banner_src_key ] ) || - empty( $announcement[ $banner_src_key ] ) || - ! isset( $announcement['urgency_text'] ) - ) { - continue; - } - - $banner_data = array( - 'content' => $this->render_banner( - array( - 'cta_url' => $announcement[ $cta_key ], - 'img_src' => $announcement[ $banner_src_key ], - 'urgency_text' => $announcement['urgency_text'], - ) - ), - ); - - break; - } - - if ( empty( $banner_data ) ) { - return; - } - - do_action( 'themeisle_sdk_dependency_enqueue_script', 'banner' ); - wp_localize_script( $banner_handler, 'tsdk_banner_data', $banner_data ); + wp_safe_redirect( $return_page_url ); + exit; } /** - * Renders a banner with the provided settings. + * Add the plugin meta links. * - * @param array $settings { - * Optional. An array of settings for the banner. - * - * @type string $cta_url The URL for the call-to-action link. - * @type string $img_src The source URL for the banner image. - * @type string $urgency_text The urgency text to display on the banner. - * } - * @return string The HTML output of the banner. + * @param array $links The plugin meta links. + * @param string $plugin_file The plugin file. + * @return array The plugin meta links. */ - public function render_banner( $settings = array() ) { - if ( empty( $settings ) ) { - return ''; + public function add_plugin_meta_links( $links, $plugin_file ) { + if ( self::$meta_link_loaded ) { + return $links; } - return wp_kses_post( - wp_sprintf( - '
%s
', - esc_url_raw( $settings['cta_url'] ), - esc_url_raw( $settings['img_src'] ), - sanitize_text_field( $settings['urgency_text'] ) - ) - ); + if ( $plugin_file !== plugin_basename( $this->product->get_basefile() ) ) { + return $links; + } + + $configs = apply_filters( 'themeisle_sdk_blackfriday_data', array( 'default' => $this->get_notice_data() ) ); + + if ( empty( $configs ) || ! is_array( $configs ) ) { + return $links; + } + + $current_slug = $this->product->get_slug(); + $data = isset( $configs[ $current_slug ] ) && ! empty( $configs[ $current_slug ] ) && is_array( $configs[ $current_slug ] ) ? $configs[ $current_slug ] : array(); + + $plugin_meta_message = ''; + $plugin_meta_url = ''; + + if ( isset( $data['plugin_meta_targets'] ) && ! empty( $data['plugin_meta_targets'] ) && ! in_array( $current_slug, $data['plugin_meta_targets'] ) ) { + return $links; // The current configuration is for another plugins. + } + + $plugin_meta_message = ! empty( $data['plugin_meta_message'] ) ? $data['plugin_meta_message'] : ''; + $plugin_meta_url = ! empty( $data['sale_url'] ) ? $data['sale_url'] : ''; + + if ( empty( $plugin_meta_url ) || empty( $plugin_meta_message ) ) { + + // Check if a configuration is in another plugin. + $products = Loader::get_products(); + foreach ( $products as $product ) { + $slug = $product->get_slug(); + + if ( $slug === $current_slug || ! isset( $configs[ $slug ] ) || empty( $configs[ $slug ] ) || ! is_array( $configs[ $slug ] ) ) { + continue; + } + + if ( ! empty( $configs[ $slug ]['plugin_meta_targets'] ) && in_array( $current_slug, $configs[ $slug ]['plugin_meta_targets'] ) ) { + $plugin_meta_message = ! empty( $configs[ $slug ]['plugin_meta_message'] ) ? $configs[ $slug ]['plugin_meta_message'] : ''; + $plugin_meta_url = ! empty( $configs[ $slug ]['sale_url'] ) ? $configs[ $slug ]['sale_url'] : ''; + break; + } + } + } + + if ( empty( $plugin_meta_url ) || empty( $plugin_meta_message ) ) { + return $links; + } + + $links[] = sprintf( '%s', esc_url( $plugin_meta_url ), esc_html( $plugin_meta_message ) ); + + self::$meta_link_loaded = true; + + return $links; + } + + /** + * Override the About Us upgrade menu during Black Friday. + * + * Registered dynamically during admin_menu when sale is active. + * Only applies if About_Us module is loaded for the product. + * + * @param array $about_data About Us metadata. + * + * @return array + */ + public function override_about_us_metadata( $about_data ) { + if ( ! $this->is_black_friday_sale( $this->get_current_date() ) ) { + return $about_data; + } + + if ( empty( $about_data ) || ! is_array( $about_data ) ) { + return $about_data; + } + + if ( empty( $about_data['has_upgrade_menu'] ) || true !== $about_data['has_upgrade_menu'] ) { + return $about_data; + } + + $configs = apply_filters( 'themeisle_sdk_blackfriday_data', array( 'default' => $this->get_notice_data() ) ); + + $current_slug = $this->product->get_slug(); + if ( ! isset( $configs[ $current_slug ] ) || empty( $configs[ $current_slug ] ) || ! is_array( $configs[ $current_slug ] ) ) { + return $about_data; + } + + $config = $configs[ $current_slug ]; + + if ( empty( $config['upgrade_menu_text'] ) || empty( $config['sale_url'] ) ) { + return $about_data; + } + + $about_data['upgrade_text'] = $config['upgrade_menu_text']; + $about_data['upgrade_link'] = $config['sale_url']; + + return $about_data; } } diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Featured_plugins.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Featured_plugins.php index 326ac5e0..a7df9d2a 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Featured_plugins.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Featured_plugins.php @@ -13,6 +13,7 @@ namespace ThemeisleSDK\Modules; use ThemeisleSDK\Common\Abstract_Module; +use ThemeisleSDK\Loader; use ThemeisleSDK\Product; // Exit if accessed directly. @@ -32,6 +33,13 @@ class Featured_Plugins extends Abstract_Module { */ private $transient_key = 'themeisle_sdk_featured_plugins_'; + /** + * The current product instance. + * + * @var Product|null + */ + protected $product = null; + /** * Check if the module can be loaded. * @@ -59,6 +67,8 @@ class Featured_Plugins extends Abstract_Module { * @return void */ public function load( $product ) { + $this->product = $product; + if ( ! current_user_can( 'install_plugins' ) ) { return; } @@ -69,7 +79,58 @@ class Featured_Plugins extends Abstract_Module { } add_filter( 'themeisle_sdk_plugin_api_filter_registered', '__return_true' ); - add_filter( 'plugins_api_result', [ $this, 'filter_plugin_api_results' ], 10, 3 ); + add_filter( 'plugins_api_result', [ $this, 'filter_plugin_api_results' ], 11, 3 ); + + // Enqueue inline JS only on plugin-install.php. + add_action( 'admin_enqueue_scripts', [ $this, 'maybe_add_inline_js' ] ); + } + + /** + * Enqueue inline JavaScript only on plugin-install.php. + * + * @return void + */ + public function maybe_add_inline_js() { + $screen = get_current_screen(); + if ( isset( $screen->base ) && 'plugin-install' === $screen->base ) { + add_action( + 'admin_footer', + function() { + $text = esc_html( sprintf( Loader::$labels['promotions']['recommended'], $this->product->get_friendly_name() ) ); + + echo ''; + } + ); + } } /** @@ -87,6 +148,11 @@ class Featured_Plugins extends Abstract_Module { return $res; } + if ( isset( $args->page ) && 1 === (int) $args->page && isset( $args->search ) && ! empty( $args->search ) ) { + $res->plugins = $this->maybe_prepend_lms_plugin( $res->plugins, $args ); + return $res; + } + if ( ! isset( $args->browse ) || $args->browse !== 'featured' ) { return $res; } @@ -100,6 +166,38 @@ class Featured_Plugins extends Abstract_Module { return $res; } + /** + * Prepend the LMS plugin if the search query matches LMS-related terms. + * + * @param array $plugins The plugins array. + * @param object $args The plugin API arguments. + * @return array + */ + private function maybe_prepend_lms_plugin( $plugins, $args ) { + $search = isset( $args->search ) ? strtolower( $args->search ) : ''; + if ( + strpos( $search, 'lms' ) !== false || + strpos( $search, 'learn' ) !== false + ) { + $filter_slugs = apply_filters( 'themeisle_sdk_masteriyo_filter_slugs', [ 'learning-management-system' ] ); + $masteriyo = $this->get_plugins_filtered_from_author( $args, $filter_slugs, 'masteriyo' ); + + if ( ! empty( $masteriyo ) ) { + // Remove existing LMS plugin if present to avoid duplicates. + $plugins = array_filter( + $plugins, + function( $plugin ) { + return ( is_object( $plugin ) && isset( $plugin->slug ) && $plugin->slug !== 'learning-management-system' ) || + ( is_array( $plugin ) && isset( $plugin['slug'] ) && $plugin['slug'] !== 'learning-management-system' ); + } + ); + + $plugins = array_merge( $masteriyo, $plugins ); + } + } + return $plugins; + } + /** * Query plugins by author. * @@ -114,7 +212,7 @@ class Featured_Plugins extends Abstract_Module { $filtered_from_optimole = $this->get_plugins_filtered_from_author( $args, $optimole_filter_slugs, 'Optimole' ); $featured = array_merge( $featured, $filtered_from_optimole ); - $themeisle_filter_slugs = apply_filters( 'themeisle_sdk_themeisle_filter_slugs', [ 'otter-blocks' ] ); + $themeisle_filter_slugs = apply_filters( 'themeisle_sdk_themeisle_filter_slugs', [ 'otter-blocks', 'wp-cloudflare-page-cache' ] ); $filtered_from_themeisle = $this->get_plugins_filtered_from_author( $args, $themeisle_filter_slugs ); $featured = array_merge( $featured, $filtered_from_themeisle ); @@ -130,7 +228,7 @@ class Featured_Plugins extends Abstract_Module { * * @return array */ - private function get_plugins_filtered_from_author( $args, $filter_slugs = [], $author = 'Themeisle' ) { + protected function get_plugins_filtered_from_author( $args, $filter_slugs = [], $author = 'Themeisle' ) { $cached = get_transient( $this->transient_key . $author ); if ( $cached ) { diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php index edea184f..67041e56 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php @@ -380,7 +380,7 @@ class Licenser extends Abstract_Module { $status = $this->get_license_status( true ); $no_activations_string = apply_filters( $this->product->get_key() . '_lc_no_activations_string', Loader::$labels['licenser']['no_activations'] ); $no_valid_string = apply_filters( $this->product->get_key() . '_lc_no_valid_string', sprintf( Loader::$labels['licenser']['inactive'], '%s', '', '', '', '' ) ); - $expired_license_string = apply_filters( $this->product->get_key() . '_lc_expired_string', sprintf( Loader::$labels['licenser']['expired'], '%s', '', '' ) ); + $expired_license_string = apply_filters( $this->product->get_key() . '_lc_expired_heading_string', Loader::$labels['licenser']['expired'] ); // No activations left for this license. if ( 'valid' != $status && $this->check_activation() ) { ?> @@ -403,12 +403,72 @@ class Licenser extends Abstract_Module { // Invalid license key. if ( 'active_expired' === $status ) { + // Check if the notice was dismissed. + $dismiss_option_key = $this->product->get_key() . '_expired_notice_dismissed'; + if ( get_option( $dismiss_option_key, false ) ) { + return false; + } + + $license_data = get_option( $this->product->get_key() . '_license_data', '' ); + $expiration_date = ''; + if ( is_object( $license_data ) && isset( $license_data->expires ) ) { + $timestamp = strtotime( (string) $license_data->expires ); + if ( false !== $timestamp ) { + $expiration_date = gmdate( 'F j, Y', $timestamp ); + } + } + + $discount_config = apply_filters( $this->product->get_key() . '_lc_renew_discount', false ); + + if ( is_array( $discount_config ) && isset( $discount_config['url'] ) && isset( $discount_config['renew_button'] ) ) { + $renew_url = $discount_config['url']; + $renew_button = $discount_config['renew_button']; + } else { + $renew_url = apply_filters( $this->product->get_key() . '_lc_renew_url', $this->renew_url() ); + $renew_button = apply_filters( $this->product->get_key() . '_lc_renew_button_string', Loader::$labels['licenser']['renew_license'] ); + } + + $learn_more_url = apply_filters( $this->product->get_key() . '_lc_learn_more_url', $this->get_api_url() ); + $learn_more_button = apply_filters( $this->product->get_key() . '_lc_learn_more_button_string', Loader::$labels['licenser']['learn_more'] ); + $notice_message = apply_filters( $this->product->get_key() . '_lc_expired_notice_message', Loader::$labels['licenser']['expired_notice'] ); + + $expired_date_string = apply_filters( $this->product->get_key() . '_lc_expired_date_string', sprintf( Loader::$labels['licenser']['expired_date'], esc_html( $expiration_date ) ) ); + $heading = apply_filters( $this->product->get_key() . '_lc_expired_heading_string', sprintf( Loader::$labels['licenser']['expired'], $this->product->get_name() ) ); + $notice_id = $this->product->get_key() . '_expired_notice'; ?> -
-

- product->get_name() . ' ' . $this->product->get_type() ), esc_url( $this->get_api_url() . '?license=' . $this->license_key ) ); ?> +

+

+ + · +

+

+ +

+

+ + + + + +

+ product->get_key() . '_license_status', array( $this, 'get_license_status' ) ); + add_action( 'wp_ajax_themeisle_sdk_dismiss_license_notice', array( $this, 'dismiss_license_notice' ) ); + } + + /** + * Handle AJAX request to dismiss the license notice. + */ + public function dismiss_license_notice() { + if ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( $_POST['nonce'] ), 'themeisle_sdk_dismiss_license_notice' ) ) { + wp_send_json_error( 'Invalid nonce' ); + } + + if ( ! current_user_can( 'manage_options' ) ) { + wp_send_json_error( 'Insufficient permissions' ); + } + + $notice_id = isset( $_POST['notice_id'] ) ? sanitize_text_field( $_POST['notice_id'] ) : ''; + + if ( empty( $notice_id ) ) { + wp_send_json_error( 'Missing notice ID' ); + } + + // Save the dismissal option. + $dismiss_option_key = $notice_id . '_dismissed'; + update_option( $dismiss_option_key, true ); + + wp_send_json_success(); } /** diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php index 969cf22e..4be2bcba 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Logger.php @@ -55,8 +55,8 @@ class Logger extends Abstract_Module { */ public function load( $product ) { $this->product = $product; - $this->setup_notification(); - $this->setup_actions(); + add_action( 'wp_loaded', array( $this, 'setup_actions' ) ); + add_action( 'admin_init', array( $this, 'setup_notification' ) ); return $this; } @@ -64,12 +64,10 @@ class Logger extends Abstract_Module { * Setup notification on admin. */ public function setup_notification() { - if ( ! $this->product->is_wordpress_available() ) { + if ( $this->is_logger_active() ) { return; } - add_filter( 'themeisle_sdk_registered_notifications', [ $this, 'add_notification' ] ); - } /** @@ -79,7 +77,6 @@ class Logger extends Abstract_Module { if ( ! $this->is_logger_active() ) { return; } - add_action( 'admin_enqueue_scripts', function() { @@ -89,7 +86,7 @@ class Logger extends Abstract_Module { $this->load_telemetry(); }, - PHP_INT_MAX + PHP_INT_MAX ); $action_key = $this->product->get_key() . '_log_activity'; @@ -105,24 +102,26 @@ class Logger extends Abstract_Module { * @return bool Is logger active? */ private function is_logger_active() { + if ( apply_filters( 'themeisle_sdk_disable_telemetry', false ) ) { + return false; + } $default = 'no'; if ( ! $this->product->is_wordpress_available() ) { $default = 'yes'; } else { - $pro_slug = $this->product->get_pro_slug(); - - if ( ! empty( $pro_slug ) ) { - $all_products = Loader::get_products(); - if ( isset( $all_products[ $pro_slug ] ) ) { + $all_products = Loader::get_products(); + foreach ( $all_products as $product ) { + if ( $product->requires_license() ) { $default = 'yes'; + break; } } } + return ( get_option( $this->product->get_key() . '_logger_flag', $default ) === 'yes' ); } - /** * Add notification to queue. * @@ -179,14 +178,15 @@ class Logger extends Abstract_Module { 'timeout' => 3, 'redirection' => 5, 'body' => array( - 'site' => get_site_url(), - 'slug' => $this->product->get_slug(), - 'version' => $this->product->get_version(), - 'wp_version' => $wp_version, - 'locale' => get_locale(), - 'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ), - 'environment' => $environment, - 'license' => apply_filters( $this->product->get_key() . '_license_status', '' ), + 'site' => get_site_url(), + 'slug' => $this->product->get_slug(), + 'version' => $this->product->get_version(), + 'wp_version' => $wp_version, + 'install_time' => $this->product->get_install_time(), + 'locale' => get_locale(), + 'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ), + 'environment' => $environment, + 'license' => apply_filters( $this->product->get_key() . '_license_status', '' ), ), ) ); diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Migrator.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Migrator.php new file mode 100644 index 00000000..85add2fa --- /dev/null +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Migrator.php @@ -0,0 +1,177 @@ +get_slug() . '_sdk_enable_migrator', true ); + } + + /** + * Load module logic. + * + * @param Product $product Product to load. + * + * @return Migrator + */ + public function load( $product ) { + $this->product = $product; + add_action( 'admin_init', array( $this, 'run_pending' ) ); + add_action( 'themeisle_sdk_rollback_migration_' . $product->get_slug(), array( $this, 'rollback' ) ); + return $this; + } + + /** + * Discover and run any pending migrations for the product. + * + * Only runs when a version upgrade was detected during this request, indicated + * by the themeisle_sdk_update_{slug} action having fired. + * + * @return void + */ + public function run_pending() { + if ( ! did_action( 'themeisle_sdk_update_' . $this->product->get_slug() ) ) { + return; + } + + $path = $this->get_migrations_path(); + + if ( empty( $path ) || ! is_dir( $path ) ) { + return; + } + + $files = glob( trailingslashit( $path ) . '*.php' ); + + if ( empty( $files ) ) { + return; + } + + sort( $files ); // Alphabetical order = chronological order given timestamp naming. + + $option_key = $this->product->get_key() . self::OPTION_SUFFIX; + $ran = get_option( $option_key, array() ); + + foreach ( $files as $file ) { + $name = basename( $file, '.php' ); + + if ( in_array( $name, $ran, true ) ) { + continue; + } + + try { + $migration = require $file; // Migration files return an anonymous class instance. + + if ( ! ( $migration instanceof Abstract_Migration ) ) { + continue; + } + + if ( ! $migration->should_run() ) { + continue; + } + + $migration->up(); + $ran[] = $name; + update_option( $option_key, $ran ); + } catch ( \Throwable $e ) { + // Log and stop — leave the migration unrecorded so it retries next load. + // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log + error_log( 'ThemeIsle SDK Migrator: failed to run ' . $name . ': ' . $e->getMessage() ); + break; + } + } + } + + /** + * Roll back a single migration by name. + * + * Calls down() on the migration and removes it from the ran list so it will + * be picked up again on the next upgrade. This method is never called + * automatically — products invoke it explicitly when needed. + * + * @param string $migration_name Migration basename without .php extension. + * + * @return bool True if rolled back successfully, false if not found or not previously run. + */ + public function rollback( $migration_name ) { + $option_key = $this->product->get_key() . self::OPTION_SUFFIX; + $ran = get_option( $option_key, array() ); + + if ( ! in_array( $migration_name, $ran, true ) ) { + return false; + } + + $path = $this->get_migrations_path(); + $file = trailingslashit( $path ) . $migration_name . '.php'; + + if ( ! is_file( $file ) ) { + return false; + } + + try { + $migration = require $file; + + if ( ! ( $migration instanceof Abstract_Migration ) ) { + return false; + } + + $migration->down(); + update_option( $option_key, array_values( array_diff( $ran, array( $migration_name ) ) ) ); + + return true; + } catch ( \Throwable $e ) { + // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_error_log + error_log( 'ThemeIsle SDK Migrator: failed to roll back ' . $migration_name . ': ' . $e->getMessage() ); + + return false; + } + } + + /** + * Get the migrations directory path for the current product. + * + * Products register their path via the `{slug}_sdk_migrations_path` filter. + * + * @return string Absolute path to the migrations directory, or empty string. + */ + private function get_migrations_path() { + return (string) apply_filters( $this->product->get_slug() . '_sdk_migrations_path', '' ); + } +} diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php index b37a4b56..38a74533 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php @@ -105,6 +105,13 @@ class Promotions extends Abstract_Module { */ private $option_feedzy = 'themeisle_sdk_promotions_feedzy_installed'; + /** + * Option key for Masteriyo promos. + * + * @var string + */ + private $option_masteriyo = 'themeisle_sdk_promotions_masteriyo_installed'; + /** * Loaded promotion. * @@ -152,6 +159,7 @@ class Promotions extends Abstract_Module { $promotions_to_load[] = 'hyve'; $promotions_to_load[] = 'wp_full_pay'; $promotions_to_load[] = 'feedzy_import'; + $promotions_to_load[] = 'learning-management-system'; if ( defined( 'NEVE_VERSION' ) || defined( 'WPMM_PATH' ) || defined( 'OTTER_BLOCKS_VERSION' ) || defined( 'OBFX_URL' ) ) { $promotions_to_load[] = 'feedzy_embed'; @@ -257,6 +265,7 @@ class Promotions extends Abstract_Module { if ( isset( $_GET['wp_full_pay_reference_key'] ) ) { update_option( 'wp_full_pay_reference_key', sanitize_key( $_GET['wp_full_pay_reference_key'] ) ); } + if ( isset( $_GET['feedzy_reference_key'] ) || ( isset( $_GET['from'], $_GET['plugin'] ) && $_GET['from'] === 'import' && str_starts_with( sanitize_key( $_GET['plugin'] ), 'feedzy' ) ) ) { update_option( 'feedzy_reference_key', sanitize_key( $_GET['feedzy_reference_key'] ?? 'i-' . $this->product->get_key() ) ); update_option( $this->option_feedzy, 1 ); @@ -350,6 +359,16 @@ class Promotions extends Abstract_Module { 'default' => false, ) ); + register_setting( + 'themeisle_sdk_settings', + $this->option_masteriyo, + array( + 'type' => 'boolean', + 'sanitize_callback' => 'rest_sanitize_boolean', + 'show_in_rest' => true, + 'default' => false, + ) + ); } /** @@ -415,13 +434,16 @@ class Promotions extends Abstract_Module { $has_neve_from_promo = get_option( $this->option_neve, false ); $has_enough_attachments = $this->has_min_media_attachments(); $has_enough_old_posts = $this->has_old_posts(); - $is_min_php_8_1 = version_compare( PHP_VERSION, '8.1', '>=' ); - - $has_feedzy = defined( 'FEEDZY_BASEFILE' ) || $this->is_plugin_installed( 'feedzy-rss-feedss' ); - $had_feedzy_from_promo = get_option( $this->option_feedzy, false ); + $is_min_php_7_4 = version_compare( PHP_VERSION, '7.4', '>=' ); + $has_feedzy = defined( 'FEEDZY_BASEFILE' ) || $this->is_plugin_installed( 'feedzy-rss-feedss' ); + $had_feedzy_from_promo = get_option( $this->option_feedzy, false ); + $has_masteriyo = defined( 'MASTERIYO_VERSION' ) || $this->is_plugin_installed( 'learning-management-system' ); + $had_masteriyo_from_promo = get_option( $this->option_masteriyo, false ); + $has_masteriyo_conditions = $this->has_lms_tagline(); + $is_min_php_7_2 = version_compare( PHP_VERSION, '7.2', '>=' ); $all = [ - 'optimole' => [ + 'optimole' => [ 'om-editor' => [ 'env' => ! $has_optimole && $is_min_req_v && ! $had_optimole_from_promo, 'screen' => 'editor', @@ -446,20 +468,20 @@ class Promotions extends Abstract_Module { 'delayed' => true, ], ], - 'feedzy_import' => [ + 'feedzy_import' => [ 'feedzy-import' => [ 'env' => true, 'screen' => 'import', 'always' => true, ], ], - 'feedzy_embed' => [ + 'feedzy_embed' => [ 'feedzy-editor' => [ 'env' => ! $has_feedzy && is_main_site() && ! $had_feedzy_from_promo, 'screen' => 'editor', ], ], - 'otter' => [ + 'otter' => [ 'blocks-css' => [ 'env' => ! $has_otter && $is_min_req_v && ! $had_otter_from_promo, 'screen' => 'editor', @@ -476,14 +498,14 @@ class Promotions extends Abstract_Module { 'delayed' => true, ], ], - 'rop' => [ + 'rop' => [ 'rop-posts' => [ 'env' => ! $has_rop && ! $had_rop_from_promo && $has_enough_old_posts, 'screen' => 'edit-post', 'delayed' => true, ], ], - 'woo_plugins' => [ + 'woo_plugins' => [ 'ppom' => [ 'env' => ! $has_ppom && $has_woocommerce, 'screen' => 'edit-product', @@ -501,31 +523,37 @@ class Promotions extends Abstract_Module { 'screen' => 'edit-product', ], ], - 'neve' => [ + 'neve' => [ 'neve-themes-popular' => [ 'env' => ! $has_neve && ! $has_neve_from_promo, 'screen' => 'themes-install-popular', ], ], - 'redirection-cf7' => [ + 'redirection-cf7' => [ 'wpcf7' => [ 'env' => ! $has_redirection_cf7 && ! $had_redirection_cf7_promo, 'screen' => 'wpcf7', 'delayed' => true, ], ], - 'hyve' => [ + 'hyve' => [ 'hyve-plugins-install' => [ - 'env' => $is_min_php_8_1 && ! $has_hyve && ! $had_hyve_from_promo && $has_hyve_conditions, + 'env' => $is_min_php_7_4 && ! $has_hyve && ! $had_hyve_from_promo && $has_hyve_conditions, 'screen' => 'plugin-install', ], ], - 'wp_full_pay' => [ + 'wp_full_pay' => [ 'wp-full-pay-plugins-install' => [ 'env' => ! $has_wfp_full_pay && ! $had_wfp_from_promo && $has_wfp_conditions, 'screen' => 'plugin-install', ], ], + 'learning-management-system' => [ + 'masteriyo-plugins-install' => [ + 'env' => $is_min_php_7_2 && ! $has_masteriyo && ! $had_masteriyo_from_promo && $has_masteriyo_conditions, + 'screen' => 'plugin-install', + ], + ], ]; foreach ( $all as $slug => $data ) { @@ -723,6 +751,10 @@ class Promotions extends Abstract_Module { add_action( 'admin_notices', [ $this, 'render_wp_full_pay_notice' ] ); } + if ( $this->get_upsells_dismiss_time( 'masteriyo-plugins-install' ) === false ) { + add_action( 'admin_notices', [ $this, 'render_masteriyo_notice' ] ); + } + add_action( 'load-import.php', [ $this, 'add_import' ] ); $this->load_woo_promos(); @@ -788,6 +820,10 @@ class Promotions extends Abstract_Module { add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] ); add_action( 'admin_notices', [ $this, 'render_wp_full_pay_notice' ] ); break; + case 'masteriyo-plugins-install': + add_action( 'admin_enqueue_scripts', [ $this, 'enqueue' ] ); + add_action( 'admin_notices', [ $this, 'render_masteriyo_notice' ] ); + break; } } @@ -881,6 +917,8 @@ class Promotions extends Abstract_Module { 'hyveDash' => esc_url( add_query_arg( [ 'page' => 'wpfs-settings-stripe' ], admin_url( 'admin.php' ) ) ), 'wpFullPayActivationUrl' => $this->get_plugin_activation_link( 'wp-full-stripe-free' ), 'wpFullPayDash' => esc_url( add_query_arg( [ 'page' => 'wpfs-settings-stripe' ], admin_url( 'admin.php' ) ) ), + 'masteriyoActivationUrl' => $this->get_plugin_activation_link( 'masteriyo' ), + 'masteriyoDash' => esc_url( add_query_arg( [ 'page' => 'masteriyo-onboard' ], admin_url( 'index.php' ) ) ), 'nevePreviewURL' => esc_url( add_query_arg( [ 'theme' => 'neve' ], admin_url( 'theme-install.php' ) ) ), 'neveAction' => $neve_action, 'activateNeveURL' => esc_url( @@ -940,6 +978,13 @@ class Promotions extends Abstract_Module { echo '
'; } + /** + * Render Masteriyo notice. + */ + public function render_masteriyo_notice() { + echo '
'; + } + /** * Add promo to attachment modal. * @@ -1406,4 +1451,22 @@ class Promotions extends Abstract_Module { return 'yes' === $has_donate; } + + /** + * Check if the tagline contains LMS related keywords. + * + * @return bool True if the tagline contains LMS-related keywords, false otherwise. + */ + public function has_lms_tagline() { + $tagline = strtolower( get_bloginfo( 'description' ) ); + $lms_keywords = array( 'learning', 'courses' ); + + foreach ( $lms_keywords as $keyword ) { + if ( strpos( $tagline, $keyword ) !== false ) { + return true; + } + } + + return false; + } } diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Script_loader.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Script_loader.php index 1d0ef6bb..b300f924 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Script_loader.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Script_loader.php @@ -98,7 +98,7 @@ class Script_Loader extends Abstract_Module { return ''; } - if ( 'tracking' !== $slug && 'survey' !== $slug && 'banner' !== $slug ) { + if ( 'tracking' !== $slug && 'survey' !== $slug ) { return ''; } @@ -120,8 +120,6 @@ class Script_Loader extends Abstract_Module { $this->load_tracking( $handler ); } elseif ( 'survey' === $slug ) { $this->load_survey( $handler ); - } elseif ( 'banner' === $slug ) { - $this->load_banner( $handler ); } } @@ -174,7 +172,7 @@ class Script_Loader extends Abstract_Module { $common_data = [ 'userId' => $user_id, - 'apiHost' => 'https://app.formbricks.com', + 'appUrl' => 'https://app.formbricks.com', 'attributes' => [ 'language' => $lang_code, ], @@ -237,33 +235,6 @@ class Script_Loader extends Abstract_Module { ); } - /** - * Load the banner script. - * - * @param string $handler The script handler. - * - * @return void - */ - public function load_banner( $handler ) { - global $themeisle_sdk_max_path; - $asset_file = require $themeisle_sdk_max_path . '/assets/js/build/banner/banner.asset.php'; - - wp_enqueue_script( - $handler, - $this->get_sdk_uri() . 'assets/js/build/banner/banner.js', - $asset_file['dependencies'], - $asset_file['version'], - true - ); - - wp_enqueue_style( - $handler . '_style', - $this->get_sdk_uri() . 'assets/css/banner.css', - [], - $asset_file['version'] - ); - } - /** * Mask a secret with `*` for half of its length. * diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Product.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Product.php index fa6518da..bf195ae1 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Product.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Product.php @@ -139,10 +139,36 @@ class Product { $install = get_option( $this->get_key() . '_install', 0 ); if ( 0 === $install ) { $install = time(); + /** + * Action to be triggered when the product is first activated. + * + * @param string $basefile The basefile of the product. + */ + do_action( 'themeisle_sdk_first_activation', $basefile ); + update_option( $this->get_key() . '_install', time() ); } $this->install = $install; self::$cached_products[ crc32( $basefile ) ] = $this; + $current_version = get_option( $this->slug . '_version', '' ); + + if ( $current_version !== $this->version && wp_cache_get( "{$this->slug}_version_upgrade" ) === false ) { + // Set the cache lock to avoid multiple calls. + wp_cache_set( "{$this->slug}_version_upgrade", true, HOUR_IN_SECONDS ); + /** + * Action to be triggered when the product is updated. + * + * @param string $current_version The current version of the product. + * @param string $new_version The new version of the product. + * @param string $basefile The basefile of the product. + */ + do_action( "themeisle_sdk_update_{$this->slug}", $current_version, $this->version, $basefile ); + + // Update the version of the product. + update_option( "{$this->slug}_version", $this->version ); + // Delete the cache lock. + wp_cache_delete( "{$this->slug}_version_upgrade" ); + } } /** diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/start.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/start.php index 32ccd24b..8ae124e6 100644 --- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/start.php +++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/start.php @@ -41,6 +41,8 @@ $files_to_load = [ $themeisle_library_path . '/src/Modules/Announcements.php', $themeisle_library_path . '/src/Modules/Featured_plugins.php', $themeisle_library_path . '/src/Modules/Float_widget.php', + $themeisle_library_path . '/src/Modules/Abstract_Migration.php', + $themeisle_library_path . '/src/Modules/Migrator.php', ]; $files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) ); diff --git a/wp-content/plugins/menu-icons/vendor/composer/autoload_static.php b/wp-content/plugins/menu-icons/vendor/composer/autoload_static.php index d10b5995..3385b9dc 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/autoload_static.php +++ b/wp-content/plugins/menu-icons/vendor/composer/autoload_static.php @@ -14,14 +14,14 @@ class ComposerStaticInite0e064cdd82a4be104872380c8a68791 ); public static $prefixLengthsPsr4 = array ( - 'e' => + 'e' => array ( 'enshrined\\svgSanitize\\' => 22, ), ); public static $prefixDirsPsr4 = array ( - 'enshrined\\svgSanitize\\' => + 'enshrined\\svgSanitize\\' => array ( 0 => __DIR__ . '/..' . '/enshrined/svg-sanitize/src', ), diff --git a/wp-content/plugins/menu-icons/vendor/composer/installed.json b/wp-content/plugins/menu-icons/vendor/composer/installed.json index d01a70a2..e5fe5f00 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/installed.json +++ b/wp-content/plugins/menu-icons/vendor/composer/installed.json @@ -133,24 +133,24 @@ }, { "name": "codeinwp/themeisle-sdk", - "version": "3.3.44", - "version_normalized": "3.3.44.0", + "version": "3.3.51", + "version_normalized": "3.3.51.0", "source": { "type": "git", "url": "https://github.com/Codeinwp/themeisle-sdk.git", - "reference": "fed444b52ebf1f689ec2434df177926bf8f238c4" + "reference": "bb2a8414b0418b18c68c9ff1df3d7fb10467928d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/fed444b52ebf1f689ec2434df177926bf8f238c4", - "reference": "fed444b52ebf1f689ec2434df177926bf8f238c4", + "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/bb2a8414b0418b18c68c9ff1df3d7fb10467928d", + "reference": "bb2a8414b0418b18c68c9ff1df3d7fb10467928d", "shasum": "" }, "require-dev": { "codeinwp/phpcs-ruleset": "dev-main", - "yoast/phpunit-polyfills": "^2.0" + "yoast/phpunit-polyfills": "^4.0" }, - "time": "2025-02-18T21:31:30+00:00", + "time": "2026-03-30T07:58:49+00:00", "type": "library", "installation-source": "dist", "notification-url": "https://packagist.org/downloads/", @@ -164,14 +164,14 @@ "homepage": "https://themeisle.com" } ], - "description": "ThemeIsle SDK", + "description": "Themeisle SDK.", "homepage": "https://github.com/Codeinwp/themeisle-sdk", "keywords": [ "wordpress" ], "support": { "issues": "https://github.com/Codeinwp/themeisle-sdk/issues", - "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.44" + "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.51" }, "install-path": "../codeinwp/themeisle-sdk" }, diff --git a/wp-content/plugins/menu-icons/vendor/composer/installed.php b/wp-content/plugins/menu-icons/vendor/composer/installed.php index 6ff6887a..0c548b69 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/installed.php +++ b/wp-content/plugins/menu-icons/vendor/composer/installed.php @@ -1,9 +1,9 @@ array( 'name' => 'codeinwp/wp-menu-icons', - 'pretty_version' => 'v0.13.17', - 'version' => '0.13.17.0', - 'reference' => '7e30cf90509868e023d4c910c1f75be9b01b91a2', + 'pretty_version' => 'v0.13.23', + 'version' => '0.13.23.0', + 'reference' => '4380560c531b8c09f7d2ba6e71622a2f55162ced', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -40,18 +40,18 @@ 'dev_requirement' => false, ), 'codeinwp/themeisle-sdk' => array( - 'pretty_version' => '3.3.44', - 'version' => '3.3.44.0', - 'reference' => 'fed444b52ebf1f689ec2434df177926bf8f238c4', + 'pretty_version' => '3.3.51', + 'version' => '3.3.51.0', + 'reference' => 'bb2a8414b0418b18c68c9ff1df3d7fb10467928d', 'type' => 'library', 'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk', 'aliases' => array(), 'dev_requirement' => false, ), 'codeinwp/wp-menu-icons' => array( - 'pretty_version' => 'v0.13.17', - 'version' => '0.13.17.0', - 'reference' => '7e30cf90509868e023d4c910c1f75be9b01b91a2', + 'pretty_version' => 'v0.13.23', + 'version' => '0.13.23.0', + 'reference' => '4380560c531b8c09f7d2ba6e71622a2f55162ced', 'type' => 'wordpress-plugin', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), diff --git a/wp-content/plugins/menu-icons/vendor/composer/platform_check.php b/wp-content/plugins/menu-icons/vendor/composer/platform_check.php index 8b379f44..b74a4c99 100644 --- a/wp-content/plugins/menu-icons/vendor/composer/platform_check.php +++ b/wp-content/plugins/menu-icons/vendor/composer/platform_check.php @@ -19,8 +19,7 @@ if ($issues) { echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL; } } - trigger_error( - 'Composer detected issues in your platform: ' . implode(' ', $issues), - E_USER_ERROR + throw new \RuntimeException( + 'Composer detected issues in your platform: ' . implode(' ', $issues) ); }