Guest User

Untitled

a guest
Apr 7th, 2018
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. <?php
  2. add_filter( 'gravityview/field/notes/email_content', 'gv_modify_notes_email_content', 10, 4 );
  3.  
  4. /**
  5. * Modify the values passed when sending a note email
  6. * @see GVCommon::send_email
  7. * @since 1.17
  8. * @param array $email_settings Values being passed to the GVCommon::send_email() method: 'from', 'to', 'bcc', 'reply_to', 'subject', 'message', 'from_name', 'message_format', 'entry', 'email_footer'
  9. *
  10. * @return array $email_settings
  11. */
  12. function gv_modify_notes_email_content( $email_settings ) {
  13. extract( $email_settings );
  14.  
  15. $email_settings['from'] = $from; //example@gmail.com
  16. $email_settings['to'] = $to; //example@gmail.com
  17. $email_settings['bcc'] $bcc; //example@gmail.com
  18. $email_settings['reply_to'] = $reply_to; //example@gmail.com
  19. $email_settings['subject'] = $subject; //subject of the email
  20. $email_settings['message'] = $message; //body of the email (already in HTML format)
  21. $email_settings['from_name'] = $from_name; //Example: GravityView Website
  22. $email_settings['message_format'] = $message_format; //html
  23. $email_settings['email_footer'] = $email_footer; //The text: This note was sent from {url}
  24. $email_settings['entry'] = $entry; // The entry array that the note is being added to
  25.  
  26. return $email_settings;
  27. }
Add Comment
Please, Sign In to add comment