Skip to content

Instantly share code, notes, and snippets.

@meloniq
Created June 23, 2014 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meloniq/cfa88730d5e290951445 to your computer and use it in GitHub Desktop.
Save meloniq/cfa88730d5e290951445 to your computer and use it in GitHub Desktop.
[ClassiPress] Do not use the user data in email header when message is sent from contact form
function childtheme_ad_contact_do_not_use_user_data( $email, $post_id ) {
$email['from'] = get_option( 'admin_email' );
$email['from_name'] = wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES );
return $email;
}
add_filter( 'cp_email_user_ad_contact', 'childtheme_ad_contact_do_not_use_user_data', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment