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.

I have this nice little function to remove buttons from the tinyMCE editor in WordPress, so far I've been able to remove most of the ones I need to.

function custom_disable_mce_buttons( $opt ) {
    $opt['theme_advanced_disable'] = 'justifyfull,forecolor,removeformat,justifycenter,justifyright,justifyleft,charmap,indent,outdent,undo, redo';
    return $opt;
}
add_filter('tiny_mce_before_init', 'custom_disable_mce_buttons');   

The button control list can be found here: http://www.tinymce.com/wiki.php/TinyMCE3x:Buttons/controls

The problem is, there's a few more ones I'd like to remove, like the spellchecker and the 'insert more tag', but I can't find documentation anywhere of the codes/names for these buttons to remove them.

Any got any info on this?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

wp_more - insert more button,

spellchecker - spellchecker button

I've tried it with your code on WP 3.5.1 and it worked fine for me.

share|improve this answer
    
Perfect, thanks. Can you direct me towards any documentation of this or where you found it? –  andy Jun 18 '13 at 13:57
    
Well, I checked it in WP sources :) –  Krzysiek Dróżdż Jun 18 '13 at 16:15
add_filter("mce_buttons", "tinymce_editor_buttons", 99); //targets the first line
add_filter("mce_buttons_2", "tinymce_editor_buttons_second_row", 99); //targets the second line

function tinymce_editor_buttons($buttons) {
return array(
    "undo", 
    "redo", 
    "separator",
    "bold", 
    "italic", 
    "underline", 
    "strikethrough", 
    //"separator",
    //"bullist", 
    //"separator",
    //add more here...
    );
}

function tinymce_editor_buttons_second_row($buttons) {
   //return an empty array to remove this line
    return array();
}

Result:

enter image description here

share|improve this answer

You can try to remove the Spellchecker and the Insert More Tag buttons by adding:

spellchecker, wp_more

to your $opt['theme_advanced_disable'] comma-seperated string.

On my install I have these options:

[theme_advanced_buttons1] => bold,italic,strikethrough,bullist,numlist,blockquote,justifyleft,justifycenter,justifyright,link,unlink,wp_more,spellchecker,wp_fullscreen,wp_adv,separator

[theme_advanced_buttons2] => formatselect,underline,justifyfull,forecolor,pastetext,pasteword,removeformat,charmap,outdent,indent,undo,redo,wp_help

Here is the list:

bold,
italic,
strikethrough,
bullist,
numlist,
blockquote,
justifyleft,
justifycenter,
justifyright,
link,
unlink,
wp_more,
spellchecker,
wp_fullscreen,
wp_adv,
separator,

and

formatselect,
underline,
justifyfull,
forecolor,
pastetext,
pasteword,
removeformat,
charmap,
outdent,
indent,
undo,
redo,
wp_help
share|improve this answer

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.