options-group-alert.php
7.02 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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php
if (!defined('WORDFENCE_VERSION')) { exit; }
/**
* Presents the Email Alert Preferences group.
*
* Expects $stateKey.
*
* @var string $stateKey The key under which the collapse state is stored.
* @var bool $collapseable If defined, specifies whether or not this grouping can be collapsed. Defaults to true.
*/
if (!isset($collapseable)) {
$collapseable = true;
}
?>
<div class="wf-row">
<div class="wf-col-xs-12">
<div class="wf-block<?php if (!$collapseable) { echo ' wf-always-active'; } else { echo (wfPersistenceController::shared()->isActive($stateKey) ? ' wf-active' : ''); } ?>" data-persistence-key="<?php echo esc_attr($stateKey); ?>">
<div class="wf-block-header">
<div class="wf-block-header-content">
<div class="wf-block-title">
<strong><?php esc_html_e('Email Alert Preferences', 'wordfence'); ?></strong>
</div>
<?php if ($collapseable): ?><div class="wf-block-header-action"><div class="wf-block-header-action-disclosure" role="checkbox" aria-checked="<?php echo (wfPersistenceController::shared()->isActive($stateKey) ? 'true' : 'false'); ?>" tabindex="0"></div></div><?php endif; ?>
</div>
</div>
<div class="wf-block-content">
<ul class="wf-block-list">
<li>
<?php
echo wfView::create('options/option-toggled', array(
'optionName' => 'alertOn_update',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('alertOn_update') ? 1 : 0,
'title' => __('Email me when Wordfence is automatically updated', 'wordfence'),
'subtitle' => __('If you have automatic updates enabled (see above), you\'ll get an email when an update occurs.', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled', array(
'optionName' => 'alertOn_wordfenceDeactivated',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('alertOn_wordfenceDeactivated') ? 1 : 0,
'title' => __('Email me if Wordfence is deactivated', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled', array(
'optionName' => 'alertOn_wafDeactivated',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('alertOn_wafDeactivated') ? 1 : 0,
'title' => __('Email me if the Wordfence Web Application Firewall is turned off', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled-select', array(
'toggleOptionName' => 'alertOn_scanIssues',
'enabledToggleValue' => 1,
'disabledToggleValue' => 0,
'toggleValue' => wfConfig::get('alertOn_scanIssues') > 0 ? 1 : 0,
'selectOptionName' => 'alertOn_severityLevel',
'selectOptions' => array(
array('value' => wfIssues::SEVERITY_CRITICAL, 'label' => __('Critical', 'wordfence')),
array('value' => wfIssues::SEVERITY_HIGH, 'label' => __('High', 'wordfence')),
array('value' => wfIssues::SEVERITY_MEDIUM, 'label' => __('Medium', 'wordfence')),
array('value' => wfIssues::SEVERITY_LOW, 'label' => __('Low', 'wordfence')),
),
'selectValue' => wfConfig::get('alertOn_severityLevel'),
'title' => __('Alert me with scan results of this severity level or greater:', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled', array(
'optionName' => 'alertOn_block',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('alertOn_block') ? 1 : 0,
'title' => __('Alert when an IP address is blocked', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled', array(
'optionName' => 'alertOn_loginLockout',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('alertOn_loginLockout') ? 1 : 0,
'title' => __('Alert when someone is locked out from login', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled', array(
'optionName' => 'alertOn_breachLogin',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('alertOn_breachLogin') ? 1 : 0,
'title' => __('Alert when someone is blocked from logging in for using a password found in a breach', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled', array(
'optionName' => 'alertOn_lostPasswdForm',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('alertOn_lostPasswdForm') ? 1 : 0,
'title' => __('Alert when the "lost password" form is used for a valid user', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled-sub', array(
'optionName' => 'alertOn_adminLogin',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('alertOn_adminLogin') ? 1 : 0,
'title' => __('Alert me when someone with administrator access signs in', 'wordfence'),
'subOptionName' => 'alertOn_firstAdminLoginOnly',
'subEnabledValue' => 1,
'subDisabledValue' => 0,
'subValue' => wfConfig::get('alertOn_firstAdminLoginOnly') ? 1 : 0,
'subTitle' => __('Only alert me when that administrator signs in from a new device', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled-sub', array(
'optionName' => 'alertOn_nonAdminLogin',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('alertOn_nonAdminLogin') ? 1 : 0,
'title' => __('Alert me when a non-admin user signs in', 'wordfence'),
'subOptionName' => 'alertOn_firstNonAdminLoginOnly',
'subEnabledValue' => 1,
'subDisabledValue' => 0,
'subValue' => wfConfig::get('alertOn_firstNonAdminLoginOnly') ? 1 : 0,
'subTitle' => __('Only alert me when that user signs in from a new device', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-toggled', array(
'optionName' => 'wafAlertOnAttacks',
'enabledValue' => 1,
'disabledValue' => 0,
'value' => wfConfig::get('wafAlertOnAttacks') ? 1 : 0,
'title' => __('Alert me when there\'s a large increase in attacks detected on my site', 'wordfence'),
))->render();
?>
</li>
<li>
<?php
echo wfView::create('options/option-text', array(
'textOptionName' => 'alert_maxHourly',
'textValue' => wfConfig::get('alert_maxHourly'),
'title' => __('Maximum email alerts to send per hour', 'wordfence'),
'subtitle' => __('0 means unlimited alerts will be sent.', 'wordfence'),
))->render();
?>
</li>
</ul>
</div>
</div>
</div>
</div> <!-- end alert options -->