style tags in emails
-
Hi Chad,
After doing a lot of digging i was finally able to retain style tag in the email body by adding this function in my functions.php fileadd_filter(‘wp_kses_allowed_html’, ‘my_allowed_tags’);
function my_allowed_tags($tags) {
$tags[‘style’] = array( ‘type’ => true, );
return $tags;
}Now when saving to database it removes all the style which have single quotes, example style=”background-color: red;” this would work but style=’background-color: red;’ is removed completely when saving to database. I installed another plugin which lets me modify emails and when i put my custom email there it works perfectly fine.
Please suggest a way i can send my custom email without having to change my HTML.
The topic ‘style tags in emails’ is closed to new replies.