$current_widget_id
$current_widget_id : string
Sets up various actions, filters, post types, post statuses, shortcodes.
insert_feedback_filter(array $data, array $postarr) : array
Ensure the post author is always zero for contact-form feedbacks Attached to `wp_insert_post_data`
array | $data | the data to insert |
array | $postarr | the data sent to wp_insert_post() |
The filtered $data to insert
widget_atts(string $text) : string
Adds a "widget" attribute to every contact-form embedded in a text widget.
Used to tell the difference between post-embedded contact-forms and widget-embedded contact-forms
Attached to widget_text
string | $text | The widget text |
The filtered widget text
prepare_for_akismet(array $form) : array
Populate an array with all values necessary to submit a NEW contact-form feedback to Akismet.
Note that this includes the current user_ip etc, so this should only be called when accepting a new item via $_POST
array | $form | Contact form feedback array |
feedback array with additional data ready for submission to Akismet
is_spam_akismet(array $form) : bool|\WP_Error
Submit contact-form data to Akismet to check for spam.
If you're accepting a new item via $_POST, run it Grunion_Contact_Form_Plugin::prepare_for_akismet() first
Attached to contact_form_is_spam
array | $form |
TRUE => spam, FALSE => not spam, WP_Error => stop processing entirely