#1 WordPress forum plugin created by gVectors Team

wpForo – WordPress Forum Plugin
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation

Forum

Home | Forum

wpDiscuz - WordPress Comment Plugin
  • Forums
  • Members
  • Recent Posts
Forums
Main Support Forums
How-to and Troubles...
Toggle HTML emails?
 
Share:
Share
Tweet
Share
Notifications
Clear all

Toggle HTML emails?

    Last Post
RSS

gunarcom
Posts: 23
 gunarcom
Topic starter
August 7, 2019 9:44 pm
(@gunarcom)
Eminent Member
Joined: 4 years ago

Is there any way to toggle html emails? I don't need registration or other core emails, just post notifications, so I'm not too concerned about filters.

I just want to make the forum emails match my other official emails.

I found the code below in a previous post but it crashed my site, Is there any other way to allow HTML in emails?

function my_custom_email_html_tags( $allowed_html ){
if( $allowed_post_html = wp_kses_allowed_html( 'post' ) ){
$allowed_html = $allowed_post_html
}
return $allowed_html;
}
add_filter( 'wpforo_kses_allowed_html_email', 'my_custom_email_html_tags');
Topic Tags
wp_kses email html email content
4 Replies
Sofy
Posts: 4057
Sofy - Facebook Sofy - Twitter
 Sofy
Admin
August 8, 2019 1:57 pm
(@sofy)
Support Team
Joined: 4 years ago

Hi @gunarcom,

I don't follow you well. Currently, wpForo allows sending HTML emails. 

If there are some tags that are not allowed you should use the following hook:

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;
}

 

In case you want to say thank you !)
We'd really appreciate and be thankful if you leave a good review on plugin page. This is the best way to say thank you to this project and support team.

Reply
gunarcom liked
gunarcom
Posts: 23
 gunarcom
Topic starter
August 8, 2019 10:46 pm
(@gunarcom)
Eminent Member
Joined: 4 years ago

Thanks, I guess it was just stripping out most of the email like tables, images, and divs.

I will try adding the tags into your filter. Thanks.

Reply
2 Replies
hshah
 hshah
(@hshah)
Joined: 3 years ago

Trusted Member
Posts: 63
August 18, 2019 7:21 pm
Reply togunarcomgunarcom

@gunarcom

Did you get this working by any chance?  I'm trying to do the same thing and am struggling 🙁

Reply
gunarcom
 gunarcom
(@gunarcom)
Joined: 4 years ago

Eminent Member
Posts: 23
August 18, 2019 10:52 pm
Reply tohshahhshah
gunarcom

@hshah

I haven't. I put this task on the back burner since I don't honestly know how long it will take or even work. I will probably get around to it in the next week or so and I will post my results here.

I will probably end up simplifying my email templates for the forum just to get the task done. 

Reply
  All forum topics
  Previous Topic
Next Topic  
Related Topics
  • How to remove content from email notification
    1 month ago
  • Email Notification Message body
    4 months ago
  • Add a clickable link in Mail
    11 months ago
  • Disable Login Details email
    1 year ago
  • Customizing Email Content
    1 year ago
Topic Tags:  wp_kses (4), email html (6), email content (11),

Forum Search

Join Us!

Download wpForo plugin
on WordPress.org

wpForo Addons

wpforo-private-messages wpforo-advanced-attachments-128x128 wpforo-embeds-128x128 wpForo User Custom Fields addon wpForo – Blog Cross Posting addon wpForo Ads Manager wpForo – WooCommerce Memberships Integration wpForo Emoticons wpForo – Tenor GIFs Integration
View all Addons »

Recent Topics

  • Attachments not showing on forums posts after migration

    By Formicid, 2 hours ago

  • New Feature About Plugin Customization and Integration

    By z14165899, 13 hours ago

  • WordPress Email sending function wp_mail() doesn't work!

    By feassistant, 21 hours ago

  • Import users from IPBoard

    By jesusdlg, 1 day ago

  • Intruder signing in to wpforo without approval

    By plaurits, 2 days ago

  • How to make new user to get approve manually before creating post and profile.

    By Adhyansh21, 3 days ago

Topic Tags

  • css52
  • translation50
  • plugin conflict48
  • seo47
  • new features45
  • buddypress43
  • avatar41
  • moderation40
  • ultimate member40
  • login40
  • forum40
  • registration37
  • threaded layout35
  • cache34
  • spam33
  • editor33
  • menu33
  • shortcode32
  • forum accesses30
  • widget29
View all tags (2195)

Recent Posts

  • RE: replacing create_function() with something else for PHP8 [duplicate]

    Hi @douglajonson, what is the plugin name?

    By Chris, 27 mins ago

  • RE: Description for each topic?

    @christine, wpForo does not have a topic description ...

    By Chris, 53 mins ago

  • RE: About Plugin Customization and Integration

    Hi @z14165899, Please send your request to sales[at]g...

    By Chris, 1 hour ago

  • Attachments not showing on forums posts after migration

    Hello I just did a manual migration and the older forum...

    By Formicid, 2 hours ago

  • RE: WordPress Email sending function wp_mail() doesn't work!

    @dimalifragis thanks for the enlightenment there. It...

    By feassistant, 15 hours ago

  • RE: Intruder signing in to wpforo without approval

    Maybe at Wordpress.org ?

    By dimalifragis, 23 hours ago

  • Import users from IPBoard

    Hello, Is it possible to import users from ipboard? (...

    By jesusdlg, 1 day ago

Share:
Share
Tweet
Share
  Forum Statistics
21 Forums
9,940 Topics
50.3 K Posts
6 Online
48.4 K Members

Latest Post: replacing create_function() with something else for PHP8 [duplicate] Our newest member: Лестницы Деревянные Цена В Ниж... Recent Posts Unread Posts Tags

Forum Icons: Forum contains no unread posts Forum contains unread posts

Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed

Powered by wpForo | Copyright © 2016-2022 gVectors Team
Copyright Registration Service - Click here for more information or to register work
wpForo is Registered with the IP Rights Office
Copyright Registration Service

Ref: 4477265538
  • Home
  • Forum
  • Migrate to wpForo
  • Addons
  • Addons Demo
  • Documentation