Skip to content

Instantly share code, notes, and snippets.

@jmccall75
Last active November 11, 2020 17:35
Show Gist options
  • Save jmccall75/d4ce24dc50e3e0d76a6948e3ad2b1390 to your computer and use it in GitHub Desktop.
Save jmccall75/d4ce24dc50e3e0d76a6948e3ad2b1390 to your computer and use it in GitHub Desktop.
Replace term description text field with tinymce
<?php
/*Replaces the "description field" on the Author edit page with a tinymce editor*/
add_action("jjm_author_tax_edit_form_fields", 'add_form_fields_example', 10, 2);
function add_form_fields_example($term, $taxonomy){
?>
<tr valign="top">
<th scope="row">Description</th>
<td>
<?php wp_editor(html_entity_decode($term->description), 'description', array('media_buttons' => false)); ?>
<script>
jQuery(window).ready(function(){
jQuery('label[for=description]').parent().parent().remove();
});
</script>
</td>
</tr>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment