Docs

EVF_Form_Task::get_akismet_validate( array $entry, string $form_id = '' ): bool

Check if a form entry should be validated by Akismet for potential spam.

Description

This function checks whether the Akismet plugin is installed and configured, and if the Akismet validation option is enabled for a specific form. If validation is enabled, it prepares the necessary data for the validation request and sends it to Akismet’s ‘comment-check’ endpoint.

Parameters

$entryarrayrequired
The form entry data to validate.
$form_idstringoptional
(Optional) The identifier of the form.

Default:''

Return

bool
  • true if the form entry is potentially spam according to Akismet.
  • false if Akismet validation is not enabled, the plugin is not properly configured, or the entry is not considered spam.