How to remove html tags clearing from description in wp_insert_term

When you use wp_insert_term it removes any html tags in description. But what to do when they are needed?


This description:


In function wp_insert_term () will be:

How to fix

You need use pre_insert_term

Before function wp_insert_term () insert:

remove_filter (‘pre_term_description’, ‘wp_filter_kses’);

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *