Sometimes you have a client that really thinks they are a designer, and reeeaaalllly wants everything to be pink. Or centered, justified, bold, etc. Did I already mention pink? On some occasions it’s better for the client, and their business/blog, if they didn’t have the ability to do that stuff.
I’m currently rebuilding a site for a new client that wants everything pink. Everything. Seriously. I decided it may be worth disabling the font color option from the TinyMCE editor in WordPress. I googled a bit and found Tom McFarlin’s post, which got me halfway there. But his filter only removes items from the kitchen sink. I wanted to remove buttons from the main row of the editor too.
Tom’s code uses the mce_buttons_2 filter. I figured the “_2” meant it was filtering the “second row”, so I googled a bit and found a slew of filters for the WP editor.
I dumped all the data, and found what I was looking for. Here is a snippet to optionally remove buttons from both rows of the WordPress TinyMCE editor. Please note, this removes ALL the buttons, so only remove the ones you’d like.