Cache
2 years ago
ThirdParty
2 years ago
DBPermissions.php
2 years ago
Escape.php
2 years ago
Hooks.php
2 years ago
Math.php
5 years ago
PluginInfo.php
2 years ago
Sanitize.php
3 years ago
ServerVars.php
2 years ago
SlashMode.php
5 years ago
Strings.php
2 years ago
Times.php
2 years ago
Urls.php
3 years ago
WpDefaultDirectories.php
3 years ago
PluginInfo.php
31 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPStaging\Framework\Utils; |
| 4 | |
| 5 | class PluginInfo |
| 6 | { |
| 7 | /** |
| 8 | * Checks if the admin menu can be displayed. The different cases are: |
| 9 | * - if the free only version is active; |
| 10 | * - if the pro version is active then the free version must be active and compatible with the pro version. |
| 11 | * |
| 12 | * @return bool |
| 13 | */ |
| 14 | public function canShowAdminMenu(): bool |
| 15 | { |
| 16 | if (!defined('WPSTGPRO_VERSION')) { |
| 17 | return true; |
| 18 | } |
| 19 | |
| 20 | if (wpstgIsFreeActiveInNetworkOrCurrentSite()) { |
| 21 | return true; |
| 22 | } |
| 23 | |
| 24 | if (wpstgIsFreeVersionCompatible()) { |
| 25 | return true; |
| 26 | } |
| 27 | |
| 28 | return false; |
| 29 | } |
| 30 | } |
| 31 |