PluginProbe
WindPress – Tailwind CSS integration for WordPress / 3.2.89
WindPress – Tailwind CSS integration for WordPress v3.2.89
3.2.89 3.2.88 3.2.87 3.2.86 3.2.85 3.2.84 3.2.83 3.2.82 3.2.81 trunk 3.0.0 3.0.1 3.0.10 3.0.11 3.0.12 3.0.13 3.0.14 3.0.15 3.0.16 3.0.17 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 All 143 releases
← All changes | src/Utils/Common.php +7 -2 3.2.833.2.89 View file →
@@ -10,11 +10,11 @@
10 10 */
11 11 declare (strict_types=1);
12 12 namespace WindPress\WindPress\Utils;
13 13
14 -use WindPressDeps\EDD_SL\PluginUpdater;
15 14 use Exception;
16 15 use WIND_PRESS;
16 +use WindPress\WindPress\Plugin;
17 17 /**
18 18 * Common utility functions for the plugin.
19 19 *
20 20 * @since 3.0.0
@@ -68,9 +68,14 @@
68 68 return $key ? $plugin_data[$key] : $plugin_data;
69 69 }
70 70 public static function is_updater_library_available(): bool
71 71 {
72 - return class_exists(PluginUpdater::class);
72 + if (method_exists(Plugin::class, 'is_pro_edition')) {
73 + return Plugin::is_pro_edition();
74 + }
75 + // WordPress can run the old Plugin class against the newly installed files during an upgrade.
76 + $plugin_directory = dirname(WIND_PRESS::FILE);
77 + return is_file($plugin_directory . '/vendor/easy-digital-downloads/edd-sl-sdk/edd-sl-sdk.php') || is_file($plugin_directory . '/vendor/rosua/edd-sl-plugin-updater/src/PluginUpdater.php');
73 78 }
74 79 public static function random_slug(int $length = 21): string
75 80 {
76 81 return (new \WindPressDeps\Hidehalo\Nanoid\Client())->generateId($length, \WindPressDeps\Hidehalo\Nanoid\Client::MODE_DYNAMIC);