Advertisement
Guest User

Untitled

a guest
May 30th, 2015
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2.  
  3. add_action('init', 'add_custom_editor_buttons');
  4. function add_custom_editor_buttons() {
  5. add_filter('mce_external_plugins', 'add_fontsize_buttons');
  6. add_filter('mce_buttons', 'register_fontsize_buttons');
  7. }
  8. function add_fontsize_buttons( $plugin_array ) {
  9. $plugin_array['fontsize'] = TEMPLATEPATH.'/js/font-size-plugin.js';
  10.  
  11. return $plugin_array;
  12. }
  13. function register_fontsize_buttons( $buttons ) {
  14. array_push($buttons, 'font_size_big', 'font_size_small');
  15.  
  16. return $buttons;
  17. }
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement