PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-beta
Jetpack – WP Security, Backup, Speed, & Growth v16.3-beta
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 13.7.2 All 507 releases
jetpack / jetpack_vendor / automattic / jetpack-account-protection / src / class-settings.php

class-settings.php in Jetpack – WP Security, Backup, Speed, & Growth 16.3-beta, at jetpack_vendor/automattic/jetpack-account-protection/src/class-settings.php

45 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class used to manage settings related to Account Protection.
4 *
5 * @package automattic/jetpack-account-protection
6 */
7
8 namespace Automattic\Jetpack\Account_Protection;
9
10 /**
11 * Account Protection Settings
12 */
13 class Settings {
14 /**
15 * Account protection instance.
16 *
17 * @var Account_Protection
18 */
19 private $account_protection;
20
21 /**
22 * Constructor for dependency injection.
23 *
24 * @param ?Account_Protection|null $account_protection Account protection dependency.
25 */
26 public function __construct( ?Account_Protection $account_protection = null ) {
27 $this->account_protection = $account_protection ?? Account_Protection::instance();
28 }
29
30 /**
31 * Get account protection settings.
32 *
33 * @return array
34 */
35 public function get() {
36 $settings = array(
37 'isEnabled' => $this->account_protection->is_enabled(),
38 'isSupported' => $this->account_protection->is_supported_environment(),
39 'hasUnsupportedJetpackVersion' => $this->account_protection->has_unsupported_jetpack_version(),
40 );
41
42 return $settings;
43 }
44 }
45