Blocks
4 years ago
Contracts
5 years ago
Database
5 years ago
Integrations
4 years ago
Libraries
5 years ago
Models
5 years ago
Seeds
5 years ago
Services
4 years ago
Support
5 years ago
config
5 years ago
Activator.php
5 years ago
Attachment.php
5 years ago
Controller.php
5 years ago
Core.php
5 years ago
Factory.php
5 years ago
Files.php
5 years ago
Plugin.php
5 years ago
Requirements.php
5 years ago
support.php
5 years ago
Plugin.php
43 lines
| 1 | <?php |
| 2 | |
| 3 | namespace PrestoPlayer; |
| 4 | |
| 5 | class Plugin |
| 6 | { |
| 7 | public static function isPro() |
| 8 | { |
| 9 | return defined('PRESTO_PLAYER_PRO_ENABLED'); |
| 10 | } |
| 11 | |
| 12 | public static function requiredProVersion() |
| 13 | { |
| 14 | return '0.0.3'; |
| 15 | } |
| 16 | |
| 17 | /** |
| 18 | * Get the version from plugin data |
| 19 | * |
| 20 | * @return string |
| 21 | */ |
| 22 | public static function version() |
| 23 | { |
| 24 | // Load version from plugin data. |
| 25 | if (!\function_exists('get_plugin_data')) { |
| 26 | require_once \ABSPATH . 'wp-admin/includes/plugin.php'; |
| 27 | } |
| 28 | |
| 29 | return \get_plugin_data(PRESTO_PLAYER_PLUGIN_FILE, false, false)['Version']; |
| 30 | } |
| 31 | |
| 32 | public static function proVersion() |
| 33 | { |
| 34 | if (!self::isPro()) { |
| 35 | return false; |
| 36 | } |
| 37 | if (class_exists('\PrestoPlayer\Pro\Plugin')) { |
| 38 | return \PrestoPlayer\Pro\Plugin::version(); |
| 39 | } |
| 40 | return false; |
| 41 | } |
| 42 | } |
| 43 |