This filter specifies which anti-spam form fields wpDiscuz should include in inline feedback submissions and preserve when the main comment or reply form is cleared after a successful submission.
Parameters
$fieldPrefixes (type: array) – A list of case-sensitive prefixes used to identify field names. The default prefixes are ak_, akismet_comment_nonce, and la_sentinelle_
Usage
add_filter("wpdiscuz_antispam_field_prefixes", "my_antispam_field_prefixes");
function my_antispam_field_prefixes($fieldPrefixes) {
$fieldPrefixes[] = "my_antispam_";
return $fieldPrefixes;
}
Note
This filter does not create or print fields. The fields must already be present in the wpDiscuz comment form.
For inline feedback, wpDiscuz takes matching fields and their current values from the hidden reply-form template on the page and adds them to the feedback request. It does not add a
copy when the feedback form already has a field with the same name.
After a successful main or reply comment, wpDiscuz preserves matching fields’ current values through the form reset. A rejected comment does not reset the form.
Only inputs and textareas are eligible. Checkboxes, radio buttons, file inputs, submit buttons, other buttons, and select fields are excluded. Use a narrow, unique prefix: a broad
prefix could unintentionally send unrelated form values with inline feedback or keep them after a successful post.
Changelog
Since 7.6.71 version.
