PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 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 All 508 releases
jetpack / jetpack_vendor / automattic / jetpack-boost-speed-score / src / class-jetpack-boost-modules.php

class-jetpack-boost-modules.php in Jetpack – WP Security, Backup, Speed, & Growth 16.3, at jetpack_vendor/automattic/jetpack-boost-speed-score/src/class-jetpack-boost-modules.php

57 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
3 /**
4 * Jetpack Boost Active Modules
5 *
6 * Since the speed scores API will be used in the Jetpack plugin and in the My Jetpack, if Jetpack Boost
7 * is uninstalled, all we need is to pass along this placeholder class for the modules that essentially
8 * tells the API the user doesn't have any Boost modules active.
9 *
10 * @package automattic/jetpack/boost_speed_score
11 */
12 namespace Automattic\Jetpack\Boost_Speed_Score;
13
14 /**
15 * Jetpack Boost Modules
16 */
17 class Jetpack_Boost_Modules {
18
19 /**
20 * Holds the singleton instance of the class
21 *
22 * @var Jetpack_Boost_Modules
23 */
24 private static $instance = false;
25
26 /**
27 * Singleton
28 *
29 * @static
30 * @return Jetpack_Boost_Modules
31 */
32 public static function init() {
33 if ( ! self::$instance ) {
34 self::$instance = new Jetpack_Boost_Modules();
35 }
36
37 return self::$instance;
38 }
39 /**
40 * Returns status of all active boost modules that are also ready
41 *
42 * @return array - An empty array. The user will never have active modules when using the Boost Score API
43 */
44 public function get_ready_active_optimization_modules() {
45 return array();
46 }
47
48 /**
49 * Returns whether or not the user has active modules
50 *
51 * @return false - The user will never have active modules when using the Boost Score API
52 */
53 public function have_enabled_modules() {
54 return false;
55 }
56 }
57