Changeset 2928208
- Timestamp:
- 06/19/2023 07:17:32 PM (14 months ago)
- Location:
- akismet/trunk
- Files:
-
- 8 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
akismet/trunk/.htaccess
r2761923 r2928208 13 13 14 14 # Akismet CSS and JS 15 <FilesMatch "^(form\.js|akismet \.js|akismet-frontend\.js|akismet\.css)$">15 <FilesMatch "^(form\.js|akismet\.css)$"> 16 16 <IfModule !mod_authz_core.c> 17 17 Allow from all … … 24 24 25 25 # Akismet images 26 <FilesMatch "^ logo-(a|full)-2x\.png$">26 <FilesMatch "^$"> 27 27 <IfModule !mod_authz_core.c> 28 28 Allow from all -
akismet/trunk/_inc/akismet.css
r2592940 r2928208 111 111 } 112 112 113 .akismet-alert.akismet-critical {114 background-color: #993300;115 }116 117 .akismet-alert.akismet-active {118 background-color: #649316;119 }120 121 113 .akismet-alert p.akismet-key-status { 122 114 font-size: 24px; … … 139 131 .akismet-new-snapshot { 140 132 margin-top: 1em; 141 padding: 1em;142 133 text-align: center; 143 134 background: #fff; … … 149 140 font-size: 11px; 150 141 margin: 0; 151 padding: 3px;152 142 } 153 143 … … 159 149 .akismet-new-snapshot ul li { 160 150 color: #999; 161 float: left;162 151 font-size: 11px; 163 padding: 0 20px;164 152 text-transform: uppercase; 165 width: 33%;166 153 box-sizing: border-box; 167 154 -moz-box-sizing: border-box; … … 170 157 } 171 158 172 .akismet-new-snapshot ul li:first-child, 173 .akismet-new-snapshot ul li:nth-child(2) { 174 border-right:1px dotted #ccc; 175 } 176 177 .akismet-new-snapshot ul li span { 178 color: #52accc; 159 .akismet-new-snapshot__number { 179 160 display: block; 180 161 font-size: 32px; … … 191 172 vertical-align: middle; 192 173 padding-top: 0; 193 }194 195 .akismet-settings input[type=text] {196 width: 75%;197 174 } 198 175 … … 360 337 padding:.3125rem 0 0 361 338 } 362 .akismet-masthead__logo {363 width:10.375rem;364 height:1.8125rem;365 }366 339 .akismet-masthead__logo-link { 367 340 display:inline-block; … … 449 422 margin-bottom: 0; 450 423 position: relative; 451 margin: 0 auto 0.625rem auto;452 424 box-sizing: border-box; 453 425 background: white; 454 box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3;455 426 } 456 427 -
akismet/trunk/akismet.php
r2894240 r2928208 7 7 Plugin URI: https://akismet.com/ 8 8 Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from spam</strong>. Akismet anti spam keeps your site protected even while you sleep. To get started: activate the Akismet plugin and then go to your Akismet Settings page to set up your API key. 9 Version: 5. 110 Requires at least: 5. 011 Requires PHP: 5. 29 Version: 5. 10 Requires at least: 5. 11 Requires PHP: 5. 12 12 Author: Automattic - Anti Spam Team 13 13 Author URI: https://automattic.com/wordpress-plugins/ … … 40 40 } 41 41 42 define( 'AKISMET_VERSION', '5. 1' );43 define( 'AKISMET__MINIMUM_WP_VERSION', '5. 0' );42 define( 'AKISMET_VERSION', '5.' ); 43 define( 'AKISMET__MINIMUM_WP_VERSION', '5.' ); 44 44 define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 45 45 define( 'AKISMET_DELETE_LIMIT', 10000 ); -
akismet/trunk/class.akismet-admin.php
r2851437 r2928208 135 135 'plugins.php', 136 136 ) ) ) ) { 137 wp_register_style( 'akismet.css', plugin_dir_url( __FILE__ ) . '_inc/akismet.css', array(), AKISMET_VERSION ); 138 wp_enqueue_style( 'akismet.css'); 139 140 wp_register_script( 'akismet.js', plugin_dir_url( __FILE__ ) . '_inc/akismet.js', array('jquery'), AKISMET_VERSION ); 137 wp_register_style( 'akismet', plugin_dir_url( __FILE__ ) . '_inc/akismet.css', array(), filemtime( dirname( __FILE__ ) . '/_inc/akismet.css' ) ); 138 wp_enqueue_style( 'akismet' ); 139 140 wp_register_style( 'akismet-font-inter', plugin_dir_url( __FILE__ ) . '_inc/fonts/inter.css', array(), filemtime( dirname( __FILE__ ) . '/_inc/fonts/inter.css' ) ); 141 wp_enqueue_style( 'akismet-font-inter' ); 142 143 wp_register_style( 'akismet-admin', plugin_dir_url( __FILE__ ) . '_inc/akismet-admin.css', array(), filemtime( dirname( __FILE__ ) . '/_inc/akismet-admin.css' ) ); 144 wp_enqueue_style( 'akismet-admin' ); 145 146 wp_register_script( 'akismet.js', plugin_dir_url( __FILE__ ) . '_inc/akismet.js', array( 'jquery' ), AKISMET_VERSION ); 141 147 wp_enqueue_script( 'akismet.js' ); 148 149 150 142 151 143 152 $inline_js = array( … … 472 481 473 482 $result_counts = array( 474 'processed' => count( $moderation ),483 'processed' => , 475 484 'spam' => 0, 476 485 'ham' => 0, … … 965 974 return; 966 975 } 967 976 968 977 //the user can choose to auto connect their API key by clicking a button on the akismet done page 969 978 //if jetpack, get verified api key by using connected wpcom user id 970 979 //if no jetpack, get verified api key by using an akismet token 971 980 972 981 $akismet_user = false; 973 982 974 983 if ( isset( $_GET['token'] ) && preg_match('/^(\d+)-[0-9a-f]{20}$/', $_GET['token'] ) ) 975 984 $akismet_user = self::verify_wpcom_key( '', '', array( 'token' => $_GET['token'] ) ); 976 985 elseif ( $jetpack_user = self::get_jetpack_user() ) 977 986 $akismet_user = self::verify_wpcom_key( $jetpack_user['api_key'], $jetpack_user['user_id'] ); 978 987 979 988 if ( isset( $_GET['action'] ) ) { 980 989 if ( $_GET['action'] == 'save-key' ) { … … 1194 1203 if ( !$xml->isError() ) { 1195 1204 $responses = $xml->getResponse(); 1196 if ( count( $responses) > 1 ) {1205 if ( ) > 1 ) { 1197 1206 // Due to a quirk in how Jetpack does multi-calls, the response order 1198 1207 // can't be trusted to match the call order. It's a good thing our … … 1303 1312 1304 1313 // Tell core if we have more comments to work on still 1305 $done = count( $comments) < $number;1314 $done = ) < $number; 1306 1315 1307 1316 return array( -
akismet/trunk/class.akismet-widget.php
r2606384 r2928208 80 80 81 81 function update( $new_instance, $old_instance ) { 82 82 83 $instance['title'] = strip_tags( $new_instance['title'] ); 83 84 return $instance; -
akismet/trunk/class.akismet.php
r2876110 r2928208 469 469 470 470 // Prepared as strings since comment_id is an unsigned BIGINT, and using %d will constrain the value to the maximum signed BIGINT. 471 $format_string = implode( ", ", array_fill( 0, count( $comment_ids ), '%s' ) );471 $format_string = implode( , '%s' ) ); 472 472 473 473 $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->comments} WHERE comment_id IN ( " . $format_string . " )", $comment_ids ) ); … … 480 480 481 481 clean_comment_cache( $comment_ids ); 482 do_action( 'akismet_delete_comment_batch', count( $comment_ids ));482 do_action( 'akismet_delete_comment_batch', ); 483 483 } 484 484 … … 510 510 } 511 511 512 do_action( 'akismet_delete_commentmeta_batch', count( $comment_ids ));512 do_action( 'akismet_delete_commentmeta_batch', ); 513 513 } 514 514 … … 1152 1152 // return a comma-separated list of role names for the given user 1153 1153 public static function get_user_roles( $user_id ) { 1154 1154 1155 $roles = false; 1155 1156 … … 1160 1161 $comment_user = new WP_User( $user_id ); 1161 1162 if ( isset( $comment_user->roles ) ) 1162 $roles = join( ',', $comment_user->roles );1163 $roles = ( ',', $comment_user->roles ); 1163 1164 } 1164 1165 … … 1168 1169 } else { 1169 1170 $comment_user->roles[] = 'super_admin'; 1170 $roles = join( ',', $comment_user->roles );1171 $roles = ( ',', $comment_user->roles ); 1171 1172 } 1172 1173 } … … 1593 1594 1594 1595 public static function pre_check_pingback( $method ) { 1596 1595 1597 if ( $method !== 'pingback.ping' ) 1596 1598 return; … … 1617 1619 if ( 0 === $call_count ) { 1618 1620 // Only pass along the number of entries in the multicall the first time we see it. 1619 $multicall_count = count( $wp_xmlrpc_server->message->params );1621 $multicall_count = ; 1620 1622 } 1621 1623 -
akismet/trunk/readme.txt
r2894240 r2928208 1 1 === Akismet Anti-Spam: Spam Protection === 2 Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs, procifer, stephdau, kbrownkd, akismetantispam2 Contributors: matt, ryan, andy, mdawaffe, tellyworth, josephscott, lessbloat, eoigal, cfinke, automattic, jgs, procifer, stephdau, kbrownkd, akismetantispam 3 3 Tags: comments, spam, antispam, anti-spam, contact form, anti spam, comment moderation, comment spam, contact form spam, spam comments 4 Requires at least: 5. 04 Requires at least: 5. 5 5 Tested up to: 6.2 6 Stable tag: 5. 16 Stable tag: 5. 7 7 License: GPLv2 or later 8 8 … … 33 33 == Changelog == 34 34 35 36 37 38 39 40 41 42 43 35 44 = 5.1 = 36 45 *Release Date - 20 March 2023* … … 38 47 * Removed unnecessary limit notices from admin page. 39 48 * Improved spam detection by including post taxonomies in the comment-check call. 40 * Removed API keys from stats iframes to avoid possible inadvert ant exposure.49 * Removed API keys from stats iframes to avoid possible inadvertnt exposure. 41 50 42 51 = 5.0.2 = -
akismet/trunk/views/config.php
r2876110 r2928208 8 8 <div class="akismet-masthead"> 9 9 <div class="akismet-masthead__inside-container"> 10 <div class="akismet-masthead__logo-container"> 11 <img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" /> 12 </div> 10 <?php Akismet::view( 'logo' ); ?> 13 11 </div> 14 12 </div> … … 25 23 <div class="akismet-card"> 26 24 <div class="akismet-section-header"> 27 < divclass="akismet-section-header__label">25 < class="akismet-section-header__label"> 28 26 <span><?php esc_html_e( 'Statistics', 'akismet' ); ?></span> 29 </ div>27 </> 30 28 31 29 <?php if ( $stat_totals && isset( $stat_totals['all'] ) && (int) $stat_totals['all']->spam > 0 ) : ?> 32 30 <div class="akismet-section-header__actions"> 33 31 <a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>"> 34 <?php esc_html_e( 'Detailed Stats', 'akismet' ); ?>32 <?php esc_html_e( 'Detailed tats', 'akismet' ); ?> 35 33 </a> 36 34 </div> … … 38 36 39 37 <div class="akismet-new-snapshot"> 40 <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', urlencode( get_option( 'home' ) ), urlencode( Akismet::get_access_token() ), get_locale() ) ); ?>"></iframe> 41 <ul> 42 <li> 43 <h3><?php esc_html_e( 'Past six months' , 'akismet');?></h3> 44 <span><?php echo number_format( $stat_totals['6-months']->spam );?></span> 45 <?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?> 38 <?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 */ ?> 39 <div class="akismet-new-snapshot__chart"> 40 <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', urlencode( get_option( 'home' ) ), urlencode( Akismet::get_access_token() ), get_locale() ) ); ?>" name="<?php echo esc_attr( 'snapshot-' . filemtime( __FILE__ ) ); ?>" title="<?php echo esc_attr__( 'Akismet stats' ); ?>"></iframe> 41 </div> 42 <ul class="akismet-new-snapshot__list"> 43 <li class="akismet-new-snapshot__item"> 44 <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Past six months', 'akismet' ); ?></h3> 45 <span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['6-months']->spam ); ?></span> 46 <span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?></span> 46 47 </li> 47 <li >48 <h3 ><?php esc_html_e( 'All time' , 'akismet');?></h3>49 <span ><?php echo number_format( $stat_totals['all']->spam );?></span>50 < ?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?>48 <li> 49 <h3?></h3> 50 <span?></span> 51 <> 51 52 </li> 52 <li> 53 <h3><?php esc_html_e( 'Accuracy' , 'akismet');?></h3> 54 <span><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span> 55 <?php printf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ); ?> 56 | 57 <?php printf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ); ?> 53 <li class="akismet-new-snapshot__item"> 54 <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Accuracy', 'akismet' ); ?></h3> 55 <span class="akismet-new-snapshot__number"><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span> 56 <span class="akismet-new-snapshot__text"> 57 <?php 58 /* translators: %s: number of spam missed by Akismet */ 59 echo esc_html( sprintf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ) ) . ', '; 60 /* translators: %s: number of false positive spam flagged by Akismet */ 61 echo esc_html( sprintf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ) ); 62 ?> 63 </span> 58 64 </li> 59 65 </ul> … … 63 69 </div> <!-- close akismet-section-header --> 64 70 <div class="inside"> 65 <p ><?php esc_html_e( 'Akismet is active and ready to stop spam. Your site’s spam statistics will be displayed here.', 'akismet' ); ?></p>71 <p><?php esc_html_e( 'Akismet is active and ready to stop spam. Your site’s spam statistics will be displayed here.', 'akismet' ); ?></p> 66 72 </div> 67 73 <?php endif; ?> … … 72 78 <div class="akismet-card"> 73 79 <div class="akismet-section-header"> 74 < divclass="akismet-section-header__label">80 < class="akismet-section-header__label"> 75 81 <span><?php esc_html_e( 'Settings' , 'akismet'); ?></span> 76 </ div>82 </> 77 83 </div> 78 84 79 85 <div class="inside"> 80 <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST"> 81 <table cellspacing="0" class="akismet-settings"> 82 <tbody> 83 <?php if ( ! Akismet::predefined_api_key() ) { ?> 84 <tr> 85 <th class="akismet-api-key" width="10%" align="left" scope="row"> 86 <label for="key"><?php esc_html_e( 'API Key', 'akismet' ); ?></label> 87 </th> 88 <td width="5%"/> 89 <td align="left"> 86 <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" autocomplete="off" method="POST" id="akismet-settings-form"> 87 88 <div class="akismet-settings"> 89 <?php if ( ! Akismet::predefined_api_key() ) : ?> 90 <div class="akismet-settings__row"> 91 <h3 class="akismet-settings__row-title"> 92 <label class="akismet-settings__row-label" for="key"><?php esc_html_e( 'API key', 'akismet' ); ?></label> 93 </h3> 94 <div class="akismet-settings__row-input"> 90 95 <span class="api-key"><input id="key" name="key" type="text" size="15" value="<?php echo esc_attr( get_option('wordpress_api_key') ); ?>" class="<?php echo esc_attr( 'regular-text code ' . $akismet_user->status ); ?>"></span> 91 </td> 92 </tr> 93 <?php } ?> 94 <?php if ( isset( $_GET['ssl_status'] ) ) { ?> 95 <tr> 96 <th align="left" scope="row"><?php esc_html_e( 'SSL Status', 'akismet' ); ?></th> 97 <td></td> 98 <td align="left"> 99 <p> 100 <?php 101 102 if ( ! wp_http_supports( array( 'ssl' ) ) ) { 103 ?><b><?php esc_html_e( 'Disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests.', 'akismet' ); ?><?php 104 } 105 else { 106 $ssl_disabled = get_option( 'akismet_ssl_disabled' ); 107 108 if ( $ssl_disabled ) { 109 ?><b><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></b> <?php esc_html_e( 'Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly.', 'akismet' ); ?><?php 110 } 111 else { 112 ?><b><?php esc_html_e( 'Enabled.', 'akismet' ); ?></b> <?php esc_html_e( 'All systems functional.', 'akismet' ); ?><?php 113 } 114 } 115 116 ?> 117 </p> 118 </td> 119 </tr> 120 <?php } ?> 121 <tr> 122 <th align="left" scope="row"><?php esc_html_e('Comments', 'akismet');?></th> 123 <td></td> 124 <td align="left"> 125 <p> 126 <label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' , 'akismet'); ?>"> 127 <input 128 name="akismet_show_user_comments_approved" 129 id="akismet_show_user_comments_approved" 130 value="1" 131 type="checkbox" 132 <?php 133 134 // If the option isn't set, or if it's enabled ('1'), or if it was enabled a long time ago ('true'), check the checkbox. 135 checked( true, ( in_array( get_option( 'akismet_show_user_comments_approved' ), array( false, '1', 'true' ), true ) ) ); 136 137 ?> 138 /> 139 <?php esc_html_e( 'Show the number of approved comments beside each comment author', 'akismet' ); ?> 96 </div> 97 </div> 98 <?php endif; ?> 99 100 <?php if ( isset( $_GET['ssl_status'] ) ) : ?> 101 <div class="akismet-settings__row"> 102 <div class="akismet-settings__row-text"> 103 <h3 class="akismet-settings__row-title"><?php esc_html_e( 'SSL status', 'akismet' ); ?></h3> 104 <div class="akismet-settings__row-description"> 105 <?php if ( ! wp_http_supports( array( 'ssl' ) ) ) : ?> 106 <strong><?php esc_html_e( 'Disabled.', 'akismet' ); ?></strong> 107 <?php esc_html_e( 'Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests.', 'akismet' ); ?> 108 <?php else : ?> 109 <?php $ssl_disabled = get_option( 'akismet_ssl_disabled' ); ?> 110 111 <?php if ( $ssl_disabled ) : ?> 112 <strong><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></strong> 113 <?php esc_html_e( 'Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly.', 'akismet' ); ?> 114 <?php else : ?> 115 <strong><?php esc_html_e( 'Enabled.', 'akismet' ); ?></strong> 116 <?php esc_html_e( 'All systems functional.', 'akismet' ); ?> 117 <?php endif; ?> 118 <?php endif; ?> 119 </div> 120 </div> 121 </div> 122 <?php endif; ?> 123 124 <div class="akismet-settings__row"> 125 <div class="akismet-settings__row-text"> 126 <h3 class="akismet-settings__row-title"><?php esc_html_e( 'Comments', 'akismet' ); ?></h3> 127 </div> 128 <div class="akismet-settings__row-input"> 129 <label class="akismet-settings__row-input-label" for="akismet_show_user_comments_approved"> 130 <input 131 name="akismet_show_user_comments_approved" 132 id="akismet_show_user_comments_approved" 133 value="1" 134 type="checkbox" 135 <?php 136 // If the option isn't set, or if it's enabled ('1'), or if it was enabled a long time ago ('true'), check the checkbox. 137 checked( true, ( in_array( get_option( 'akismet_show_user_comments_approved' ), array( false, '1', 'true' ), true ) ) ); 138 ?> 139 /> 140 <span class="akismet-settings__row-label-text"> 141 <?php esc_html_e( 'Show the number of approved comments beside each comment author.', 'akismet' ); ?> 142 </span> 143 </label> 144 </div> 145 </div> 146 147 <div class="akismet-settings__row is-radio"> 148 <div class="akismet-settings__row-text"> 149 <h3 class="akismet-settings__row-title"><?php esc_html_e( 'Spam filtering', 'akismet' ); ?></h3> 150 </div> 151 <div class="akismet-settings__row-input"> 152 <fieldset> 153 <legend class="screen-reader-text"> 154 <span><?php esc_html_e( 'Akismet anti-spam strictness', 'akismet' ); ?></span> 155 </legend> 156 <div> 157 <label class="akismet-settings__row-input-label" for="akismet_strictness_1"> 158 <input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked( '1', get_option( 'akismet_strictness' ) ); ?> /> 159 <span class="akismet-settings__row-label-text"> 160 <?php esc_html_e( 'Silently discard the worst and most pervasive spam so I never see it.', 'akismet' ); ?> 161 </span> 140 162 </label> 141 </p> 142 </td> 143 </tr> 144 <tr> 145 <th class="strictness" align="left" scope="row"><?php esc_html_e('Strictness', 'akismet'); ?></th> 146 <td></td> 147 <td align="left"> 148 <fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness', 'akismet'); ?></span></legend> 149 <p><label for="akismet_strictness_1"><input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked('1', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Silently discard the worst and most pervasive spam so I never see it.', 'akismet'); ?></label></p> 150 <p><label for="akismet_strictness_0"><input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked('0', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Always put spam in the Spam folder for review.', 'akismet'); ?></label></p> 151 </fieldset> 152 <span class="akismet-note"><strong><?php esc_html_e('Note:', 'akismet');?></strong> 163 </div> 164 <div> 165 <label class="akismet-settings__row-input-label" for="akismet_strictness_0"> 166 <input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked( '0', get_option( 'akismet_strictness' ) ); ?> /> 167 <span class="akismet-settings__row-label-text"> 168 <?php esc_html_e( 'Always put spam in the Spam folder for review.', 'akismet' ); ?> 169 </span> 170 </label> 171 </div> 172 </fieldset> 173 174 <div class="akismet-settings__row-note"> 175 <strong><?php esc_html_e( 'Note:', 'akismet' ); ?></strong> 153 176 <?php 154 155 177 $delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) ); 156 178 157 179 printf( 158 180 _n( … … 165 187 $delete_interval 166 188 ); 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 167 220 168 ?> 169 </td> 170 </tr> 171 <tr> 172 <th class="comment-form-privacy-notice" align="left" scope="row"><?php esc_html_e('Privacy', 'akismet'); ?></th> 173 <td></td> 174 <td align="left"> 175 <fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet privacy notice', 'akismet'); ?></span></legend> 176 <p><label for="akismet_comment_form_privacy_notice_display"><input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_display" value="display" <?php checked('display', get_option('akismet_comment_form_privacy_notice')); ?> /> <?php esc_html_e('Display a privacy notice under your comment forms.', 'akismet'); ?></label></p> 177 <p><label for="akismet_comment_form_privacy_notice_hide"><input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_hide" value="hide" <?php echo in_array( get_option('akismet_comment_form_privacy_notice'), array('display', 'hide') ) ? checked('hide', get_option('akismet_comment_form_privacy_notice'), false) : 'checked="checked"'; ?> /> <?php esc_html_e('Do not display privacy notice.', 'akismet'); ?></label></p> 178 </fieldset> 179 <span class="akismet-note"><?php esc_html_e( 'To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms. This feature is disabled by default, however, you can turn it on above.', 'akismet' );?></span> 180 </td> 181 </tr> 182 </tbody> 183 </table> 221 <div class="akismet-settings__row-note"> 222 <?php esc_html_e( 'To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms.', 'akismet' ); ?> 223 </div> 224 </div> 225 </div> 226 </div> 227 184 228 <div class="akismet-card-actions"> 185 <?php if ( ! Akismet::predefined_api_key() ) { ?> 186 <div id="delete-action"> 187 <a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e('Disconnect this account', 'akismet'); ?></a> 188 </div> 189 <?php } ?> 190 <?php wp_nonce_field(Akismet_Admin::NONCE) ?> 229 <?php if ( ! Akismet::predefined_api_key() ) : ?> 230 <div id="delete-action"> 231 <a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e( 'Disconnect this account', 'akismet' ); ?></a> 232 </div> 233 <?php endif; ?> 234 235 <?php wp_nonce_field( Akismet_Admin::NONCE ); ?> 236 191 237 <div id="publishing-action"> 192 238 <input type="hidden" name="action" value="enter-key"> 193 <input type="submit" name="submit" id="submit" class="akismet-button akismet-could-be-primary" value="<?php esc_attr_e( 'Save Changes', 'akismet');?>">239 <input type="submit" name="submit" id="submit" class="akismet-button akismet-could-be-primary" value="<?php esc_attr_e(?>"> 194 240 </div> 195 241 <div class="clear"></div> … … 198 244 </div> 199 245 </div> 200 201 <?php if ( ! Akismet::predefined_api_key() ) {?>246 247 <?php if ( ! Akismet::predefined_api_key() ) ?> 202 248 <div class="akismet-card"> 203 249 <div class="akismet-section-header"> 204 < divclass="akismet-section-header__label">250 < class="akismet-section-header__label"> 205 251 <span><?php esc_html_e( 'Account' , 'akismet'); ?></span> 206 </ div>252 </> 207 253 </div> 208 254 209 255 <div class="inside"> 210 <table c ellspacing="0" border="0" class="akismet-settings">256 <table c"> 211 257 <tbody> 212 258 <tr> 213 <th scope="row" align="left"><?php esc_html_e( 'Subscription Type' , 'akismet');?></th> 214 <td width="5%"/> 215 <td align="left"> 216 <p><?php echo esc_html( $akismet_user->account_name ); ?></p> 259 <th scope="row"><?php esc_html_e( 'Subscription type', 'akismet' ); ?></th> 260 <td> 261 <?php echo esc_html( $akismet_user->account_name ); ?> 217 262 </td> 218 263 </tr> 219 264 <tr> 220 <th scope="row" align="left"><?php esc_html_e( 'Status' , 'akismet');?></th>221 <td width="5%"/>222 <td align="left">223 <p><?php224 if ( 'cancelled' == $akismet_user->status ) :225 esc_html_e( 'Cancelled', 'akismet' );226 e lseif ( 'suspended' == $akismet_user->status ) :227 esc_html_e( 'Suspended', 'akismet' );228 e lseif ( 'missing' == $akismet_user->status ) :229 esc_html_e( 'Missing', 'akismet' );230 e lseif ( 'no-sub' == $akismet_user->status ) :231 esc_html_e( 'No Subscription Found', 'akismet' );232 e lse :233 esc_html_e( 'Active', 'akismet' );234 endif; ?></p>265 <th scope="row"?></th> 266 <td> 267 268 269 270 271 e 272 273 e 274 275 e 276 277 e 278 279 > 235 280 </td> 236 281 </tr> 237 282 <?php if ( $akismet_user->next_billing_date ) : ?> 238 283 <tr> 239 <th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' , 'akismet');?></th> 240 <td width="5%"/> 241 <td align="left"> 242 <p><?php echo date( 'F j, Y', $akismet_user->next_billing_date ); ?></p> 284 <th scope="row"><?php esc_html_e( 'Next billing date', 'akismet' ); ?></th> 285 <td> 286 <?php echo esc_html( gmdate( 'F j, Y', $akismet_user->next_billing_date ) ); ?> 243 287 </td> 244 288 </tr> … … 254 298 </div> 255 299 </div> 256 <?php }?>300 <?php ?> 257 301 <?php endif;?> 258 302 </div> -
akismet/trunk/views/get.php
r2709917 r2928208 3 3 //phpcs:disable VariableAnalysis 4 4 // There are "undefined" variables here because they're defined in the code that includes this file as a template. 5 6 7 8 9 10 5 11 ?> 6 12 … … 9 15 <input type="hidden" name="blog" value="<?php echo esc_url( get_option( 'home' ) ); ?>"/> 10 16 <input type="hidden" name="redirect" value="<?php echo isset( $redirect ) ? $redirect : 'plugin-signup'; ?>"/> 11 <button type="submit" class="<?php echo isset( $classes ) && count( $classes ) > 0 ? esc_attr( implode( ' ', $classes ) ) : 'akismet-button'; ?>" value="<?php echo esc_attr( $text ); ?>"><?php echo esc_attr( $text ) . '<span class="screen-reader-text">' . esc_html__( '(opens in a new tab)', 'akismet' ) . '</span>'; ?></button>17 <button type="submit" class="<?php echo ; ?>" value="<?php echo esc_attr( $text ); ?>"><?php echo esc_attr( $text ) . '<span class="screen-reader-text">' . esc_html__( '(opens in a new tab)', 'akismet' ) . '</span>'; ?></button> 12 18 </form> -
akismet/trunk/views/notice.php
r2851437 r2928208 3 3 //phpcs:disable VariableAnalysis 4 4 // There are "undefined" variables here because they're defined in the code that includes this file as a template. 5 6 5 ?> 7 6 <?php if ( $type == 'plugin' ) : ?> … … 34 33 <?php elseif ( $type == 'alert' ) : ?> 35 34 <div class='error'> 36 <p><strong><?php printf( esc_html__( 'Akismet Error Code: %s', 'akismet' ), $code ); ?></strong></p> 35 <?php /* translators: The placeholder is an error code returned by Akismet. */ ?> 36 <p><strong><?php printf( esc_html__( 'Akismet error code: %s', 'akismet' ), esc_html( $code ) ); ?></strong></p> 37 37 <p><?php echo esc_html( $msg ); ?></p> 38 38 <p><?php … … 105 105 $check_pending_link = 'edit-comments.php?akismet_recheck=' . wp_create_nonce( 'akismet_recheck' ); 106 106 } 107 108 107 ?> 109 108 <div class="akismet-alert akismet-active"> … … 166 165 <div class="error akismet-usage-limit-alert"> 167 166 <div class="akismet-usage-limit-logo"> 168 <img src="<?php echo esc_url( plugins_url( '../_inc/img/logo-a-2x.png', __FILE__ ) ); ?>" alt="Akismet " />167 <img src="<?php echo esc_url( plugins_url( '../_inc/img/logo-a-2x.png', __FILE__ ) ); ?>" alt="Akismet" /> 169 168 </div> 170 169 <div class="akismet-usage-limit-text"> … … 200 199 ) 201 200 ); 202 201 echo ' '; 203 202 echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">'; 204 203 echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) ); … … 208 207 case 'SECOND_MONTH_OVER_LIMIT': 209 208 echo esc_html( __( 'Your Akismet usage has been over your plan’s limit for two consecutive months. Next month, we will restrict your account after you reach the limit. Please consider upgrading your plan.', 'akismet' ) ); 210 209 echo ' '; 211 210 echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">'; 212 211 echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) ); … … 216 215 case 'THIRD_MONTH_APPROACHING_LIMIT': 217 216 echo esc_html( __( 'Your Akismet usage is nearing your plan’s limit for the third consecutive month. We will restrict your account after you reach the limit. Upgrade your plan so Akismet can continue blocking spam.', 'akismet' ) ); 218 217 echo ' '; 219 218 echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">'; 220 219 echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) ); … … 225 224 case 'FOUR_PLUS_MONTHS_OVER_LIMIT': 226 225 echo esc_html( __( 'Your Akismet usage has been over your plan’s limit for three consecutive months. We have restricted your account for the rest of the month. Upgrade your plan so Akismet can continue blocking spam.', 'akismet' ) ); 227 228 echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">'; 229 echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) ); 230 echo '</a>'; 231 232 break; 226 echo ' '; 227 echo '<a href="https://docs.akismet.com/akismet-api-usage-limits/" target="_blank">'; 228 echo esc_html( __( 'Learn more about usage limits.', 'akismet' ) ); 229 echo '</a>'; 230 231 break; 232 233 233 default: 234 234 } … … 241 241 // If only a qty upgrade is required, show a more generic message. 242 242 if ( ! empty( $upgrade_type ) && 'qty' === $upgrade_type ) { 243 esc_html_e( 'Upgrade your Subscription Level', 'akismet' );243 esc_html_e( 'Upgrade your evel', 'akismet' ); 244 244 } else { 245 245 echo esc_html( -
akismet/trunk/views/start.php
r2183961 r2928208 8 8 <div class="akismet-masthead"> 9 9 <div class="akismet-masthead__inside-container"> 10 <div class="akismet-masthead__logo-container"> 11 <img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" /> 12 </div> 10 <?php Akismet::view( 'logo' ); ?> 13 11 </div> 14 12 </div> -
akismet/trunk/views/stats.php
r2876110 r2928208 2 2 <div class="akismet-masthead"> 3 3 <div class="akismet-masthead__inside-container"> 4 < a href="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" class="akismet-right"><?php esc_html_e( 'Anti-Spam Settings', 'akismet' ); ?></a>5 <div class="akismet-masthead__ logo-container">6 < img class="akismet-masthead__logo" src="<?php echo esc_url( plugins_url( '../_inc/img/logo-full-2x.png', __FILE__ ) ); ?>" alt="Akismet" />4 <> 5 <div class="akismet-masthead__-container"> 6 <> 7 7 </div> 8 8 </div> 9 9 </div> 10 <iframe src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/user-stats.php?blog=%s&token=%s&locale=%s', urlencode( get_option( 'home' ) ), urlencode( Akismet::get_access_token() ), esc_attr( get_locale() ) ) ); ?>" width="100%" height="2500px" frameborder="0"></iframe> 10 <?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 */ ?> 11 <iframe id="stats-iframe" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/user-stats.php?blog=%s&token=%s&locale=%s&is_redecorated=1', urlencode( get_option( 'home' ) ), urlencode( Akismet::get_access_token() ), esc_attr( get_locale() ) ) ); ?>" name="<?php echo esc_attr( 'user-stats- ' . filemtime( __FILE__ ) ); ?>" width="100%" height="2500px" frameborder="0" title="<?php echo esc_attr__( 'Akismet detailed stats' ); ?>"></iframe> 11 12 </div>
Note: See TracChangeset
for help on using the changeset viewer.