AMP
2 years ago
Elementor
2 years ago
Ends
2 years ago
Includes
2 years ago
Plugins
2 years ago
Providers
2 years ago
ThirdParty
2 years ago
AutoLoader.php
2 years ago
Compatibility.php
2 years ago
Core.php
2 years ago
CoreLegacy.php
4 years ago
DisablerLegacy.php
2 years ago
Loader.php
2 years ago
RestAPI.php
2 years ago
Shortcode.php
2 years ago
index.html
7 years ago
simple_html_dom.php
4 years ago
Compatibility.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | namespace EmbedPress; |
| 4 | |
| 5 | (defined('ABSPATH') && defined('EMBEDPRESS_IS_LOADED')) or die("No direct script access allowed."); |
| 6 | |
| 7 | /** |
| 8 | * Class Compatibility. |
| 9 | * |
| 10 | * @package EmbedPress |
| 11 | * @author EmbedPress <help@embedpress.com> |
| 12 | * @copyright Copyright (C) 2023 WPDeveloper. All rights reserved. |
| 13 | * @license GPLv3 or later |
| 14 | */ |
| 15 | class Compatibility |
| 16 | { |
| 17 | /** |
| 18 | * Returns true if is WordPress 5.x or any beta version. |
| 19 | * |
| 20 | * @return bool |
| 21 | */ |
| 22 | public static function isWordPress5() |
| 23 | { |
| 24 | global $wp_version; |
| 25 | |
| 26 | return version_compare($wp_version, '5.0', '>=') || substr($wp_version, 0, 2) === '5.'; |
| 27 | } |
| 28 | |
| 29 | public static function isClassicalEditorActive() |
| 30 | { |
| 31 | $isActive = is_plugin_active('classic-editor/classic-editor.php'); |
| 32 | |
| 33 | return $isActive; |
| 34 | } |
| 35 | } |
| 36 |