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 -26 12.4.2 → 16.3 View file →
@@ -11,15 +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\Account_Protection\Account_Protection as Jetpack_Account_Protection_Main;
15 16 use Automattic\Jetpack\Connection\Manager;
16 17 use Automattic\Jetpack\Connection\Plugin;
17 18 use Automattic\Jetpack\Import\Main as Import_Main;
18 -use Automattic\Jetpack\JITM as JITM;
19 19 use Automattic\Jetpack\JITMS\JITM as JITMS_JITM;
20 -use Automattic\Jetpack\Post_List\Post_List as Post_List;
21 -use Automattic\Jetpack\Publicize\Publicize_Setup as Publicize_Setup;
20 +use Automattic\Jetpack\Post_List\Post_List;
21 +use Automattic\Jetpack\Publicize\Publicize_Setup;
22 22 use Automattic\Jetpack\Search\Initializer as Jetpack_Search_Main;
23 23 use Automattic\Jetpack\Stats\Main as Stats_Main;
24 24 use Automattic\Jetpack\Stats_Admin\Main as Stats_Admin_Main;
25 25 use Automattic\Jetpack\Sync\Main as Sync_Main;
@@ -24,10 +24,8 @@
24 24 use Automattic\Jetpack\Stats_Admin\Main as Stats_Admin_Main;
25 25 use Automattic\Jetpack\Sync\Main as Sync_Main;
26 26 use Automattic\Jetpack\VideoPress\Initializer as VideoPress_Pkg_Initializer;
27 27 use Automattic\Jetpack\Waf\Waf_Initializer as Jetpack_Waf_Main;
28 -use Automattic\Jetpack\WordAds\Initializer as Jetpack_WordAds_Main;
29 -use Automattic\Jetpack\Yoast_Promo as Yoast_Promo;
30 28
31 29 /**
32 30 * The configuration class.
33 31 */
@@ -42,22 +40,22 @@
42 40 *
43 41 * @var Array
44 42 */
45 43 protected $config = array(
46 - 'jitm' => false,
47 - 'connection' => false,
48 - 'sync' => false,
49 - 'post_list' => false,
50 - 'identity_crisis' => false,
51 - 'search' => false,
52 - 'publicize' => false,
53 - 'wordads' => false,
54 - 'waf' => false,
55 - 'videopress' => false,
56 - 'stats' => false,
57 - 'stats_admin' => false,
58 - 'yoast_promo' => false,
59 - '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,
60 58 );
61 59
62 60 /**
63 61 * Initialization options stored here.
@@ -140,11 +138,11 @@
140 138 $this->ensure_class( 'Automattic\Jetpack\Publicize\Publicize_UI' ) && $this->ensure_class( 'Automattic\Jetpack\Publicize\Publicize' )
141 139 && $this->ensure_feature( 'publicize' );
142 140 }
143 141
144 - if ( $this->config['wordads'] ) {
145 - $this->ensure_class( 'Automattic\Jetpack\WordAds\Initializer' )
146 - && $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' );
147 145 }
148 146
149 147 if ( $this->config['waf'] ) {
150 148 $this->ensure_class( 'Automattic\Jetpack\Waf\Waf_Initializer' )
@@ -235,8 +233,9 @@
235 233 if ( class_exists( 'Automattic\Jetpack\JITMS\JITM' ) ) {
236 234 JITMS_JITM::configure();
237 235 } else {
238 236 // Provides compatibility with jetpack-jitm <v1.6.
237 + // @phan-suppress-next-line PhanUndeclaredClassMethod
239 238 JITM::configure();
240 239 }
241 240
242 241 return true;
@@ -303,12 +302,15 @@
303 302 }
304 303 }
305 304
306 305 /**
307 - * Enables WordAds.
306 + * Enables Account Protection.
308 307 */
309 - protected function enable_wordads() {
310 - 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;
311 313 }
312 314
313 315 /**
314 316 * Enables Waf.
@@ -452,6 +454,5 @@
452 454 */
453 455 protected function get_feature_options( $feature ) {
454 456 return empty( $this->feature_options[ $feature ] ) ? array() : $this->feature_options[ $feature ];
455 457 }
456 -
457 458 }