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`. '
' . 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' ) . '
- 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) ); }