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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
<?php
class ITSEC_Admin_Notice_Network_Brute_Force_Promo implements ITSEC_Admin_Notice { public function get_id() { return 'network-brute-force-promo'; }
public function get_title() { return ''; }
public function get_message() { return esc_html__( 'New! Take your site security to the next level by activating iThemes Brute Force Network Protection.', 'better-wp-security' ); }
public function get_severity() { return self::S_INFO; }
public function get_meta() { return array(); }
public function show_for_context( ITSEC_Admin_Notice_Context $context ) { return true; }
public function get_actions() { $url = ITSEC_Core::get_settings_module_url( 'network-brute-force' );
if ( ! ITSEC_Modules::is_active( 'network-brute-force' ) ) { $url = add_query_arg( 'enable', 'network-brute-force', $url ); $url = wp_nonce_url( $url, 'itsec-enable-network-brute-force', 'itsec-enable-nonce' ); }
return array( 'register' => new ITSEC_Admin_Notice_Action_Link( $url, esc_html__( 'Get Free API Key', 'better-wp-security' ), ITSEC_Admin_Notice_Action::S_PRIMARY ), ); } }
class ITSEC_Admin_Notice_Licensed_Hostname_Prompt implements ITSEC_Admin_Notice { public function get_id() { return 'licensed-hostname-prompt'; }
public function get_title() { return ''; }
public function get_message() { return esc_html__( 'iThemes Security Pro couldn\'t verify the license for this site. An active license is required to authenticate the Site Scanner.', 'better-wp-security' ); }
public function get_meta() { return []; }
public function get_severity() { return self::S_WARN; }
public function show_for_context( ITSEC_Admin_Notice_Context $context ) { return true; }
public function get_actions() { return [ 'update' => new ITSEC_Admin_Notice_Action_Link( ithemes_updater_get_change_licensed_site_url( ITSEC_Core::get_settings_page_url() ), esc_html__( 'Update License', 'better-wp-security' ), ITSEC_Admin_Notice_Action::S_PRIMARY, static function () { ITSEC_Modules::set_setting( 'global', 'licensed_hostname_prompt', false ); } ) ]; } }
if ( ITSEC_Core::is_temp_disable_modules_set() ) { ITSEC_Lib_Admin_Notices::register( new ITSEC_Admin_Notice_Managers_Only( new ITSEC_Admin_Notice_Static( 'disable-modules', esc_html__( 'The ITSEC_DISABLE_MODULES define is set. All iThemes Security protections are disabled. Please make the necessary settings changes and remove the define as quickly as possible.', 'better-wp-security' ), '', ITSEC_Admin_Notice::S_WARN ) ) ); }
if ( ! ITSEC_Modules::is_active( 'network-brute-force' ) || ! ITSEC_Modules::get_setting( 'network-brute-force', 'api_secret' ) ) { ITSEC_Lib_Admin_Notices::register( new ITSEC_Admin_Notice_Globally_Dismissible( new ITSEC_Admin_Notice_Managers_Only( new ITSEC_Admin_Notice_Network_Brute_Force_Promo() ) ) ); }
if ( ITSEC_Core::is_licensed() && ITSEC_Modules::get_setting( 'global', 'licensed_hostname_prompt' ) && function_exists( 'ithemes_updater_get_change_licensed_site_url' ) ) { ITSEC_Lib_Admin_Notices::register( new ITSEC_Admin_Notice_Managers_Only( new ITSEC_Admin_Notice_Licensed_Hostname_Prompt() ) ); }
|