Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify distinction between Dashboard widgets #14574

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions _inc/client/dashboard-widget/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@
}

h3 {
font-size: 1em;
font-weight: normal;
margin: 0 0 0.25em 0;
padding: 0;
}

p.blocked-count {
font-size: 1.5em;
font-weight: normal;
margin: 0;
Expand Down
20 changes: 13 additions & 7 deletions class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -6775,8 +6775,11 @@ public static function dashboard_widget_footer() {
<footer>

<div class="protect">
<h3><?php esc_html_e( 'Brute force attack protection', 'jetpack' ); ?></h3>
<?php if ( self::is_module_active( 'protect' ) ) : ?>
<h3><?php echo number_format_i18n( get_site_option( 'jetpack_protect_blocked_attempts', 0 ) ); ?></h3>
<p class="blocked-count">
<?php echo number_format_i18n( get_site_option( 'jetpack_protect_blocked_attempts', 0 ) ); ?>
</p>
<p><?php echo esc_html_x( 'Blocked malicious login attempts', '{#} Blocked malicious login attempts -- number is on a prior line, text is a caption.', 'jetpack' ); ?></p>
<?php elseif ( current_user_can( 'jetpack_activate_modules' ) && ! ( new Status() )->is_development_mode() ) : ?>
<a href="
Expand All @@ -6794,17 +6797,20 @@ public static function dashboard_widget_footer() {
);
?>
" class="button button-jetpack" title="<?php esc_attr_e( 'Protect helps to keep you secure from brute-force login attacks.', 'jetpack' ); ?>">
<?php esc_html_e( 'Activate Protect', 'jetpack' ); ?>
<?php esc_html_e( 'Activate brute force attack protection', 'jetpack' ); ?>
</a>
<?php else : ?>
<?php esc_html_e( 'Protect is inactive.', 'jetpack' ); ?>
<?php esc_html_e( 'Brute force attack protection is inactive.', 'jetpack' ); ?>
<?php endif; ?>
</div>

<div class="akismet">
<h3><?php esc_html_e( 'Anti-spam', 'jetpack' ); ?></h3>
<?php if ( is_plugin_active( 'akismet/akismet.php' ) ) : ?>
<h3><?php echo number_format_i18n( get_option( 'akismet_spam_count', 0 ) ); ?></h3>
<p><?php echo esc_html_x( 'Spam comments blocked by Akismet.', '{#} Spam comments blocked by Akismet -- number is on a prior line, text is a caption.', 'jetpack' ); ?></p>
<p class="blocked-count">
<?php echo number_format_i18n( get_option( 'akismet_spam_count', 0 ) ); ?>
</p>
<p><?php echo esc_html_x( 'Blocked spam comments.', '{#} Spam comments blocked by Akismet -- number is on a prior line, text is a caption.', 'jetpack' ); ?></p>
<?php elseif ( current_user_can( 'activate_plugins' ) && ! is_wp_error( validate_plugin( 'akismet/akismet.php' ) ) ) : ?>
<a href="
<?php
Expand All @@ -6822,10 +6828,10 @@ public static function dashboard_widget_footer() {
);
?>
" class="button button-jetpack">
<?php esc_html_e( 'Activate Akismet', 'jetpack' ); ?>
<?php esc_html_e( 'Activate Anti-spam', 'jetpack' ); ?>
</a>
<?php else : ?>
<p><a href="<?php echo esc_url( 'https://akismet.com/?utm_source=jetpack&utm_medium=link&utm_campaign=Jetpack%20Dashboard%20Widget%20Footer%20Link' ); ?>"><?php esc_html_e( 'Akismet can help to keep your blog safe from spam!', 'jetpack' ); ?></a></p>
<p><a href="<?php echo esc_url( 'https://akismet.com/?utm_source=jetpack&utm_medium=link&utm_campaign=Jetpack%20Dashboard%20Widget%20Footer%20Link' ); ?>"><?php esc_html_e( 'Anti-spam can help to keep your blog safe from spam!', 'jetpack' ); ?></a></p>
<?php endif; ?>
</div>

Expand Down