Разрешаем писать html теги в описание рубрик

Иногда нужно разрешить писать html теги в описание рубрик и других своих таксономий, для этого нужно просто удалить фильтр

Воспользуемся стандартной функцией remove_filter

Так же добавить красивый редактор TinyMCE для удобства заполнения описания

remove_filter( 'pre_term_description', 'wp_filter_kses' );
remove_filter( 'term_description', 'wp_kses_data' );
function removeCategoryDesc(){
?>
<script type="text/javascript">
jQuery(function($) {
$('textarea#description').closest('tr.form-field').remove();
});
</script>
<?php
}
add_action('category_edit_form_fields','removeCategoryDesc');
function editCategoryDescription ($container = ''){
$content = is_object($container) && isset($container->description) ? html_entity_decode($container->description) : '';
$editor_id = 'tag_description';
$settings = 'description';
?>
<tr class="form-field term-description-wrap">
<th scope="row" valign="top"><label for="description">Описание</label></th>
<td>
<?php wp_editor($content, $editor_id, array(
'textarea_name' => $settings,
'editor_css' => '<style>.html-active .wp-editor-area{border:0;}</style>',
)); ?><br>
</td>
</tr>
<?php
}
add_action('category_edit_form_fields', 'editCategoryDescription');
add_action('post_tag_edit_form_fields', 'editCategoryDescription');