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
← All changes | jetpack_vendor/automattic/jetpack-config/src/class-config.php +27 -40 12.2.3 → 16.3 View file →
@@ -11,16 +11,15 @@
11 11 * The Config package does not require the composer packages that
12 12 * contain the package classes shown below. The consumer plugin
13 13 * must require the corresponding packages to use these features.
14 14 */
15 -use Automattic\Jetpack\Blaze as Blaze;
15 +use Automattic\Jetpack\Account_Protection\Account_Protection as Jetpack_Account_Protection_Main;
16 16 use Automattic\Jetpack\Connection\Manager;
17 17 use Automattic\Jetpack\Connection\Plugin;
18 18 use Automattic\Jetpack\Import\Main as Import_Main;
19 -use Automattic\Jetpack\JITM as JITM;
20 19 use Automattic\Jetpack\JITMS\JITM as JITMS_JITM;
21 -use Automattic\Jetpack\Post_List\Post_List as Post_List;
22 -use Automattic\Jetpack\Publicize\Publicize_Setup as Publicize_Setup;
20 +use Automattic\Jetpack\Post_List\Post_List;
21 +use Automattic\Jetpack\Publicize\Publicize_Setup;
23 22 use Automattic\Jetpack\Search\Initializer as Jetpack_Search_Main;
24 23 use Automattic\Jetpack\Stats\Main as Stats_Main;
25 24 use Automattic\Jetpack\Stats_Admin\Main as Stats_Admin_Main;
26 25 use Automattic\Jetpack\Sync\Main as Sync_Main;
@@ -25,10 +24,8 @@
25 24 use Automattic\Jetpack\Stats_Admin\Main as Stats_Admin_Main;
26 25 use Automattic\Jetpack\Sync\Main as Sync_Main;
27 26 use Automattic\Jetpack\VideoPress\Initializer as VideoPress_Pkg_Initializer;
28 27 use Automattic\Jetpack\Waf\Waf_Initializer as Jetpack_Waf_Main;
29 -use Automattic\Jetpack\WordAds\Initializer as Jetpack_WordAds_Main;
30 -use Automattic\Jetpack\Yoast_Promo as Yoast_Promo;
31 28
32 29 /**
33 30 * The configuration class.
34 31 */
@@ -43,23 +40,22 @@
43 40 *
44 41 * @var Array
45 42 */
46 43 protected $config = array(
47 - 'jitm' => false,
48 - 'connection' => false,
49 - 'sync' => false,
50 - 'post_list' => false,
51 - 'identity_crisis' => false,
52 - 'search' => false,
53 - 'publicize' => false,
54 - 'wordads' => false,
55 - 'waf' => false,
56 - 'videopress' => false,
57 - 'stats' => false,
58 - 'stats_admin' => false,
59 - 'blaze' => false,
60 - 'yoast_promo' => false,
61 - 'import' => false,
44 + 'jitm' => false,
45 + 'connection' => false,
46 + 'sync' => false,
47 + 'post_list' => false,
48 + 'identity_crisis' => false,
49 + 'search' => false,
50 + 'publicize' => false,
51 + 'account_protection' => false,
52 + 'waf' => false,
53 + 'videopress' => false,
54 + 'stats' => false,
55 + 'stats_admin' => false,
56 + 'yoast_promo' => false,
57 + 'import' => false,
62 58 );
63 59
64 60 /**
65 61 * Initialization options stored here.
@@ -142,11 +138,11 @@
142 138 $this->ensure_class( 'Automattic\Jetpack\Publicize\Publicize_UI' ) && $this->ensure_class( 'Automattic\Jetpack\Publicize\Publicize' )
143 139 && $this->ensure_feature( 'publicize' );
144 140 }
145 141
146 - if ( $this->config['wordads'] ) {
147 - $this->ensure_class( 'Automattic\Jetpack\WordAds\Initializer' )
148 - && $this->ensure_feature( 'wordads' );
142 + if ( $this->config['account_protection'] ) {
143 + $this->ensure_class( 'Automattic\Jetpack\Account_Protection\Account_Protection' )
144 + && $this->ensure_feature( 'account_protection' );
149 145 }
150 146
151 147 if ( $this->config['waf'] ) {
152 148 $this->ensure_class( 'Automattic\Jetpack\Waf\Waf_Initializer' )
@@ -162,12 +158,8 @@
162 158 if ( $this->config['stats_admin'] ) {
163 159 $this->ensure_class( 'Automattic\Jetpack\Stats_Admin\Main' ) && $this->ensure_feature( 'stats_admin' );
164 160 }
165 161
166 - if ( $this->config['blaze'] ) {
167 - $this->ensure_class( 'Automattic\Jetpack\Blaze' ) && $this->ensure_feature( 'blaze' );
168 - }
169 -
170 162 if ( $this->config['yoast_promo'] ) {
171 163 $this->ensure_class( 'Automattic\Jetpack\Yoast_Promo' ) && $this->ensure_feature( 'yoast_promo' );
172 164 }
173 165
@@ -241,8 +233,9 @@
241 233 if ( class_exists( 'Automattic\Jetpack\JITMS\JITM' ) ) {
242 234 JITMS_JITM::configure();
243 235 } else {
244 236 // Provides compatibility with jetpack-jitm <v1.6.
237 + // @phan-suppress-next-line PhanUndeclaredClassMethod
245 238 JITM::configure();
246 239 }
247 240
248 241 return true;
@@ -309,12 +302,15 @@
309 302 }
310 303 }
311 304
312 305 /**
313 - * Enables WordAds.
306 + * Enables Account Protection.
314 307 */
315 - protected function enable_wordads() {
316 - Jetpack_WordAds_Main::init();
308 + protected function enable_account_protection() {
309 + $account_protection = Jetpack_Account_Protection_Main::instance();
310 + $account_protection->initialize();
311 +
312 + return true;
317 313 }
318 314
319 315 /**
320 316 * Enables Waf.
@@ -360,16 +356,8 @@
360 356 return true;
361 357 }
362 358
363 359 /**
364 - * Enables Blaze.
365 - */
366 - protected function enable_blaze() {
367 - Blaze::init();
368 - return true;
369 - }
370 -
371 - /**
372 360 * Enables Yoast Promo.
373 361 */
374 362 protected function enable_yoast_promo() {
375 363 Yoast_Promo::init();
@@ -466,6 +454,5 @@
466 454 */
467 455 protected function get_feature_options( $feature ) {
468 456 return empty( $this->feature_options[ $feature ] ) ? array() : $this->feature_options[ $feature ];
469 457 }
470 -
471 458 }