Created
May 24, 2011 14:27
-
-
Save ChrisLTD/988801 to your computer and use it in GitHub Desktop.
Modify TinyMCE in Wordpress to exclude buttons
This file contains 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
/* | |
* Modifying TinyMCE editor to remove unused items. | |
*/ | |
function customformatTinyMCE($init) { | |
// Add block format elements you want to show in dropdown | |
$init['theme_advanced_blockformats'] = 'p,h1,h2,h3,h4,h5,h6,div'; | |
$init['theme_advanced_disable'] = 'justifyfull,pasteword'; | |
$init['theme_advanced_buttons2_add'] = 'styleselect'; | |
$init['theme_advanced_styles'] = 'Align Right=alignright, Align Left=alignleft'; | |
return $init; | |
} | |
// Modify Tiny_MCE init | |
add_filter('tiny_mce_before_init', 'customformatTinyMCE' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment