Last active
November 11, 2020 17:35
-
-
Save jmccall75/d4ce24dc50e3e0d76a6948e3ad2b1390 to your computer and use it in GitHub Desktop.
Replace term description text field with tinymce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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