WordPress.org

Plugin Directory

Changeset 535207


Ignore:
Timestamp:
04/23/12 20:28:44 (2 years ago)
Author:
josephscott
Message:

If there are no alert codes when re-checking comments then make sure the
previous one gets cleared.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/akismet.php

    r535154 r535207  
    490490    // this should probably live in a function by itself 
    491491    $status = akismet_check_key_status( akismet_get_key() ); 
    492     if ( isset($status[0]['x-akismet-alert-code']) ) { // or whatever header/s we decide on 
     492    if ( isset($status[0]['x-akismet-alert-code']) ) { 
    493493        update_option( 'akismet_alert_code', $status[0]['x-akismet-alert-code'] ); 
    494494        update_option( 'akismet_alert_msg', $status[0]['x-akismet-alert-msg'] ); 
     
    497497        wp_schedule_single_event( time() + 21600, 'akismet_schedule_cron_recheck' ); 
    498498        return false; 
     499    } else { 
     500        update_option( 'akismet_alert_code', '' ); 
     501        update_option( 'akismet_alert_code', '' ); 
    499502    } 
    500503     
Note: See TracChangeset for help on using the changeset viewer.