PluginProbe ʕ •ᴥ•ʔ
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) / 9.5.9
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) v9.5.9
9.5.11 9.5.10.1 9.5.10 trunk 9.4.0 9.4.1 9.4.2 9.4.3 9.5.0 9.5.0.1 9.5.0.2 9.5.1 9.5.2 9.5.2.2 9.5.2.3 9.5.3 9.5.3.1 9.5.3.2 9.5.4 9.5.5 9.5.6 9.5.7 9.5.8 9.5.9
really-simple-ssl / security / security.php
really-simple-ssl / security Last commit date
includes 2 months ago server 2 months ago tests 2 months ago wordpress 2 months ago class-rsssl-htaccess-file-manager.php 2 months ago cron.php 2 months ago deactivate-integration.php 2 months ago firewall-manager.php 2 months ago functions.php 2 months ago index.php 2 months ago integrations.php 2 months ago notices.php 2 months ago security.php 2 months ago sync-settings.php 2 months ago tests.php 2 months ago
security.php
64 lines
1 <?php
2
3 use RSSSL\Security\RSSSL_Htaccess_File_Manager;
4
5 defined('ABSPATH') or die();
6 class REALLY_SIMPLE_SECURITY
7 {
8 private static $instance;
9 public $firewall_manager;
10 public $hardening;
11 /**
12 * Components array, so we can access singleton classes which are dynamically added, from anywhere.
13 * @var
14 */
15 public $components;
16
17 private function __construct()
18 {
19 if (!defined('RSSSL_SAFE_MODE') && file_exists(trailingslashit(WP_CONTENT_DIR) . 'rsssl-safe-mode.lock')) {
20 define('RSSSL_SAFE_MODE', true);
21 }
22 }
23
24 public static function instance()
25 {
26 if (!isset(self::$instance) && !(self::$instance instanceof REALLY_SIMPLE_SECURITY)) {
27 self::$instance = new REALLY_SIMPLE_SECURITY;
28 self::$instance->includes();
29 if ( rsssl_admin_logged_in() ) {
30 $htaccessFileManager = new RSSSL_Htaccess_File_Manager();
31 self::$instance->firewall_manager = new rsssl_firewall_manager($htaccessFileManager);
32 }
33 }
34 return self::$instance;
35 }
36
37 private function includes()
38 {
39
40 $path = rsssl_path.'security/';
41 require_once( $path . 'integrations.php' );
42 require_once( $path . 'cron.php' );
43 require_once( $path . 'includes/check404/class-rsssl-simple-404-interceptor.php' );
44
45 /**
46 * Load only on back-end
47 */
48 if ( rsssl_admin_logged_in() ) {
49 require_once( $path . 'functions.php' );
50 require_once( $path . 'deactivate-integration.php' );
51 require_once( $path . 'firewall-manager.php' );
52 require_once( $path . 'tests.php' );
53 require_once( $path . 'notices.php' );
54 require_once( $path . 'sync-settings.php' );
55 }
56
57 }
58 }
59
60 function RSSSL_SECURITY()
61 {
62 return REALLY_SIMPLE_SECURITY::instance();
63 }
64 add_action('plugins_loaded', 'RSSSL_SECURITY', 9);