Skip to content

Instantly share code, notes, and snippets.

@psflannery
Created July 17, 2013 15:43
Show Gist options
  • Save psflannery/6021775 to your computer and use it in GitHub Desktop.
Save psflannery/6021775 to your computer and use it in GitHub Desktop.
Adds a visual editor to the description field for custom taxonomies. Example below will display the tinymce editor in every custom taxonomy description right now. Can edit to show it for only some specific taxonomy. See also - http://wordpress.org/plugins/rich-text-tags/
/**
* Display advanced TinyMCE editor in taxonomy page
*/
function wpse_7156_enqueue_category() {
global $pagenow, $current_screen;
if( $pagenow == 'edit-tags.php' ) {
require_once(ABSPATH . 'wp-admin/includes/post.php');
require_once(ABSPATH . 'wp-admin/includes/template.php');
wp_tiny_mce( false, array( 'editor_selector' => 'description', 'elements' => 'description', 'mode' => 'exact' ));
}
}
add_action( 'init', 'wpse_7156_enqueue_category' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment