Created
April 10, 2014 21:35
-
-
Save drrobotnik/10425669 to your computer and use it in GitHub Desktop.
leadin custom welcome message
This file contains hidden or 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
function cv_leadin_subscribe_email( $fields ){ | |
$body = file_get_contents( get_stylesheet_directory() . '/leadin/email.html' ); | |
$replacements = array(); | |
foreach ( $fields as $field ) { | |
$brace_label = "{" . ucwords( $field['label'] ) . "}"; | |
$replacements[$brace_label] = $field['value']; | |
} | |
$body = strtr($body, $replacements); | |
return $body; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment