public static function check_key_status( $key,
$ip = null
) { return self::
http_post( Akismet::
build_query( array
( 'key' =>
$key, 'blog' =>
get_option( 'home'
) ) ), 'verify-key',
$ip );
} public static function verify_key( $key,
$ip = null
) { // Shortcut for obviously invalid keys.
if ( strlen( $key ) != 12
) { return 'invalid';
} $response = self::
check_key_status( $key,
$ip );
if ( $response[1
] != 'valid' &&
$response[1
] != 'invalid'
) return 'failed';
return $response[1
];
} public static function deactivate_key( $key ) { $response = self::
http_post( Akismet::
build_query( array
( 'key' =>
$key, 'blog' =>
get_option( 'home'
) ) ), 'deactivate'
);
if ( $response[1
] != 'deactivated'
)