cf7.php
Contact Form 7 integration.
Table of Contents
Functions
- creationell_captcha_cf7_active() : bool
- Whether the Contact Form 7 integration is active.
- creationell_captcha_cf7_register_tag() : void
- Registers the [creationell_captcha] Contact Form 7 form-tag.
- creationell_captcha_cf7_tag_handler() : string
- Renders the widget for the [creationell_captcha] form-tag.
- creationell_captcha_cf7_auto_inject() : string
- Auto-injects the widget into CF7 forms without a [creationell_captcha] tag.
- creationell_captcha_cf7_verify() : bool
- Verifies the captcha on a Contact Form 7 submission.
Functions
creationell_captcha_cf7_active()
Whether the Contact Form 7 integration is active.
creationell_captcha_cf7_active() : bool
Return values
boolcreationell_captcha_cf7_register_tag()
Registers the [creationell_captcha] Contact Form 7 form-tag.
creationell_captcha_cf7_register_tag() : void
Registered unconditionally (no creationell_captcha_cf7_active() guard) so CF7 always recognises the tag and never prints it as raw text; the tag handler returns an empty string when the integration is inactive.
creationell_captcha_cf7_tag_handler()
Renders the widget for the [creationell_captcha] form-tag.
creationell_captcha_cf7_tag_handler() : string
Return values
stringcreationell_captcha_cf7_auto_inject()
Auto-injects the widget into CF7 forms without a [creationell_captcha] tag.
creationell_captcha_cf7_auto_inject(string $elements) : string
Parameters
- $elements : string
-
The form's inner HTML.
Return values
stringcreationell_captcha_cf7_verify()
Verifies the captcha on a Contact Form 7 submission.
creationell_captcha_cf7_verify(mixed $spam, mixed $submission) : bool
Hooked on wpcf7_spam: returning true marks the submission as spam, which
CF7 then rejects through its standard flow.
Parameters
- $spam : mixed
-
Whether CF7 already classified the submission as spam.
- $submission : mixed
-
The WPCF7_Submission object.