Notifications
Clear all

[Solved] Formatting New "private message" notification email message:

7 Posts
2 Users
0 Reactions
1,659 Views
Posts: 5
Customer
Topic starter
(@ghmccord)
Member
Joined: 6 years ago

Hi,

Is there a way to format/ style the private message notification email with CSS, inline styles or something else?

Thanks!

Screen Shot 2019 05 30 at 11.33.14 PM
Topic Tags
6 Replies
Astghik
Posts: 6198
Admin
(@astgh)
Illustrious Member
Joined: 7 years ago

Hi @ghmccord,

Haven't you tried the Inline CSS style? As far as I know, it should work fine. 

 

Posts: 5
Customer
Topic starter
(@ghmccord)
Member
Joined: 6 years ago

Hi Astghik,

I tried that yesterday and I tried it again today (See attached for my results) and the email doesn't seem to take the styles. I also tried using a simple hex code to change the color as well but did not produce the results I wanted.

Screen Shot 2019 05 31 at 2.27.39 PM
Screen Shot 2019 05 31 at 2.29.48 PM
4 Replies
Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6198

ok @ghmccord,

I'm also going to check this issue. I'll update the topic asap. 

Customer
(@ghmccord)
Joined: 6 years ago

Member
Posts: 5

Thanks!

Astghik
Admin
(@astgh)
Joined: 7 years ago

Illustrious Member
Posts: 6198

Hi @ghmccord,

I've asked the add-on developers this question The inline style will not work in this case. You should use the wpforo_kses_allowed_html_email hook for this purpose.

Below is an example code, you should add it in your active theme's functions.php file. 

add_filter('wpforo_kses_allowed_html_email', 'custom_wpforo_kses_allowed_html_email');
function custom_wpforo_kses_allowed_html_email($allowed_html){
if( !wpfkey($allowed_html, 'h1') ) $allowed_html['h1'] = array();
if( !wpfkey($allowed_html['h1'], 'style') ) $allowed_html['h1']['style'] = array();

if( !wpfkey($allowed_html, 'span') ) $allowed_html['span'] = array();
if( !wpfkey($allowed_html['span'], 'style') ) $allowed_html['span']['style'] = array();

return $allowed_html;
}
Customer
(@ghmccord)
Joined: 6 years ago

Member
Posts: 5

This seems to work. Thank you!

Share:
Scroll to top