-
+
>
-
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 bf3315c1..326ac5e0 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
@@ -44,9 +44,7 @@ class Featured_Plugins extends Abstract_Module {
return false;
}
- $slug = $product->get_slug();
- // only load for products that contain "pro" in the slug.
- if ( strpos( $slug, 'pro' ) === false ) {
+ if ( $product->is_wordpress_available() ) {
return false;
}
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Float_widget.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Float_widget.php
new file mode 100644
index 00000000..ad4bbae9
--- /dev/null
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Float_widget.php
@@ -0,0 +1,274 @@
+_float_widget_metadata', 'add_float_widget_meta' );
+ *
+ * function add_float_widget_meta($data) {
+ * return [
+ * 'logo' => ,
+ * 'nice_name' => , // optional, will default to product name
+ * 'primary_color' => , // optional
+ * 'pages' => [ 'page-slugs' ], //pages where the float widget should be displayed
+ * 'has_upgrade_menu' => ,
+ * 'upgrade_link' => ,
+ * 'documentation_link' => ,
+ * 'premium_support_link' => , // optional, provide from pro version
+ * 'feature_request_link' => , // optional, provide from pro version
+ * 'wizard_link' => , // optional, provide if a user is available
+ * ]
+ * }
+ *
+ * @package ThemeIsleSDK
+ * @subpackage Modules
+ * @copyright Copyright (c) 2024, Bogdan Preda
+ * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
+ * @since 3.2.42
+ */
+
+namespace ThemeisleSDK\Modules;
+
+use ThemeisleSDK\Common\Abstract_Module;
+use ThemeisleSDK\Loader;
+use ThemeisleSDK\Product;
+
+// Exit if accessed directly.
+if ( ! defined( 'ABSPATH' ) ) {
+ exit;
+}
+
+/**
+ * Float widget module for ThemeIsle SDK.
+ */
+class Float_Widget extends Abstract_Module {
+ /**
+ * Float widget data.
+ *
+ * @var array $float_widget_data Float widget data, received from the filter.
+ *
+ * Shape of the $about_data property array:
+ * [
+ * 'logo' => ,
+ * 'nice_name' => , // optional, will default to product name
+ * 'primary_color' => , // optional
+ * 'pages' => [ 'page-slugs' ], //pages where the float widget should be displayed
+ * 'has_upgrade_menu' => ,
+ * 'upgrade_link' => ,
+ * 'documentation_link' => ,
+ * 'premium_support_link' => , // optional, provide from pro version
+ * 'feature_request_link' => , // optional, provide from pro version
+ * 'wizard_link' => , // optional, provide if a user is available
+ * ]
+ */
+ private $float_widget_data = array();
+
+ /**
+ * Should we load this module.
+ *
+ * @param Product $product Product object.
+ *
+ * @return bool
+ */
+ public function can_load( $product ) {
+ if ( $this->is_from_partner( $product ) ) {
+ return false;
+ }
+
+ $this->float_widget_data = apply_filters( $product->get_key() . '_float_widget_metadata', array() );
+
+ $can_load = ! empty( $this->float_widget_data );
+
+ $this->float_widget_data = array_merge(
+ [
+ 'logo' => '',
+ 'primary_color' => '#2271b1', // Default color.
+ 'nice_name' => $product->get_name(),
+ 'documentation_link' => '',
+ 'premium_support_link' => '',
+ 'feature_request_link' => '',
+ 'wizard_link' => '',
+ ],
+ $this->float_widget_data
+ );
+
+ return $can_load;
+ }
+
+ /**
+ * Registers the hooks.
+ *
+ * @param Product $product Product to load.
+ */
+ public function load( $product ) {
+ $this->product = $product;
+
+ add_action( 'in_admin_footer', [ $this, 'render_float_placeholder' ] );
+ add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_float_widget_script' ] );
+ }
+
+ /**
+ * Returns the allowed pages for the float widget.
+ *
+ * @return array
+ */
+ private function get_allowed_pages() {
+ if ( ! isset( $this->float_widget_data['pages'] ) || ! is_array( $this->float_widget_data['pages'] ) ) {
+ return [];
+ }
+ return $this->float_widget_data['pages'];
+ }
+
+ /**
+ * Checks if the current screen is allowed for the float widget.
+ *
+ * @return bool
+ */
+ private function is_current_screen_allowed() {
+ $current_screen = get_current_screen();
+
+ if ( ! isset( $current_screen->id ) ) {
+ return false;
+ }
+
+ if ( ! in_array( $current_screen->id, $this->get_allowed_pages(), true ) ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Renders the float widget placeholder.
+ *
+ * @return void
+ */
+ public function render_float_placeholder() {
+ if ( ! $this->is_current_screen_allowed() ) {
+ return;
+ }
+
+ echo '';
+ }
+
+ /**
+ * Enqueue scripts & styles.
+ *
+ * @return void
+ */
+ public function enqueue_float_widget_script() {
+
+ if ( ! $this->is_current_screen_allowed() ) {
+ return;
+ }
+
+ global $themeisle_sdk_max_path;
+ $handle = 'ti-sdk-float-' . $this->product->get_key();
+ $asset_file = require $themeisle_sdk_max_path . '/assets/js/build/float_widget/float.asset.php';
+ $deps = array_merge( $asset_file['dependencies'], [ 'updates' ] );
+
+ wp_register_script( $handle, $this->get_sdk_uri() . 'assets/js/build/float_widget/float.js', $deps, $asset_file['version'], true );
+ wp_localize_script( $handle, 'tiSDKFloatData', $this->get_float_localization_data() );
+
+ wp_enqueue_script( $handle );
+ wp_enqueue_style( $handle, $this->get_sdk_uri() . 'assets/js/build/float_widget/float.css', [ 'wp-components' ], $asset_file['version'] );
+ }
+
+ /**
+ * Get the float widget localization data.
+ *
+ * @return array
+ */
+ private function get_float_localization_data() {
+ return [
+ 'logoUrl' => $this->float_widget_data['logo'],
+ 'primaryColor' => esc_attr( $this->float_widget_data['primary_color'] ),
+ 'strings' => [
+ 'toggleButton' => sprintf( Loader::$labels['float_widget']['button'], $this->float_widget_data['nice_name'] ),
+ 'panelGreet' => sprintf( Loader::$labels['float_widget']['panel']['greeting'], $this->float_widget_data['nice_name'] ),
+ 'panelTitle' => Loader::$labels['float_widget']['panel']['title'],
+ 'closeToggle' => Loader::$labels['float_widget']['panel']['close'],
+ ],
+ 'links' => $this->get_links(),
+ ];
+ }
+
+ /**
+ * Generates the links for the float widget.
+ *
+ * For Free:
+ * - Documentation (redirects to Themeisle doc page)
+ * - Get Support (redirects to WP free support forum)
+ * - Run Setup Wizard (this will trigger the setup wizard) if available
+ * - Upgrade to Pro (redirects to Themeisle upgrade page)
+ * - Rate Us (redirects to WP rating page)
+ *
+ * For Pro:
+ * - Documentation (redirects to Themeisle doc page)
+ * - Get Support (redirects to Themeisle support page to open a ticket)
+ * - Run Setup Wizard (this will trigger the setup wizard) if available
+ * - Feature Request (if available redirect to collect feedback requests)
+ * - Rate Us (redirects to WP rating page)
+ *
+ * @return array
+ */
+ private function get_links() {
+ $links = [];
+
+ if ( ! empty( $this->float_widget_data['documentation_link'] ) ) {
+ $links[] = [
+ 'icon' => 'dashicons-book-alt',
+ 'title' => Loader::$labels['float_widget']['links']['documentation'],
+ 'link' => $this->float_widget_data['documentation_link'],
+ ];
+ }
+
+ $support_link = [
+ 'icon' => 'dashicons-format-status',
+ 'title' => Loader::$labels['float_widget']['links']['support'],
+ 'link' => 'https://wordpress.org/support/' . $this->product->get_type() . '/' . $this->product->get_slug() . '/',
+ ];
+ if ( ! $this->float_widget_data['has_upgrade_menu'] && ! empty( $this->float_widget_data['premium_support_link'] ) ) {
+ $support_link['link'] = $this->float_widget_data['premium_support_link'];
+ }
+ $links[] = $support_link;
+
+ if ( ! empty( $this->float_widget_data['wizard_link'] ) ) {
+ $links[] = [
+ 'icon' => 'dashicons-admin-tools',
+ 'title' => Loader::$labels['float_widget']['links']['wizard'],
+ 'link' => $this->float_widget_data['wizard_link'],
+ 'internal' => true,
+ ];
+ }
+
+ $pro = [
+ 'icon' => 'dashicons-superhero-alt',
+ 'title' => Loader::$labels['float_widget']['links']['upgrade'],
+ 'link' => $this->float_widget_data['upgrade_link'],
+ ];
+ $featured_or_pro = $pro;
+ if ( ! $this->float_widget_data['has_upgrade_menu'] ) {
+ $featured_or_pro = []; // we remove the upgrade link
+ $featured = $pro;
+ $featured['title'] = Loader::$labels['float_widget']['links']['feature_request'];
+ $featured['link'] = $this->float_widget_data['feature_request_link'];
+ if ( ! empty( $featured['link'] ) ) {
+ $featured_or_pro = $featured;
+ }
+ }
+
+ if ( ! empty( $featured_or_pro ) ) {
+ $links[] = $featured_or_pro;
+ }
+
+ $links[] = [
+ 'icon' => 'dashicons-star-filled',
+ 'title' => Loader::$labels['float_widget']['links']['rate'],
+ 'link' => 'https://wordpress.org/support/' . $this->product->get_type() . '/' . $this->product->get_slug() . '/reviews/#new-post',
+ ];
+
+ return $links;
+ }
+}
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 3c1a40f3..3b5e9a71 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
@@ -139,7 +139,7 @@ class Licenser extends Abstract_Module {
$value = $this->license_key;
$activate_string = apply_filters( $this->product->get_key() . '_lc_activate_string', Loader::$labels['licenser']['activate'] );
- $deactivate_string = apply_filters( $this->product->get_key() . '_lc_deactivate_string', Loader::$labels['licenser']['deactivateactivate'] );
+ $deactivate_string = apply_filters( $this->product->get_key() . '_lc_deactivate_string', Loader::$labels['licenser']['deactivate'] );
$valid_string = apply_filters( $this->product->get_key() . '_lc_valid_string', Loader::$labels['licenser']['valid'] );
$invalid_string = apply_filters( $this->product->get_key() . '_lc_invalid_string', Loader::$labels['licenser']['invalid'] );
$license_message = apply_filters( $this->product->get_key() . '_lc_license_message', Loader::$labels['licenser']['notice'] );
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 097eeaf8..5748296c 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
@@ -188,7 +188,7 @@ class Logger extends Abstract_Module {
/**
* Load telemetry.
- *
+ *
* @return void
*/
public function load_telemetry() {
@@ -198,35 +198,35 @@ class Logger extends Abstract_Module {
$all_products = Loader::get_products();
$all_products[ $this->product->get_slug() ] = $this->product; // Add current product to the list of products to check for telemetry.
+ // Register telemetry params for eligible products.
foreach ( $all_products as $product_slug => $product ) {
-
- // Ignore pro products.
+
+ // Ignore PRO products.
if ( false !== strstr( $product_slug, 'pro' ) ) {
continue;
}
- $default = 'no';
+ $pro_slug = $product->get_pro_slug();
+ $logger_key = $product->get_key() . '_logger_flag';
- if ( ! $product->is_wordpress_available() ) {
- $default = 'yes';
- } else {
- $pro_slug = $product->get_pro_slug();
+ // If the product is not available in the WordPress store, or it's PRO version is installed, activate the logger if it was not initialized -- Pro users are opted in by default.
+ if ( ! $product->is_wordpress_available() || ( ! empty( $pro_slug ) && isset( $all_products[ $pro_slug ] ) ) ) {
+ $logger_flag = get_option( $logger_key );
- if ( ! empty( $pro_slug ) && isset( $all_products[ $pro_slug ] ) ) {
- $default = 'yes';
+ if ( false === $logger_flag ) {
+ update_option( $logger_key, 'yes' );
}
}
- if ( 'yes' === get_option( $product->get_key() . '_logger_flag', $default ) ) {
+ if ( 'yes' === get_option( $product->get_key() . '_logger_flag', 'no' ) ) {
$main_slug = explode( '-', $product_slug );
$main_slug = $main_slug[0];
- $pro_slug = $product->get_pro_slug();
$track_hash = Licenser::create_license_hash( str_replace( '-', '_', ! empty( $pro_slug ) ? $pro_slug : $product_slug ) );
// Check if product was already tracked.
$active_telemetry = false;
- foreach ( $products_with_telemetry as &$product_with_telemetry ) {
+ foreach ( $products_with_telemetry as $product_with_telemetry ) {
if ( $product_with_telemetry['slug'] === $main_slug ) {
$active_telemetry = true;
break;
@@ -236,7 +236,7 @@ class Logger extends Abstract_Module {
if ( $active_telemetry ) {
continue;
}
-
+
$products_with_telemetry[] = array(
'slug' => $main_slug,
'trackHash' => $track_hash ? $track_hash : 'free',
@@ -251,7 +251,6 @@ class Logger extends Abstract_Module {
return;
}
-
$tracking_handler = apply_filters( 'themeisle_sdk_dependency_script_handler', 'tracking' );
if ( ! empty( $tracking_handler ) ) {
do_action( 'themeisle_sdk_dependency_enqueue_script', 'tracking' );
@@ -268,10 +267,6 @@ class Logger extends Abstract_Module {
if ( defined( 'WP_DEBUG' ) && WP_DEBUG && defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) {
error_log( $e->getMessage() ); // phpcs:ignore
}
- } catch ( \Error $e ) {
- if ( defined( 'WP_DEBUG' ) && WP_DEBUG && defined( 'WP_DEBUG_LOG' ) && WP_DEBUG_LOG ) {
- error_log( $e->getMessage() ); // phpcs:ignore
- }
} finally {
return;
}
diff --git a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php
index accef0da..5f46108a 100644
--- a/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php
+++ b/wp-content/plugins/menu-icons/vendor/codeinwp/themeisle-sdk/src/Modules/Rollback.php
@@ -121,8 +121,8 @@ class Rollback extends Abstract_Module {
if ( empty( $url ) ) {
return [];
}
- $response = function_exists( 'wp_remote_get_wp_remote_get' )
- ? wp_remote_get_wp_remote_get( $url )
+ $response = function_exists( 'vip_safe_wp_remote_get' )
+ ? vip_safe_wp_remote_get( $url )
: wp_remote_get( $url ); //phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_remote_get_wp_remote_get
if ( is_wp_error( $response ) ) {
return array();
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 ac7335c8..84235d04 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
@@ -39,6 +39,7 @@ $files_to_load = [
$themeisle_library_path . '/src/Modules/About_us.php',
$themeisle_library_path . '/src/Modules/Announcements.php',
$themeisle_library_path . '/src/Modules/Featured_plugins.php',
+ $themeisle_library_path . '/src/Modules/Float_widget.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/installed.json b/wp-content/plugins/menu-icons/vendor/composer/installed.json
index 7615fabd..46ccc0fc 100644
--- a/wp-content/plugins/menu-icons/vendor/composer/installed.json
+++ b/wp-content/plugins/menu-icons/vendor/composer/installed.json
@@ -133,23 +133,23 @@
},
{
"name": "codeinwp/themeisle-sdk",
- "version": "3.3.20",
- "version_normalized": "3.3.20.0",
+ "version": "3.3.25",
+ "version_normalized": "3.3.25.0",
"source": {
"type": "git",
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
- "reference": "d1b92f3ab74f1b3f0afad7e23ddb1c058d66c03c"
+ "reference": "29b7c81f8ccd039f49d62ef7427a4cc06369becc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/d1b92f3ab74f1b3f0afad7e23ddb1c058d66c03c",
- "reference": "d1b92f3ab74f1b3f0afad7e23ddb1c058d66c03c",
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/29b7c81f8ccd039f49d62ef7427a4cc06369becc",
+ "reference": "29b7c81f8ccd039f49d62ef7427a4cc06369becc",
"shasum": ""
},
"require-dev": {
"codeinwp/phpcs-ruleset": "dev-main"
},
- "time": "2024-04-16T12:27:32+00:00",
+ "time": "2024-07-08T13:49:14+00:00",
"type": "library",
"installation-source": "dist",
"notification-url": "https://packagist.org/downloads/",
@@ -168,6 +168,10 @@
"keywords": [
"wordpress"
],
+ "support": {
+ "issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
+ "source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.3.25"
+ },
"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 2c096d74..035beb0c 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.14',
- 'version' => '0.13.14.0',
- 'reference' => 'a7c071a7be5a809a8379624381d823e2d9b20e50',
+ 'pretty_version' => 'v0.13.15',
+ 'version' => '0.13.15.0',
+ 'reference' => '6f28bd69233def87a6289b95d36c9b9b5500cefb',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -40,18 +40,18 @@
'dev_requirement' => false,
),
'codeinwp/themeisle-sdk' => array(
- 'pretty_version' => '3.3.20',
- 'version' => '3.3.20.0',
- 'reference' => 'd1b92f3ab74f1b3f0afad7e23ddb1c058d66c03c',
+ 'pretty_version' => '3.3.25',
+ 'version' => '3.3.25.0',
+ 'reference' => '29b7c81f8ccd039f49d62ef7427a4cc06369becc',
'type' => 'library',
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
'aliases' => array(),
'dev_requirement' => false,
),
'codeinwp/wp-menu-icons' => array(
- 'pretty_version' => 'v0.13.14',
- 'version' => '0.13.14.0',
- 'reference' => 'a7c071a7be5a809a8379624381d823e2d9b20e50',
+ 'pretty_version' => 'v0.13.15',
+ 'version' => '0.13.15.0',
+ 'reference' => '6f28bd69233def87a6289b95d36c9b9b5500cefb',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),