/ Published in: PHP

Thanks to Tom McFarlin for this: https://gist.github.com/tommcfarlin/86e4f040bcc641a86f59
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php add_filter( 'mce_buttons_2', 'acme_remove_from_kitchen_sink'); /** * Removes the all but the formatting button from the post editor. * * @since 1.0.0 * * @param array $buttons The current array buttons including the kitchen sink. * @return array The updated array of buttons that exludes the kitchen sink. */ function acme_remove_from_kitchen_sink( $buttons ) { 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', 'charmap', 'outdent', 'indent', 'undo', 'redo', 'wp_help' ); foreach ( $buttons as $button_key => $button_value ) { } } return $buttons; }
URL: https://gist.github.com/tommcfarlin/86e4f040bcc641a86f59
Comments
