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

- by

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

Add your voice!

This site uses Akismet to reduce spam. Learn how your comment data is processed.