PluginProbe
Security Ninja – WordPress Security & Firewall / 5.303
Security Ninja – WordPress Security & Firewall v5.303
5.303 5.302 5.301 5.300 5.299 5.296 5.289 5.286 5.283 5.281 trunk 5.277 5.279
security-ninja / includes / sidebar.php

sidebar.php in Security Ninja – WordPress Security & Firewall 5.303, at includes/sidebar.php

311 lines 11.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPSecurityNinja\Plugin;
4
5 // this is an include only WP file
6 if ( !defined( 'ABSPATH' ) ) {
7 die;
8 }
9 global $secnin_fs;
10 ?>
11 <div class="secnin_content_cell" id="sidebar-container">
12
13 <?php
14 // Firewall quick numbers - simple, informative and fast.
15 if ( !class_exists( __NAMESPACE__ . '\\Wf_sn_cf' ) ) {
16 require_once WF_SN_PLUGIN_DIR . 'modules/cloud-firewall/cloud-firewall.php';
17 }
18 $firewall_is_active = 0;
19 $blocked_today = 0;
20 if ( class_exists( __NAMESPACE__ . '\\Wf_sn_cf' ) ) {
21 $firewall_is_active = (int) \WPSecurityNinja\Plugin\Wf_sn_cf::is_active();
22 if ( method_exists( __NAMESPACE__ . '\\Wf_sn_cf', 'get_blocked_today_count' ) ) {
23 $blocked_today = (int) \WPSecurityNinja\Plugin\Wf_sn_cf::get_blocked_today_count();
24 }
25 }
26 $total_blocked = (int) get_option( 'wf_sn_cf_blocked_count', 0 );
27 ?>
28
29 <div class="sidebarsection feature">
30 <h3><span class="dashicons dashicons-shield-alt"></span> <?php
31 esc_html_e( 'Firewall activity', 'security-ninja' );
32 ?></h3>
33 <ul class="linklist">
34 <li><strong><?php
35 esc_html_e( 'Status', 'security-ninja' );
36 ?>:</strong> <?php
37 echo ( $firewall_is_active ? esc_html__( 'Enabled', 'security-ninja' ) : esc_html__( 'Disabled', 'security-ninja' ) );
38 ?></li>
39 <li><strong><?php
40 esc_html_e( 'Blocked today', 'security-ninja' );
41 ?>:</strong> <?php
42 echo esc_html( number_format_i18n( $blocked_today ) );
43 ?></li>
44 <li><strong><?php
45 esc_html_e( 'Total blocked', 'security-ninja' );
46 ?>:</strong> <?php
47 echo esc_html( number_format_i18n( $total_blocked ) );
48 ?></li>
49 </ul>
50 </div><!-- .sidebarsection -->
51
52 <div class="sidebarsection feature">
53 <h3><span class="dashicons dashicons-info-outline"></span> <?php
54 esc_html_e( 'Learn more', 'security-ninja' );
55 ?></h3>
56 <ul class="linklist">
57 <li><a href="<?php
58 echo esc_url( Utils::generate_sn_web_link( 'sidebar_article', '/security-tests/' ) );
59 ?>" target="_blank" rel="noopener"><?php
60 esc_html_e( 'About the tests', 'security-ninja' );
61 ?></a></li>
62 <li><a href="<?php
63 echo esc_url( Utils::generate_sn_web_link( 'sidebar_article', '/why-is-insignificant-small-site-attacked-by-hackers/' ) );
64 ?>" target="_blank" rel="noopener"><?php
65 esc_html_e( 'Even small sites are attacked by hackers', 'security-ninja' );
66 ?></a></li>
67 <li><a href="<?php
68 echo esc_url( Utils::generate_sn_web_link( 'sidebar_article', '/wordpress-beginner-mistakes/' ) );
69 ?>" target="_blank" rel="noopener"><?php
70 esc_html_e( 'New to WordPress? avoid these beginner mistakes', 'security-ninja' );
71 ?></a></li>
72 <li><a href="<?php
73 echo esc_url( Utils::generate_sn_web_link( 'sidebar_article', '/signs-wordpress-site-is-hacked/' ) );
74 ?>" target="_blank" rel="noopener"><?php
75 esc_html_e( 'Signs that your site has been hacked', 'security-ninja' );
76 ?></a></li>
77
78 </ul>
79 </div><!-- .sidebarsection -->
80
81
82 <?php
83 if ( function_exists( 'secnin_fs' ) ) {
84 $display_promotion = true;
85 if ( $display_promotion ) {
86 ?>
87 <div class="snupgradebox sidebarsection feature">
88 <h3><span class="dashicons dashicons-star-filled"></span> Security Ninja Pro <span class="dashicons dashicons-star-filled"></span></h3>
89 <p><strong><?php
90 esc_html_e( 'Included free', 'security-ninja' );
91 ?>:</strong> <?php
92 esc_html_e( 'Core Scanner, Security Tests, Vulnerability Scanner', 'security-ninja' );
93 ?></p>
94 <ul class="checkmarks">
95 <li><strong><?php
96 esc_html_e( 'Install Wizard', 'security-ninja' );
97 ?></strong> - <?php
98 esc_html_e( 'get protected in minutes.', 'security-ninja' );
99 ?></li>
100 <li><strong><?php
101 esc_html_e( 'Firewall Protection', 'security-ninja' );
102 ?></strong> - <?php
103 esc_html_e( 'Protect your website from suspicious visitors.', 'security-ninja' );
104 ?></li>
105 <li><strong><?php
106 esc_html_e( 'Spam Protection', 'security-ninja' );
107 ?></strong> - <?php
108 esc_html_e( 'The firewall blocks known spammers.', 'security-ninja' );
109 ?></li>
110 <li><strong><?php
111 esc_html_e( 'Login Protection', 'security-ninja' );
112 ?></strong> - <?php
113 esc_html_e( 'Stop repeated failed logins.', 'security-ninja' );
114 ?></li>
115 <li><strong><?php
116 esc_html_e( 'Rename Login', 'security-ninja' );
117 ?></strong> - <?php
118 esc_html_e( 'Change the default WordPress login URL.', 'security-ninja' );
119 ?></li>
120 <li><strong><?php
121 esc_html_e( '2FA', 'security-ninja' );
122 ?></strong> - <?php
123 esc_html_e( 'Add two factor authentication to your WordPress login.', 'security-ninja' );
124 ?></li>
125 <li><strong><?php
126 esc_html_e( 'Country Blocking', 'security-ninja' );
127 ?></strong> - <?php
128 esc_html_e( 'Block entire countries.', 'security-ninja' );
129 ?></li>
130 <li><strong><?php
131 esc_html_e( 'Plugin Validation', 'security-ninja' );
132 ?></strong> - <?php
133 esc_html_e( 'Check plugins have not been modified with malware.', 'security-ninja' );
134 ?></li>
135 <li><strong><?php
136 esc_html_e( 'Malware Scanner', 'security-ninja' );
137 ?></strong> - <?php
138 esc_html_e( 'Find and remove suspicious files.', 'security-ninja' );
139 ?></li>
140 <li><strong><?php
141 esc_html_e( 'Auto Fixer', 'security-ninja' );
142 ?></strong> - <?php
143 esc_html_e( 'Fix many security issues with a few clicks.', 'security-ninja' );
144 ?></li>
145 <li><strong><?php
146 esc_html_e( 'Events Logger', 'security-ninja' );
147 ?></strong> - <?php
148 esc_html_e( 'Audit log - Know who did what on your website', 'security-ninja' );
149 ?></li>
150 <li><strong><?php
151 esc_html_e( 'Scheduled Scanner', 'security-ninja' );
152 ?></strong> - <?php
153 esc_html_e( 'Scan your website for security issues at a specific time.', 'security-ninja' );
154 ?></li>
155 </ul>
156 <p><strong><?php
157 echo esc_html( 'Try the Pro version free for 14 days!' );
158 ?></strong></p>
159 <a href="<?php
160 echo esc_url( Utils::generate_sn_web_link( 'sidebar_trial', '/upgrade/', array(
161 'trial' => 'free',
162 ) ) );
163 ?>" class="button button-primary trial-button" target="_blank" rel="noopener"><?php
164 esc_html_e( 'Get started', 'security-ninja' );
165 ?></a>
166 <div class="wrap-collabsible">
167 <input id="collapsible-payment-details" class="toggle" type="checkbox">
168 <label for="collapsible-payment-details" class="lbl-toggle">Click to see details</label>
169 <div class="collapsible-content">
170 <div class="content-inner">
171
172 <ul class="salenotices">
173 <li><?php
174 esc_html_e( 'We ask for your payment information to reduce fraud and provide a seamless subscription experience.', 'security-ninja' );
175 ?></li>
176 <li><?php
177 esc_html_e( 'CANCEL ANYTIME before the trial ends to avoid being charged.', 'security-ninja' );
178 ?></li>
179 <li><?php
180 esc_html_e( 'We will send you an email reminder BEFORE your trial ends.', 'security-ninja' );
181 ?></li>
182 <li><?php
183 esc_html_e( 'We accept Visa, Mastercard, American Express and PayPal.', 'security-ninja' );
184 ?></li>
185 <li><?php
186 echo esc_html( 'Upgrade, downgrade or cancel any time.' );
187 ?></li>
188 <li><?php
189 esc_html_e( 'Bulk discounts for more websites.', 'security-ninja' );
190 ?></li>
191 </ul>
192 <p><a href="<?php
193 echo esc_url( Utils::generate_sn_web_link( 'sidebar_upgrade', '/upgrade/' ) );
194 ?>" target="_blank" class="button button-primary" rel="noopener"><?php
195 echo esc_html( 'Read more about the Pro version' );
196 ?></a></p>
197
198 </div>
199 </div>
200 </div>
201 </div><!-- .snupgradebox -->
202 <?php
203 }
204 }
205 ?>
206 <div class="sidebarsection feature">
207 <h3><span class="dashicons dashicons-info-outline"></span> <?php
208 esc_html_e( 'Plugin help', 'security-ninja' );
209 ?></h3>
210 <ul class="linklist">
211 <?php
212 global $secnin_fs;
213 ?>
214 <li><a href="<?php
215 echo esc_url( 'https://wordpress.org/support/plugin/security-ninja/' );
216 ?>" target="_blank" rel="noopener"><?php
217 esc_html_e( 'Support Forum', 'security-ninja' );
218 ?></a></li>
219 <li><a href="<?php
220 echo esc_url( Utils::generate_sn_web_link( 'sidebar_docs', '/docs/' ) );
221 ?>" target="_blank" rel="noopener"><?php
222 esc_html_e( 'Knowledge Base', 'security-ninja' );
223 ?></a></li>
224
225
226 <?php
227 if ( secnin_fs()->is_not_paying() ) {
228 $connect_url = secnin_fs()->connect_again();
229 if ( !empty( $connect_url ) ) {
230 ?>
231 <li><a href="<?php
232 echo esc_url( $connect_url );
233 ?>"><?php
234 esc_html_e( 'Activate License', 'security-ninja' );
235 ?></a></li>
236 <?php
237 }
238 }
239 ?>
240 <li><a href="<?php
241 echo esc_url( admin_url( 'admin.php?page=security-ninja-wizard' ) );
242 ?>" rel="noopener"><?php
243 esc_html_e( 'Restart the setup wizard', 'security-ninja' );
244 ?></a></li>
245 <?php
246 ?>
247 </ul>
248 </div><!-- .sidebarsection -->
249 <?php
250 $show_pro_ad = true;
251 if ( $show_pro_ad ) {
252 // Use is_plugin_page() to detect if we're on the main plugin overview page (if available)
253 ?>
254 <div class="sidebarsection feature upgradepro">
255 <h3><?php
256 esc_html_e( 'Get even more with WP Security Ninja Pro', 'security-ninja' );
257 ?></h3>
258 <ul>
259 <li><strong><?php
260 esc_html_e( 'Get premium protection in minutes', 'security-ninja' );
261 ?></strong>: <?php
262 esc_html_e( 'Guided wizard, no technical skills needed.', 'security-ninja' );
263 ?></li>
264 <li><strong><?php
265 esc_html_e( 'Stay protected 24/7', 'security-ninja' );
266 ?></strong>: <?php
267 esc_html_e( 'Real-time firewall and automatic scans.', 'security-ninja' );
268 ?></li>
269 <li><strong><?php
270 esc_html_e( 'Keep spam and bots out', 'security-ninja' );
271 ?></strong>: <?php
272 esc_html_e( 'Cleaner site, safer visitors.', 'security-ninja' );
273 ?></li>
274 <li><strong><?php
275 esc_html_e( 'Lock down logins', 'security-ninja' );
276 ?></strong>: <?php
277 esc_html_e( 'Block brute force; add 2FA and hidden login URL.', 'security-ninja' );
278 ?></li>
279 <li><strong><?php
280 esc_html_e( 'Find and fix issues fast', 'security-ninja' );
281 ?></strong>: <?php
282 esc_html_e( 'Malware &amp; core scans, one-click fixes.', 'security-ninja' );
283 ?></li>
284 <li><strong><?php
285 esc_html_e( 'See who did what', 'security-ninja' );
286 ?></strong>: <?php
287 esc_html_e( 'Simple audit log of changes.', 'security-ninja' );
288 ?></li>
289 <li><strong><?php
290 esc_html_e( 'Run scans on your schedule', 'security-ninja' );
291 ?></strong>: <?php
292 esc_html_e( 'Set it and forget it.', 'security-ninja' );
293 ?></li>
294 <li><strong><?php
295 esc_html_e( 'Try risk-free', 'security-ninja' );
296 ?></strong>: <?php
297 esc_html_e( '30-day money-back guarantee.', 'security-ninja' );
298 ?></li>
299 </ul>
300 <p style="margin-top: 10px;text-align: center;">
301 <a href="<?php
302 echo esc_url( Utils::generate_sn_web_link( 'sidebar_upgrade', '/upgrade/' ) );
303 ?>" class="button button-primary button-small" target="_blank" rel="noopener"><?php
304 esc_html_e( 'Read more', 'security-ninja' );
305 ?></a>
306 </p>
307 </div>
308 <?php
309 }
310 ?>
311 </div><!-- #sidebar-container --><?php