How to remove buttons from Distraction Free Writing Mode (Full Screen Editor) in WordPress

wordpress-iconNow that we’ve learnt how to add buttons to the Full Screen Writing Mode in WordPress, let’s see how we can remove them too.

Just in case Zen Mode isn’t zen enough for you.

Imagine that you have never in your life blockquoted anything, and rather not start anytime soon, there’s how to remove the block quote button.

function removeFullscreenButtons($buttons) {
	
	unset ($buttons['blockquote']);
}
add_action ('wp_fullscreen_buttons', 'removeFullscreenButtons');

Just like before, we’re taking an array of buttons and remove the objects we don’t want. Since they were addressed with an index title (blockquote in our case), you must unset them in the same way. Once gone we return the array, and WordPress does not display said button anymore.

To figure out what that index text is, refer to this table and try to figure it out: http://www.tinymce.com/wiki.php/TinyMCE3x:Buttons/controls

Kudos to Renji from Sumtips for his helpful article on this topic: http://sumtips.com/2013/01/remove-or-add-buttons-in-wordpress-distraction-free-writing.html





Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.