js
2 months ago
tus
1 month ago
videopress-divi
2 months ago
videopress-divi-5
2 months ago
class-access-control.php
3 months ago
class-admin-ui.php
3 weeks ago
class-ajax.php
1 month ago
class-attachment-handler.php
1 month ago
class-block-editor-content.php
1 month ago
class-block-editor-extensions.php
1 month ago
class-block-replacement.php
9 months ago
class-caption-tracks.php
1 month ago
class-data.php
1 month ago
class-divi.php
2 months ago
class-initial-state.php
1 month ago
class-initializer.php
4 weeks ago
class-jwt-token-bridge.php
2 years ago
class-module-control.php
3 years ago
class-options.php
2 years ago
class-package-version.php
3 weeks ago
class-plan.php
2 years ago
class-rest-controller.php
1 month ago
class-site.php
3 years ago
class-stats.php
1 year ago
class-status.php
9 months ago
class-upload-exception.php
3 years ago
class-uploader-rest-endpoints.php
9 months ago
class-uploader.php
1 month ago
class-utils.php
3 months ago
class-video-block-email-renderer.php
2 months ago
class-videopress-rest-api-v1-features.php
6 months ago
class-videopress-rest-api-v1-settings.php
1 month ago
class-videopress-rest-api-v1-site.php
2 years ago
class-videopress-rest-api-v1-stats.php
3 years ago
class-videopresstoken.php
1 month ago
class-wpcom-rest-api-v2-attachment-field-videopress.php
9 months ago
class-wpcom-rest-api-v2-attachment-videopress-data.php
1 month ago
class-wpcom-rest-api-v2-endpoint-videopress-caption-tracks.php
1 month ago
class-wpcom-rest-api-v2-endpoint-videopress.php
4 weeks ago
class-xmlrpc.php
1 month ago
utility-functions.php
4 weeks ago
class-status.php
76 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The class that provides information about VideoPress Status |
| 4 | * |
| 5 | * @package automattic/jetpack-videopress |
| 6 | */ |
| 7 | |
| 8 | namespace Automattic\Jetpack\VideoPress; |
| 9 | |
| 10 | use Automattic\Jetpack\Modules; |
| 11 | |
| 12 | /** |
| 13 | * The class that provides information about VideoPress Status |
| 14 | */ |
| 15 | class Status { |
| 16 | |
| 17 | /** |
| 18 | * Returns whether VideoPress is active |
| 19 | * either as a Jetpack module or as a stand alone plugin |
| 20 | * |
| 21 | * @return boolean |
| 22 | */ |
| 23 | public static function is_active() { |
| 24 | return self::is_jetpack_plugin_and_videopress_module_active() || self::is_standalone_plugin_active(); |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * Checks whether the Jetpack plugin is active |
| 29 | */ |
| 30 | public static function is_jetpack_plugin_active() { |
| 31 | return class_exists( 'Jetpack' ); |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Checks whether the Jetpack plugin |
| 36 | * and its VideoPress module are active. |
| 37 | * |
| 38 | * @return boolean |
| 39 | */ |
| 40 | public static function is_jetpack_plugin_and_videopress_module_active() { |
| 41 | return class_exists( 'Jetpack' ) && ( new Modules() )->is_active( 'videopress' ); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Checks whether the Jetpack plugin is active |
| 46 | * but the VideoPress module is not active. |
| 47 | * |
| 48 | * @since 0.28.2 |
| 49 | * |
| 50 | * @return boolean |
| 51 | */ |
| 52 | public static function is_jetpack_plugin_without_videopress_module_active() { |
| 53 | return class_exists( 'Jetpack' ) && ! ( new Modules() )->is_active( 'videopress' ); |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Checks whether the VideoPress stand alone plugin is active |
| 58 | * |
| 59 | * @return boolean |
| 60 | */ |
| 61 | public static function is_standalone_plugin_active() { |
| 62 | return class_exists( 'Jetpack_VideoPress_Plugin' ); |
| 63 | } |
| 64 | |
| 65 | /** |
| 66 | * Checks whether the registrant plugin is active |
| 67 | * either as a Jetpack module (via Jetpack plugin) |
| 68 | * or as a stand-alone plugin. |
| 69 | * |
| 70 | * @return boolean True if the register plugin is active. |
| 71 | */ |
| 72 | public static function is_registrant_plugin_active() { |
| 73 | return self::is_jetpack_plugin_active() || self::is_standalone_plugin_active(); |
| 74 | } |
| 75 | } |
| 76 |