Changeset 2586158
- Timestamp:
- 08/20/2021 07:37:01 PM (5 years ago)
- Location:
- akismet/trunk
- Files:
-
- 4 edited
-
akismet.php (modified) (2 diffs)
-
class.akismet-admin.php (modified) (2 diffs)
-
class.akismet.php (modified) (1 diff)
-
views/notice.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
akismet/trunk/akismet.php
r2585639 r2586158 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>. It 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: 4.1.11a 49 Version: 4.1.11a5 10 10 Author: Automattic 11 11 Author URI: https://automattic.com/wordpress-plugins/ … … 38 38 } 39 39 40 define( 'AKISMET_VERSION', '4.1.11a 4' );40 define( 'AKISMET_VERSION', '4.1.11a5' ); 41 41 define( 'AKISMET__MINIMUM_WP_VERSION', '4.0' ); 42 42 define( 'AKISMET__PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); -
akismet/trunk/class.akismet-admin.php
r2580537 r2586158 1039 1039 1040 1040 $alert_code = get_option( 'akismet_alert_code' ); 1041 if ( preg_match( '/^105\d\d$/', $alert_code) ) {1041 if ( isset( Akismet::$LIMIT_NOTICES[ $alert_code ] ) ) { 1042 1042 $notices[] = self::get_usage_limit_alert_data(); 1043 1043 } … … 1081 1081 1082 1082 $alert_code = get_option( 'akismet_alert_code' ); 1083 if ( preg_match( '/^105\d\d$/', $alert_code) ) {1083 if ( isset( Akismet::$LIMIT_NOTICES[ $alert_code ] ) ) { 1084 1084 self::display_usage_limit_alert(); 1085 1085 } -
akismet/trunk/class.akismet.php
r2585043 r2586158 6 6 const MAX_DELAY_BEFORE_MODERATION_EMAIL = 86400; // One day in seconds 7 7 8 const LIMIT_NOTICE_FIRST_MONTH_OVER_LIMIT = 10501; 9 const LIMIT_NOTICE_SECOND_MONTH_OVER_LIMIT = 10502; 10 const LIMIT_NOTICE_THIRD_MONTH_APPROACHING_LIMIT = 10504; 11 const LIMIT_NOTICE_THIRD_MONTH_OVER_LIMIT = 10508; 12 const LIMIT_NOTICE_FOUR_PLUS_MONTHS_OVER_LIMIT = 10516; 8 public static $LIMIT_NOTICES = array( 9 10501 => 'FIRST_MONTH_OVER_LIMIT', 10 10502 => 'SECOND_MONTH_OVER_LIMIT', 11 10504 => 'THIRD_MONTH_APPROACHING_LIMIT', 12 10508 => 'THIRD_MONTH_OVER_LIMIT', 13 10516 => 'FOUR_PLUS_MONTHS_OVER_LIMIT', 14 ); 13 15 14 16 private static $last_comment = ''; -
akismet/trunk/views/notice.php
r2585639 r2586158 140 140 <?php endif; ?> 141 141 </div> 142 <?php elseif ( $type == 'usage-limit' ) :?>142 <?php elseif ( $type == 'usage-limit' && isset( Akismet::$LIMIT_NOTICES[ $code ] ) ) :?> 143 143 <div class="error akismet-usage-limit-alert"> 144 144 <div class="akismet-usage-limit-logo"> … … 148 148 <h3> 149 149 <?php 150 switch ( $code) {151 case Akismet::LIMIT_NOTICE_FIRST_MONTH_OVER_LIMIT:152 case Akismet::LIMIT_NOTICE_SECOND_MONTH_OVER_LIMIT:150 switch ( Akismet::$LIMIT_NOTICES[ $code ] ) { 151 case 'FIRST_MONTH_OVER_LIMIT': 152 case 'SECOND_MONTH_OVER_LIMIT': 153 153 esc_html_e( 'Your Akismet account usage is over your plan\'s limit', 'akismet' ); 154 154 break; 155 case Akismet::LIMIT_NOTICE_THIRD_MONTH_APPROACHING_LIMIT:155 case 'THIRD_MONTH_APPROACHING_LIMIT': 156 156 esc_html_e( 'Your Akismet account usage is approaching your plan\'s limit', 'akismet' ); 157 157 break; 158 case Akismet::LIMIT_NOTICE_THIRD_MONTH_OVER_LIMIT:159 case Akismet::LIMIT_NOTICE_FOUR_PLUS_MONTHS_OVER_LIMIT:158 case 'THIRD_MONTH_OVER_LIMIT': 159 case 'FOUR_PLUS_MONTHS_OVER_LIMIT': 160 160 esc_html_e( 'Your account has been restricted', 'akismet' ); 161 161 break; … … 166 166 <p> 167 167 <?php 168 switch ( $code) {169 case Akismet::LIMIT_NOTICE_FIRST_MONTH_OVER_LIMIT:168 switch ( Akismet::$LIMIT_NOTICES[ $code ] ) { 169 case 'FIRST_MONTH_OVER_LIMIT': 170 170 printf( 171 171 __( 'Since %s, your account made %s API calls, compared to your plan\'s limit of %s. <a href="%s" target="_blank">Learn more</a> about usage limits.', 'akismet' ), … … 176 176 ); 177 177 break; 178 case Akismet::LIMIT_NOTICE_SECOND_MONTH_OVER_LIMIT:178 case 'SECOND_MONTH_OVER_LIMIT': 179 179 esc_html_e( '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' ); 180 180 break; 181 case Akismet::LIMIT_NOTICE_THIRD_MONTH_APPROACHING_LIMIT:181 case 'THIRD_MONTH_APPROACHING_LIMIT': 182 182 esc_html_e( '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' ); 183 183 break; 184 case Akismet::LIMIT_NOTICE_THIRD_MONTH_OVER_LIMIT:185 case Akismet::LIMIT_NOTICE_FOUR_PLUS_MONTHS_OVER_LIMIT:184 case 'THIRD_MONTH_OVER_LIMIT': 185 case 'FOUR_PLUS_MONTHS_OVER_LIMIT': 186 186 esc_html_e( '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' ); 187 187 break;
Note: See TracChangeset
for help on using the changeset viewer.