Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Up until today's update, the code below has worked flawlessly to add a rich text editor control to the category description editor. Today it stopped working after updating to 3.3

Any clues what to tweak here?

<?php 
function my_editor_init()
{
    if ( is_admin() || defined('DOING_AJAX') ) 
        {
        if ( current_user_can('manage_categories') )remove_filter('pre_term_description', 'wp_filter_kses');
        }
}

add_action('load-categories.php', 'my_admin_init');

add_action('load-edit-tags.php', 'my_admin_init');

function my_admin_init() 
{
    if ( user_can_richedit() && isset($_GET['action']) && 'edit' === $_GET['action'] && ( !empty($_GET['cat_ID']) || ( !empty($_GET['taxonomy']) && !empty($_GET['tag_ID']) ) ) ) 
    {
        add_filter( 'tiny_mce_before_init', 'my_mceinit');
        add_action('admin_footer', 'wp_tiny_mce');
        add_action('admin_head', 'my_head');
    }
}

function my_mceinit($init) 
{
    $init['mode'] = 'exact';
    $init['editor_selector'] = 'description';
    $init['elements'] = 'category_description,description';
    $init['plugins'] = 'safari,inlinepopups,spellchecker,paste,fullscreen';
    $init['theme_advanced_buttons1'] .= ',image';
    $init['theme_advanced_buttons2'] .= ',code';
    $init['onpageload'] = '';
    $init['save_callback'] = '';
    return $init;
}

function my_head() 
{ ?>
<style type="text/css">#category_description_tbl,#description_tbl{border:1px solid #dfdfdf;}.wp_themeSkin .mceStatusbar{border-color:#dddddd;}</style><?php 
} 

add_action('init', 'my_editor_init');

?>
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

This changed in 3.3

Add this line below your my_head() function....

wp_enqueue_style('editor-buttons');

that didnt work. any other suggestions?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.