Created
March 16, 2018 10:01
-
-
Save certainlyakey/5fd8a1b6c52c9adce897772d6c04bb21 to your computer and use it in GitHub Desktop.
Remove unwanted buttons from TinyMCE editor (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
<?php | |
function tiny_mce_remove_unused_buttons_row_1($buttons) { | |
$remove = array('wp_more', 'aligncenter', 'alignleft', 'alignright'); | |
return array_diff($buttons,$remove); | |
} | |
add_filter('mce_buttons','tiny_mce_remove_unused_buttons_row_1'); | |
function tiny_mce_remove_unused_buttons_row_2($buttons) { | |
$remove = array('forecolor'); | |
return array_diff($buttons,$remove); | |
} | |
add_filter('mce_buttons_2','tiny_mce_remove_unused_buttons_row_2'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment