PluginProbe ʕ •ᴥ•ʔ
SiteGuard WP Plugin / 1.8.7
SiteGuard WP Plugin v1.8.7
1.8.7 1.8.6 1.8.6-beta1 1.8.6-beta2 1.8.4 1.8.5 1.8.3 1.8.2 1.8.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.2.2 1.2.3 1.4.3 1.5.0 1.5.1 1.5.2 1.6.0 1.6.1 1.7.0 1.7.1 1.7.10 1.7.11 1.7.12 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 1.7.7 1.7.8 1.7.9 1.8.0 1.8.0-beta1 1.8.0-beta2 1.8.0-beta3 1.8.0-beta4
siteguard / admin / siteguard-menu-dashboard.php
siteguard / admin Last commit date
siteguard-login-history-table.php 1 month ago siteguard-menu-admin-filter.php 4 weeks ago siteguard-menu-author-query.php 2 weeks ago siteguard-menu-captcha.php 4 weeks ago siteguard-menu-dashboard.php 4 weeks ago siteguard-menu-fail-once.php 4 weeks ago siteguard-menu-init.php 1 month ago siteguard-menu-login-alert.php 4 weeks ago siteguard-menu-login-history.php 4 weeks ago siteguard-menu-login-lock.php 4 weeks ago siteguard-menu-protect-xmlrpc.php 4 weeks ago siteguard-menu-rename-login.php 2 weeks ago siteguard-menu-same-error.php 4 weeks ago siteguard-menu-updates-notify.php 4 weeks ago siteguard-menu-waf-tuning-support.php 4 weeks ago siteguard-waf-exclude-rule-table.php 1 month ago
siteguard-menu-dashboard.php
118 lines
1 <?php
2
3 class SiteGuard_Menu_Dashboard extends SiteGuard_Base {
4 function __construct() {
5 $this->render_page();
6 }
7 private function render_status_icon( $enabled, $img_path ) {
8 $filename = $enabled ? 'enabled.svg' : 'disabled.svg';
9 $alt_text = $enabled ? __( 'Enabled', 'siteguard' ) : __( 'Disabled', 'siteguard' );
10 printf(
11 '<img class="siteguard-status-icon" src="%1$s" width="24" height="24" alt="%2$s">',
12 esc_url( $img_path . $filename ),
13 esc_attr( $alt_text )
14 );
15 }
16 function render_page() {
17 global $siteguard_config, $siteguard_login_history;
18 $img_path = SITEGUARD_URL_PATH . 'images/';
19 $admin_filter_enable = $siteguard_config->get( 'admin_filter_enable' );
20 $renamelogin_enable = $siteguard_config->get( 'renamelogin_enable' );
21 $captcha_enable = $siteguard_config->get( 'captcha_enable' );
22 $same_error_enable = $siteguard_config->get( 'same_login_error' );
23 $loginlock_enable = $siteguard_config->get( 'loginlock_enable' );
24 $loginalert_enable = $siteguard_config->get( 'loginalert_enable' );
25 $fail_once_enable = $siteguard_config->get( 'loginlock_fail_once' );
26 $disable_xmlrpc_enable = $siteguard_config->get( 'disable_xmlrpc_enable' );
27 $disable_pingback_enable = $siteguard_config->get( 'disable_pingback_enable' );
28 $block_author_query_enable = $siteguard_config->get( 'block_author_query_enable' );
29 $updates_notify_enable = $siteguard_config->get( 'updates_notify_enable' );
30 $waf_exclude_rule_enable = $siteguard_config->get( 'waf_exclude_rule_enable' );
31 echo '<div class="wrap">';
32 echo '<img src="' . $img_path . 'sg_wp_plugin_logo_40.png" alt="SiteGuard Logo" />';
33 echo '<h2>' . esc_html__( 'Dashboard', 'siteguard' ) . "</h2>\n";
34 $siteguard_page_link = '<a href="' . esc_url( __( 'https://www.jp-secure.com/siteguard_wp_plugin_en/', 'siteguard' ) ) . '" target="_blank">' . esc_html__( 'SiteGuard WP Plugin page', 'siteguard' ) . '</a>';
35 echo '<div class="siteguard-description">'
36 . sprintf(
37 /* translators: %1$s: Link to the SiteGuard WP Plugin page. */
38 esc_html__( 'Documentation, FAQs, and more information about SiteGuard WP Plugin are available on the %1$s.', 'siteguard' ),
39 $siteguard_page_link
40 )
41 . '</div>';
42 echo '<h3>' . esc_html__( 'Settings Status', 'siteguard' ) . "</h3>\n";
43 $error = siteguard_check_multisite();
44 if ( is_wp_error( $error ) ) {
45 echo '<p class="description">';
46 echo esc_html( $error->get_error_message() );
47 echo '</p>';
48 }
49 ?>
50 <table class="siteguard-form-table">
51 <tr>
52 <th scope="row">
53 <?php $this->render_status_icon( '1' == $admin_filter_enable, $img_path ); ?>
54 <a href="?page=siteguard_admin_filter"><?php esc_html_e( 'Admin Page IP Filter', 'siteguard' ); ?></a></th>
55 <td><?php esc_html_e( 'Restricts wp-admin access to IP addresses that have successfully logged in.', 'siteguard' ); ?></td>
56 </tr><tr>
57 <th scope="row">
58 <?php $this->render_status_icon( '1' == $renamelogin_enable, $img_path ); ?>
59 <a href="?page=siteguard_rename_login"><?php esc_html_e( 'Rename Login', 'siteguard' ); ?></a></th>
60 <td><?php esc_html_e( 'Changes the URL of the login page.', 'siteguard' ); ?></td>
61 </tr><tr>
62 <th scope="row">
63 <?php $this->render_status_icon( '1' == $captcha_enable, $img_path ); ?>
64 <a href="?page=siteguard_captcha"><?php esc_html_e( 'CAPTCHA', 'siteguard' ); ?></a></th>
65 <td><?php esc_html_e( 'Adds CAPTCHA to login, comment, password reset, and user registration forms.', 'siteguard' ); ?></td>
66 </tr><tr>
67 <th scope="row">
68 <?php $this->render_status_icon( '1' == $same_error_enable, $img_path ); ?>
69 <a href="?page=siteguard_same_error"><?php esc_html_e( 'Same Login Error Message', 'siteguard' ); ?></a></th>
70 <td><?php esc_html_e( 'Displays a generic message instead of detailed login error messages.', 'siteguard' ); ?></td>
71 </tr><tr>
72 <th scope="row">
73 <?php $this->render_status_icon( '1' == $loginlock_enable, $img_path ); ?>
74 <a href="?page=siteguard_login_lock"><?php esc_html_e( 'Login Lock', 'siteguard' ); ?></a></th>
75 <td><?php esc_html_e( 'Temporarily locks out IP addresses after repeated failed login attempts.', 'siteguard' ); ?></td>
76 </tr><tr>
77 <th scope="row">
78 <?php $this->render_status_icon( '1' == $loginalert_enable, $img_path ); ?>
79 <a href="?page=siteguard_login_alert"><?php esc_html_e( 'Login Alert', 'siteguard' ); ?></a></th>
80 <td><?php esc_html_e( 'Sends an email notification when a user logs in.', 'siteguard' ); ?></td>
81 </tr><tr>
82 <th scope="row">
83 <?php $this->render_status_icon( '1' == $fail_once_enable, $img_path ); ?>
84 <a href="?page=siteguard_fail_once"><?php esc_html_e( 'Fail Once', 'siteguard' ); ?></a></th>
85 <td><?php esc_html_e( 'Requires the first login attempt to fail, even when the credentials are correct.', 'siteguard' ); ?></td>
86 </tr><tr>
87 <th scope="row">
88 <?php $this->render_status_icon( '1' == $disable_pingback_enable || '1' == $disable_xmlrpc_enable, $img_path ); ?>
89 <a href="?page=siteguard_protect_xmlrpc"><?php esc_html_e( 'Protect XML-RPC', 'siteguard' ); ?></a></th>
90 <td><?php esc_html_e( 'Prevents abuse of XML-RPC and pingbacks.', 'siteguard' ); ?></td>
91 </tr><tr>
92 <th scope="row">
93 <?php $this->render_status_icon( '1' == $block_author_query_enable, $img_path ); ?>
94 <a href="?page=siteguard_author_query"><?php esc_html_e( 'Block Author Query', 'siteguard' ); ?></a></th>
95 <td><?php esc_html_e( 'Blocks author queries that may expose usernames.', 'siteguard' ); ?></td>
96 </tr><tr>
97 <th scope="row">
98 <?php $this->render_status_icon( '1' == $updates_notify_enable, $img_path ); ?>
99 <a href="?page=siteguard_updates_notify"><?php esc_html_e( 'Update Notifications', 'siteguard' ); ?></a></th>
100 <td><?php esc_html_e( 'Sends administrators an email when WordPress core, plugins, or themes need updates.', 'siteguard' ); ?></td>
101 </tr><tr>
102 <th scope="row">
103 <?php $this->render_status_icon( '1' == $waf_exclude_rule_enable, $img_path ); ?>
104 <a href="?page=siteguard_waf_tuning_support"><?php esc_html_e( 'WAF Tuning Support', 'siteguard' ); ?></a></th>
105 <td><?php esc_html_e( 'Creates WAF exclusion rules for SiteGuard Server Edition.', 'siteguard' ); ?></td>
106 </tr><tr>
107 <th scope="row">
108 <span class="siteguard-status-icon-spacer" aria-hidden="true"></span>
109 <a href="?page=siteguard_login_history"><?php echo esc_html__( 'Login History', 'siteguard' ); ?></a>
110 <td><?php esc_html_e( 'Displays login history.', 'siteguard' ); ?></td>
111 </tr>
112 </table>
113 <hr />
114 </div>
115 <?php
116 }
117 }
118