CreaCaptcha

wpforms.php

WPForms integration.

Table of Contents

Functions

creationell_captcha_wpforms_active()  : bool
Whether the WPForms integration is active.
creationell_captcha_wpforms_inject()  : void
Auto-injects the widget directly before the WPForms submit button.
creationell_captcha_wpforms_verify()  : void
Verifies the captcha on a WPForms submission.

Functions

creationell_captcha_wpforms_active()

Whether the WPForms integration is active.

creationell_captcha_wpforms_active() : bool
Return values
bool

creationell_captcha_wpforms_inject()

Auto-injects the widget directly before the WPForms submit button.

creationell_captcha_wpforms_inject(array<string, mixed> $form_data, mixed $form) : void

Fires inside the

element, so the hidden altcha input that the widget emits is part of the WPForms submission.

Parameters
$form_data : array<string, mixed>

WPForms form configuration.

$form : mixed

WPForms form post (unused).

creationell_captcha_wpforms_verify()

Verifies the captcha on a WPForms submission.

creationell_captcha_wpforms_verify(array<int, mixed> $fields, array<string, mixed> $entry, array<string, mixed> $form_data) : void

Hooked on wpforms_process (action). On failure we set an entry in wpforms()->process->errors[ $form_id ]['header'] — WPForms then renders the message above the form and refuses to save the entry.

Parameters
$fields : array<int, mixed>

Sanitized field values (unused).

$entry : array<string, mixed>

Raw $_POST['wpforms'] (unused).

$form_data : array<string, mixed>

Form configuration.


        
On this page

Search results