Advertisement
mikelittle

Remove some TinyMCE buttons

May 9th, 2012
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <?php
  2. /*
  3. Plugin Name: zed1.com TinyMCE tweaks
  4. Plugin URI: http://zed1.com/
  5. Description: Remove some buttons from the visual editor
  6. Author: Mike Little
  7. Version: 0.0.1
  8. Author URI: http://zed1.com/
  9. */
  10.  
  11. add_filter( 'mce_buttons', 'mce_buttons_remove_some' );
  12. function mce_buttons_remove_some( $buttons ) {
  13.     $buttons_to_remove = array( 'strikethrough', 'justifycenter' );
  14.     return array_diff( $buttons, $buttons_to_remove);
  15. }
  16.  
  17. add_filter( 'mce_buttons_2', 'mce_buttons_remove_some_2' );
  18. function mce_buttons_remove_some_2( $buttons ) {
  19.     $buttons_to_remove = array( 'justifyfull', 'forecolor' );
  20.     return array_diff( $buttons, $buttons_to_remove);
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement