Change allowed HTML tags for comments

You are changing the $allowedtags too late.

On the last line, add_filter should be called for pre_comment_content instead of comment_post, and also, use different priority, something like this:

add_filter('pre_comment_content', 'custom_allowed_tags_comment', 9);

1 thought on “Change allowed HTML tags for comments”

  1. Hurrah! In the end I got a web site from where I can really obtain valuable facts regarding my study and knowledge.

    Reply

Leave a Comment

error code: 523