Last active
August 29, 2015 14:05
-
-
Save dirtystylus/ebbc736a2769c839b982 to your computer and use it in GitHub Desktop.
Removing TinyMCE options in WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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