Skip to content

Instantly share code, notes, and snippets.

@dirtystylus
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirtystylus/ebbc736a2769c839b982 to your computer and use it in GitHub Desktop.
Save dirtystylus/ebbc736a2769c839b982 to your computer and use it in GitHub Desktop.
Removing TinyMCE options in WordPress
/*
* This goes in your theme’s functions.php file.
* This will remove EVERY option in the basic WYSIWYG bar in WP. Pull items out of the $remove array if you want to keep them.
*/
function myplugin_tinymce_buttons($buttons)
{
//Remove the format dropdown select and text color selector
$remove = array('bold','italic','blockquote','strikethrough','bullist','numlist','hr','alignleft','aligncenter','alignright','link','unlink','wp_more','spellchecker','wp_fullscreen','wp_adv');
return array_diff($buttons,$remove);
}
add_filter('mce_buttons','myplugin_tinymce_buttons');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment