Verifies a request by ensuring that it is not spammy.
Description
See also
Parameters
- $data
-
(array) (Required) Submission POST data.
- $form
-
(awsmug\Torro_Forms\DB_Objects\Forms\Form) (Required) Form object.
- $submission
-
(awsmug\Torro_Forms\DB_Objects\Submissions\Submission|null) (Optional) Submission object, or null if a new submission.
Default value: null
Return
(bool|WP_Error) True if request is not spammy, false or error object otherwise.
Source
File: src/modules/protectors/honeypot.php
public function verify_request( $data, $form, $submission = null ) { if ( ! empty( $_POST['email'] ) ) { return new WP_Error( 'honeypot_filled', __( 'You entered something into the field that is used to detect whether you are human. Please leave it blank.', 'torro-forms' ) ); } return true; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |