Plugin Directory

Changeset 1033930

Timestamp:
11/27/2014 02:32:13 PM (10 years ago)
Author:
eoigal
Message:

Fix bug: no way to reset key alert codes without deleting the key and resaving it. Now when an alert is found, we reverify that the key is still in alert state before we show the alert in config page. If key is fine, we automatically clear the alert code in the plugin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/class.akismet-admin.php

    r1020343 r1033930  
    814814
    815815        if ( in_array( $hook_suffix, array( 'jetpack_page_akismet-key-config', 'settings_page_akismet-key-config', 'edit-comments.php' ) ) && (int) get_option( 'akismet_alert_code' ) > 0 ) {
    816             self::display_alert();
     816            Akismet::verify_key( Akismet::get_api_key() ); //verify that the key is still in alert state
     817           
     818            if ( get_option( 'akismet_alert_code' ) > 0 )
     819                self::display_alert();
    817820        }
    818821        elseif ( $hook_suffix == 'plugins.php' && !Akismet::get_api_key() ) {
Note: See TracChangeset for help on using the changeset viewer.