summaryrefslogtreecommitdiffstats
path: root/wp-content/plugins/akismet/views
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:57:26 +0000
commit30883c26bdceb9eaf32c8d4a1b0c1bce223b5226 (patch)
tree39a02e2aeb21ab5b7923c6f5757d66d55b708912 /wp-content/plugins/akismet/views
parentAdding upstream version 6.4.3+dfsg1. (diff)
downloadwordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.tar.xz
wordpress-30883c26bdceb9eaf32c8d4a1b0c1bce223b5226.zip
Adding upstream version 6.5+dfsg1.upstream/6.5+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-content/plugins/akismet/views')
-rw-r--r--wp-content/plugins/akismet/views/config.php68
-rw-r--r--wp-content/plugins/akismet/views/notice.php10
2 files changed, 33 insertions, 45 deletions
diff --git a/wp-content/plugins/akismet/views/config.php b/wp-content/plugins/akismet/views/config.php
index 77e5914..b9e4457 100644
--- a/wp-content/plugins/akismet/views/config.php
+++ b/wp-content/plugins/akismet/views/config.php
@@ -30,7 +30,6 @@ $kses_allow_link_href = array(
<span><?php esc_html_e( 'Statistics', 'akismet' ); ?></span>
</h2>
- <?php if ( $stat_totals && isset( $stat_totals['all'] ) && (int) $stat_totals['all']->spam > 0 ) : ?>
<div class="akismet-section-header__actions">
<a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>">
<?php esc_html_e( 'Detailed stats', 'akismet' ); ?>
@@ -38,43 +37,36 @@ $kses_allow_link_href = array(
</div>
</div> <!-- close akismet-section-header -->
- <div class="akismet-new-snapshot">
- <?php /* name attribute on iframe is used as a cache-buster here to force Firefox to load the new style charts: https://bugzilla.mozilla.org/show_bug.cgi?id=356558 */ ?>
- <div class="akismet-new-snapshot__chart">
- <iframe id="stats-iframe" allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/snapshot.php?blog=%s&token=%s&height=200&locale=%s&is_redecorated=1', rawurlencode( get_option( 'home' ) ), rawurlencode( Akismet::get_access_token() ), get_locale() ) ); ?>" name="<?php echo esc_attr( 'snapshot-' . filemtime( __FILE__ ) ); ?>" title="<?php echo esc_attr__( 'Akismet stats' ); ?>"></iframe>
- </div>
- <ul class="akismet-new-snapshot__list">
- <li class="akismet-new-snapshot__item">
- <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Past six months', 'akismet' ); ?></h3>
- <span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['6-months']->spam ); ?></span>
- <span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?></span>
- </li>
- <li class="akismet-new-snapshot__item">
- <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'All time', 'akismet' ); ?></h3>
- <span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['all']->spam ); ?></span>
- <span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?></span>
- </li>
- <li class="akismet-new-snapshot__item">
- <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Accuracy', 'akismet' ); ?></h3>
- <span class="akismet-new-snapshot__number"><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span>
- <span class="akismet-new-snapshot__text">
- <?php
- /* translators: %s: number of spam missed by Akismet */
- echo esc_html( sprintf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ) ) . ', ';
- /* translators: %s: number of false positive spam flagged by Akismet */
- echo esc_html( sprintf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ) );
- ?>
- </span>
- </li>
- </ul>
- </div> <!-- close akismet-new-snapshot -->
-
- <?php else : ?>
- </div> <!-- close akismet-section-header -->
- <div class="inside">
- <p class="akismet-awaiting-stats"><?php esc_html_e( 'Akismet is active and ready to stop spam. Your site&#8217;s spam statistics will be displayed here.', 'akismet' ); ?></p>
- </div>
- <?php endif; ?>
+ <div class="akismet-new-snapshot">
+ <?php /* name attribute on iframe is used as a cache-buster here to force Firefox to load the new style charts: https://bugzilla.mozilla.org/show_bug.cgi?id=356558 */ ?>
+ <div class="akismet-new-snapshot__chart">
+ <iframe id="stats-iframe" allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/snapshot.php?blog=%s&token=%s&height=200&locale=%s&is_redecorated=1', rawurlencode( get_option( 'home' ) ), rawurlencode( Akismet::get_access_token() ), get_locale() ) ); ?>" name="<?php echo esc_attr( 'snapshot-' . filemtime( __FILE__ ) ); ?>" title="<?php echo esc_attr__( 'Akismet stats' ); ?>"></iframe>
+ </div>
+ <ul class="akismet-new-snapshot__list">
+ <li class="akismet-new-snapshot__item">
+ <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Past six months', 'akismet' ); ?></h3>
+ <span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['6-months']->spam ); ?></span>
+ <span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?></span>
+ </li>
+ <li class="akismet-new-snapshot__item">
+ <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'All time', 'akismet' ); ?></h3>
+ <span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['all']->spam ); ?></span>
+ <span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?></span>
+ </li>
+ <li class="akismet-new-snapshot__item">
+ <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Accuracy', 'akismet' ); ?></h3>
+ <span class="akismet-new-snapshot__number"><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span>
+ <span class="akismet-new-snapshot__text">
+ <?php
+ /* translators: %s: number of spam missed by Akismet */
+ echo esc_html( sprintf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ) ) . ', ';
+ /* translators: %s: number of false positive spam flagged by Akismet */
+ echo esc_html( sprintf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ) );
+ ?>
+ </span>
+ </li>
+ </ul>
+ </div> <!-- close akismet-new-snapshot -->
</div> <!-- close akismet-card -->
diff --git a/wp-content/plugins/akismet/views/notice.php b/wp-content/plugins/akismet/views/notice.php
index 8bacc54..466a322 100644
--- a/wp-content/plugins/akismet/views/notice.php
+++ b/wp-content/plugins/akismet/views/notice.php
@@ -152,15 +152,11 @@ $kses_allow_strong = array( 'strong' => true );
<?php elseif ( $type === 'no-sub' ) : ?>
<div class="akismet-alert is-bad">
<h3 class="akismet-alert__heading"><?php esc_html_e( 'You don&#8217;t have an Akismet plan.', 'akismet' ); ?></h3>
+ <p><?php echo esc_html__( 'Your API key must have an Akismet plan before it can protect your site from spam.', 'akismet' ); ?></p>
<p>
<?php
- /* translators: the placeholder is a clickable URL to the Akismet account upgrade page. */
- echo wp_kses( sprintf( __( 'In 2012, Akismet began using subscription plans for all accounts (even free ones). A plan has not been assigned to your account, and we&#8217;d appreciate it if you&#8217;d <a href="%s" target="_blank">sign into your account</a> and choose one.', 'akismet' ), esc_url( 'https://akismet.com/pricing' ) ), $kses_allow_link );
- ?>
- <br /><br />
- <?php
- /* translators: The placeholder is a URL to the Akismet contact form. */
- echo wp_kses( sprintf( __( 'Please <a href="%s" target="_blank">contact our support team</a> with any questions.', 'akismet' ), esc_url( 'https://akismet.com/contact/' ) ), $kses_allow_link );
+ /* translators: the placeholder is the URL to the Akismet pricing page. */
+ echo wp_kses( sprintf( __( 'Please <a href="%s" target="_blank">choose a plan</a> to get started with Akismet.', 'akismet' ), esc_url( 'https://akismet.com/pricing' ) ), $kses_allow_link );
?>
</p>
</div>