Akismet::is_spam( array $submission )

Summary

No summary available.

Parameters

$submission

(array) (Required)


Return

(boolean)


Source

File: src/BigCommerce/Compatibility/Akismet/Akismet.php

	public function is_spam( array $submission ) {
        if ( ! function_exists( 'akismet_init' ) ) {
            return false;
        }
        
        $wpcom_api_key = get_option( 'wordpress_api_key' );

        if ( empty( $wpcom_api_key ) ) {
            return false;
        }

        global $akismet_api_host, $akismet_api_port;

        $response = akismet_http_post( $this->get_query_string( $submission ), $akismet_api_host, '/1.1/comment-check', $akismet_api_port );
        
        if ( $response[1] == 'true' ) {
            update_option( 'akismet_spam_count', get_option( 'akismet_spam_count' ) + 1 );
            return true;
        }
            
        return false;
    }

User Contributed Notes

You must log in before being able to contribute a note or feedback.