| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: Ultimate Store Kit |
| 5 | 5 | * Plugin URI: https://storekit.pro/ |
| 6 | 6 | * Description: Build online stores in WordPress with the powerful store builder addon for Elementor. Enjoy a wide range of customizations and easily build product grids, carousels, single product/page elements, checkouts and more. |
| 7 | - * Version: 3.1.0 | |
| 7 | + * Version: 3.1.4 | |
| 8 | 8 | * Author: BdThemes |
| 9 | 9 | * Author URI: https://bdthemes.com/ |
| 10 | 10 | * Text Domain: ultimate-store-kit |
| 11 | 11 | * Domain Path: /languages |
| @@ -10,9 +10,9 @@ | ||
| 10 | 10 | * Text Domain: ultimate-store-kit |
| 11 | 11 | * Domain Path: /languages |
| 12 | 12 | * License: GPL3 |
| 13 | 13 | * Elementor requires at least: 4.0.0 |
| 14 | - * Elementor tested up to: 4.2.2 | |
| 14 | + * Elementor tested up to: 4.2.4 | |
| 15 | 15 | */ |
| 16 | 16 | |
| 17 | 17 | |
| 18 | 18 | |
| @@ -19,9 +19,9 @@ | ||
| 19 | 19 | if (! defined('ABSPATH')) { |
| 20 | 20 | exit; // Exit if accessed directly |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | -// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- usk_ / BDTUSK_ / ultimate-store-kit- are this plugin's established public prefixes. Ultimate Store Kit Pro calls into these names, as does third-party integration code, so renaming them is a breaking change. Plugin Check only recognises prefixes derived verbatim from the slug and so reports them as unprefixed. | |
| 23 | +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- BDTUSK_ / ultimate_store_kit_ / ultimate-store-kit- are this plugin's established public prefixes. | |
| 24 | 24 | |
| 25 | 25 | // Check if vendor directory and autoload.php exist |
| 26 | 26 | $ultimate_store_kit_autoload_file = __DIR__ . '/vendor/autoload.php'; |
| 27 | 27 | if (file_exists($ultimate_store_kit_autoload_file)) { |
| @@ -29,9 +29,9 @@ | ||
| 29 | 29 | require_once $ultimate_store_kit_autoload_file; |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | // Some pre define value for easy use |
| 33 | -define('BDTUSK_VER', '3.1.0'); | |
| 33 | +define('BDTUSK_VER', '3.1.4'); | |
| 34 | 34 | define('BDTUSK__FILE__', __FILE__); |
| 35 | 35 | define('BDTUSK_PNAME', basename(dirname(BDTUSK__FILE__))); |
| 36 | 36 | define('BDTUSK_PBNAME', plugin_basename(BDTUSK__FILE__)); |
| 37 | 37 | define('BDTUSK_PATH', plugin_dir_path(BDTUSK__FILE__)); |
| @@ -48,11 +48,11 @@ | ||
| 48 | 48 | define('BDTUSK_BUILD_URL', BDTUSK_URL . 'build/'); |
| 49 | 49 | |
| 50 | 50 | define('BDTUSK_TITLE', 'Ultimate Store Kit'); |
| 51 | 51 | |
| 52 | -if (! function_exists('_is_usk_pro_installed')) { | |
| 52 | +if (! function_exists('ultimate_store_kit_is_pro_installed')) { | |
| 53 | 53 | |
| 54 | - function _is_usk_pro_installed() { | |
| 54 | + function ultimate_store_kit_is_pro_installed() { | |
| 55 | 55 | |
| 56 | 56 | if (! function_exists('get_plugins')) { |
| 57 | 57 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 58 | 58 | } |
| @@ -63,11 +63,11 @@ | ||
| 63 | 63 | return isset($installed_plugins[$file_path]); |
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | -if (! function_exists('_is_usk_pro_activated')) { | |
| 67 | +if (! function_exists('ultimate_store_kit_is_pro_activated')) { | |
| 68 | 68 | |
| 69 | - function _is_usk_pro_activated() { | |
| 69 | + function ultimate_store_kit_is_pro_activated() { | |
| 70 | 70 | |
| 71 | 71 | if (! function_exists('get_plugins')) { |
| 72 | 72 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 73 | 73 | } |
| @@ -85,13 +85,13 @@ | ||
| 85 | 85 | |
| 86 | 86 | // Helper function here |
| 87 | 87 | require(dirname(__FILE__) . '/includes/helper.php'); |
| 88 | 88 | |
| 89 | -if (! _is_usk_pro_activated()) { | |
| 89 | +if (! ultimate_store_kit_is_pro_activated()) { | |
| 90 | 90 | require_once BDTUSK_INC_PATH . 'class-pro-widget-map.php'; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | -if (function_exists('usk_license_validation') && true !== usk_license_validation()) { | |
| 93 | +if (function_exists('ultimate_store_kit_license_validation') && true !== ultimate_store_kit_license_validation()) { | |
| 94 | 94 | require_once BDTUSK_INC_PATH . 'class-pro-widget-map.php'; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | require(dirname(__FILE__) . '/includes/utils.php'); |
| @@ -132,9 +132,9 @@ | ||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | $plugin = 'elementor/elementor.php'; |
| 135 | 135 | |
| 136 | - if (_is_dep_plugin_installed($plugin)) { | |
| 136 | + if (ultimate_store_kit_is_dependency_plugin_installed($plugin)) { | |
| 137 | 137 | if (! current_user_can('activate_plugins')) { |
| 138 | 138 | return; |
| 139 | 139 | } |
| 140 | 140 | $activation_url = wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin); |
| @@ -162,9 +162,9 @@ | ||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | $plugin = 'woocommerce/woocommerce.php'; |
| 165 | 165 | |
| 166 | - if (_is_dep_plugin_installed($plugin)) { | |
| 166 | + if (ultimate_store_kit_is_dependency_plugin_installed($plugin)) { | |
| 167 | 167 | if (! current_user_can('activate_plugins')) { |
| 168 | 168 | return; |
| 169 | 169 | } |
| 170 | 170 | $activation_url = wp_nonce_url('plugins.php?action=activate&plugin=' . $plugin . '&plugin_status=all&paged=1&s', 'activate-plugin_' . $plugin); |
| @@ -181,14 +181,18 @@ | ||
| 181 | 181 | |
| 182 | 182 | printf('<div class="error">%1$s</div>', wp_kses_post($admin_message)); |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | -if (! function_exists('_is_dep_plugin_installed')) { | |
| 185 | +if (! function_exists('ultimate_store_kit_is_dependency_plugin_installed')) { | |
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | 188 | * @plug_slug string plugins slug which you want to check installed or not |
| 189 | 189 | */ |
| 190 | - function _is_dep_plugin_installed($plugin_slug) { | |
| 190 | + function ultimate_store_kit_is_dependency_plugin_installed($plugin_slug) { | |
| 191 | + if (! function_exists('get_plugins')) { | |
| 192 | + require_once ABSPATH . 'wp-admin/includes/plugin.php'; | |
| 193 | + } | |
| 194 | + | |
| 191 | 195 | $file_path = $plugin_slug; |
| 192 | 196 | $installed_plugins = get_plugins(); |
| 193 | 197 | |
| 194 | 198 | return isset($installed_plugins[$file_path]); |