updated plugin Jetpack Protect version 1.3.0

This commit is contained in:
2023-03-17 22:34:13 +00:00
committed by Gitium
parent 19e086d1c4
commit 1e9ac45ec6
183 changed files with 4388 additions and 2345 deletions

View File

@ -12,14 +12,17 @@ namespace Automattic\Jetpack;
* contain the package classes shown below. The consumer plugin
* must require the corresponding packages to use these features.
*/
use Automattic\Jetpack\Blaze as Blaze;
use Automattic\Jetpack\Connection\Manager;
use Automattic\Jetpack\Connection\Plugin;
use Automattic\Jetpack\Import\Main as Import_Main;
use Automattic\Jetpack\JITM as JITM;
use Automattic\Jetpack\JITMS\JITM as JITMS_JITM;
use Automattic\Jetpack\Post_List\Post_List as Post_List;
use Automattic\Jetpack\Publicize\Publicize_Setup as Publicize_Setup;
use Automattic\Jetpack\Search\Initializer as Jetpack_Search_Main;
use Automattic\Jetpack\Stats\Main as Stats_Main;
use Automattic\Jetpack\Stats_Admin\Main as Stats_Admin_Main;
use Automattic\Jetpack\Sync\Main as Sync_Main;
use Automattic\Jetpack\VideoPress\Initializer as VideoPress_Pkg_Initializer;
use Automattic\Jetpack\Waf\Waf_Initializer as Jetpack_Waf_Main;
@ -51,6 +54,9 @@ class Config {
'waf' => false,
'videopress' => false,
'stats' => false,
'stats_admin' => false,
'blaze' => false,
'import' => false,
);
/**
@ -151,6 +157,18 @@ class Config {
if ( $this->config['stats'] ) {
$this->ensure_class( 'Automattic\Jetpack\Stats\Main' ) && $this->ensure_feature( 'stats' );
}
if ( $this->config['stats_admin'] ) {
$this->ensure_class( 'Automattic\Jetpack\Stats_Admin\Main' ) && $this->ensure_feature( 'stats_admin' );
}
if ( $this->config['blaze'] ) {
$this->ensure_class( 'Automattic\Jetpack\Blaze' ) && $this->ensure_feature( 'blaze' );
}
if ( $this->config['import'] ) {
$this->ensure_class( 'Automattic\Jetpack\Import\Main' )
&& $this->ensure_feature( 'import' );
}
}
/**
@ -317,6 +335,14 @@ class Config {
return true;
}
/**
* Enables Stats Admin.
*/
protected function enable_stats_admin() {
Stats_Admin_Main::init();
return true;
}
/**
* Handles VideoPress options
*/
@ -328,6 +354,23 @@ class Config {
return true;
}
/**
* Enables Blaze.
*/
protected function enable_blaze() {
Blaze::init();
return true;
}
/**
* Enables the Import feature.
*/
protected function enable_import() {
Import_Main::configure();
return true;
}
/**
* Setup the Connection options.
*/