contact_form_subject

Filters the subject of the email sent after a contact form submission.

Description

apply_filters( 'contact_form_subject', (unknown) $contact_form_subject, (unknown) $all_values ); 

Parameters (2)

0. $contact_form_subject (unknown)
The contact form subject.
1. $all_values (unknown)
The all values.

Usage

To run the hook, copy the example below.
  1. $contact_form_subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values ); 
  2.  
  3. if ( !empty( $contact_form_subject ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the contact_form_subject callback 
  2. function filter_contact_form_subject( $contact_form_subject, $all_values ) { 
  3. // make filter magic happen here... 
  4. return $contact_form_subject
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'contact_form_subject', 'filter_contact_form_subject', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'contact_form_subject', 'filter_contact_form_subject', 10, 2 ); 

Defined (2)

The filter is defined in the following location(s).

/modules/contact-form/grunion-contact-form.php  
  1. $subject = apply_filters( 'contact_form_subject', $contact_form_subject, $all_values ); 
/modules/contact-form/admin.php  
  1. $subject = apply_filters( 'contact_form_subject', $content_fields['_feedback_subject'], $content_fields['_feedback_all_fields'] );