akismet_verify_key

Definition:
function akismet_verify_key( $key, $ip = null ) {}

Parameters

  • $key
  • $ip

Source code

function akismet_verify_key( $key, $ip = null ) {

	global $akismet_api_host, $akismet_api_port, $wpcom_api_key;

	$blog = urlencode( get_option('home') );

	if ( $wpcom_api_key )

		$key = $wpcom_api_key;

	$response = akismet_http_post("key=$key&blog=$blog", 'rest.akismet.com', '/1.1/verify-key', $akismet_api_port, $ip);

	if ( !is_array($response) || !isset($response[1]) || $response[1] != 'valid' && $response[1] != 'invalid' )

		return 'failed';

	return $response[1];

}

523

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: