Forked from rafaehlers/gv_modify_notes_email_content.php
Last active
March 29, 2018 19:43
-
-
Save zackkatz/de7e54f0869741f98c9c50848f4de087 to your computer and use it in GitHub Desktop.
Modify an entry note email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'gravityview/field/notes/email_content', 'gv_modify_notes_email_content', 10, 4 ); | |
/** | |
* Modify the values passed when sending a note email | |
* @see GVCommon::send_email | |
* @since 1.17 | |
* @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' | |
* | |
* @return array $email_settings | |
*/ | |
function gv_modify_notes_email_content( $email_settings ) { | |
extract( $email_settings ); | |
$email_settings['from'] = $from; //example@gmail.com | |
$email_settings['to'] = $to; //example@gmail.com | |
$email_settings['bcc'] $bcc; //example@gmail.com | |
$email_settings['reply_to'] = $reply_to; //example@gmail.com | |
$email_settings['subject'] = $subject; //subject of the email | |
$email_settings['message'] = $message; //body of the email (already in HTML format) | |
$email_settings['from_name'] = $from_name; //Example: GravityView Website | |
$email_settings['message_format'] = $message_format; //html | |
$email_settings['email_footer'] = $email_footer; //The text: This note was sent from {url} | |
$email_settings['entry'] = $entry; // The entry array that the note is being added to | |
return $email_settings; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment