Notifications
Clear all

Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum   wpForo Support Forum

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


ghmccord
Posts: 5
Customer
(@ghmccord)
Member
Joined: 1 year 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: 4191
Admin
(@astghik)
Support Team
Joined: 3 years ago

Hi @ghmccord,

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

 

ghmccord
Posts: 5
Customer
(@ghmccord)
Member
Joined: 1 year 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
(@astghik)
Joined: 3 years ago

Support Team
Posts: 4191

ok @ghmccord,

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

ghmccord
Customer
(@ghmccord)
Joined: 1 year ago

Member
Posts: 5

Thanks!

Astghik
Admin
(@astghik)
Joined: 3 years ago

Support Team
Posts: 4191

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;
}
ghmccord
Customer
(@ghmccord)
Joined: 1 year ago

Member
Posts: 5

This seems to work. Thank you!

Share: