Created
September 12, 2014 09:37
-
-
Save tribulant/a0a858de93f37cbbee42 to your computer and use it in GitHub Desktop.
Newsletters: Filter - wpml_send_body Example
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('wpml_send_body', 'myfunc_send_body', 10, 3); | |
function myfunc_send_body($body = null, $phpmailer = null, $history_id = null) { | |
// Do something with the body/content here... | |
// For example, strip the HTML from it and assign it as the alternative body | |
$phpmailer -> AltBody = strip_tags($body); | |
// Or append something to it like social media icons at the end | |
$body .= '<div>Social media HTML</div>'; | |
return $body; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment