syndicatefx
3/30/2015 - 6:47 PM

Removing buttons from Wordpress TinyMCE editor

Removing buttons from Wordpress TinyMCE editor

<?php
//This snippet goes in your theme functions.php or plugin
 
// Customize TinyMCE
function myplugin_tinymce_buttons($buttons)
 {
    // add the buttons you want to remove, in the array
    $remove = array('formatselect','forecolor','indent','outdent','alignjustify','pastetext','charmap');

    return array_diff($buttons,$remove);
 }
add_filter('mce_buttons_2','myplugin_tinymce_buttons');


function myplugin_tinymce_buttons_2($buttons)
 {
    // Remove that "more" button that shows some more pesky stuff
    $remove = array('wp_more');

    return array_diff($buttons,$remove);
 }
add_filter('mce_buttons','myplugin_tinymce_buttons_2');
?>