PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.2
Jetpack – WP Security, Backup, Speed, & Growth v16.2
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
jetpack / jetpack_vendor / automattic / jetpack-videopress / src / class-status.php

class-status.php in Jetpack – WP Security, Backup, Speed, & Growth 16.2, at jetpack_vendor/automattic/jetpack-videopress/src/class-status.php

76 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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