-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecured-wp.php
More file actions
executable file
·57 lines (50 loc) · 1.92 KB
/
Copy pathsecured-wp.php
File metadata and controls
executable file
·57 lines (50 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* The plugin bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @link https://wp-secured.com
* @since 1.0.0
* @package Secured
*
* @wordpress-plugin
* Plugin Name: Secured WP
* Plugin URI: https://wp-secured.com
* Description: Provides Security for WP sites. 2FA, login attempts, hardens WP login process
* Version: 1.5.0
* Author: wp-secured
* Author URI: https://wp-secured.com
* Author email: wp.secured.com@gmail.com
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: wp-secured
* Domain Path: /languages
* License: GPL2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
/** Prevent default call */
if ( ! function_exists( 'add_action' ) ) {
exit;
}
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/constants.php';
add_action( 'init', [ 'WPSEC\\Secured', 'init' ] );
add_action( 'init', [ 'WPSEC\\Controllers\\LoginCheck', 'checkOOBAndLogin' ] );
add_filter( 'plugin_action_links_' . plugin_basename( __FILE__ ), [ 'WPSEC\\Secured', 'addActionLinks' ] );
if ( ! (bool) WPSEC\Controllers\Modules\RememberMe::getGlobalSettingsValue() ) {
add_filter( 'determine_current_user', [ 'WPSEC\\Controllers\\Modules\\RememberMe', 'checkRememberMe' ], 99 );
}
// Fires wp-login redirection.
if ( ! (bool) \WPSEC\Controllers\Modules\Login::getGlobalSettingsValue() ) {
add_action(
'plugins_loaded',
function() {
\WPSEC\Controllers\Modules\Login::init();
}
);
}
register_activation_hook( __FILE__, [ 'WPSEC\\Secured', 'pluginActivation' ] );