update_alert example


function akismet_init() {
    _deprecated_function( __FUNCTION__, '3.0' );
}
function akismet_get_key() {
    return Akismet::get_api_key();
}
function akismet_check_key_status( $key$ip = null ) {
    return Akismet::check_key_status( $key$ip );
}
function akismet_update_alert( $response ) {
    return Akismet::update_alert( $response );
}
function akismet_verify_key( $key$ip = null ) {
    return Akismet::verify_key( $key$ip );
}
function akismet_get_user_roles( $user_id ) {
    return Akismet::get_user_roles( $user_id );
}
function akismet_result_spam( $approved ) {
    return Akismet::comment_is_spam( $approved );
}
function akismet_result_hold( $approved ) {
    


        if ( $ssl_failed ) {
            // The request failed when using SSL but succeeded without it. Disable SSL for future requests.             update_option( 'akismet_ssl_disabled', time() );
            
            do_action( 'akismet_https_disabled' );
        }
        
        $simplified_response = array( $response['headers']$response['body'] );
        
        self::update_alert( $simplified_response );

        return $simplified_response;
    }

    // given a response from an API call like check_key_status(), update the alert code options if an alert is present.     public static function update_alert( $response ) {
        $alert_option_prefix = 'akismet_alert_';
        $alert_header_prefix = 'x-akismet-alert-';
        $alert_header_names  = array(
            'code',
            'msg',
            
Home | Imprint | This part of the site doesn't use cookies.