bbp_get_teeny_mce_buttons

Edit TeenyMCE buttons to match allowedtags.

Description

(array) bbp_get_teeny_mce_buttons( (array) $buttons = array() ); 

Returns (array)

Parameters (1)

0. $buttons — Optional. (array) => array()
The buttons.

Usage

  1. if ( !function_exists( 'bbp_get_teeny_mce_buttons' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/common/template.php'; 
  3.  
  4. // The buttons. 
  5. $buttons = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_get_teeny_mce_buttons($buttons); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/common/template.php  
  1. function bbp_get_teeny_mce_buttons( $buttons = array() ) { 
  2.  
  3. // Remove some buttons from TeenyMCE 
  4. $buttons = array_diff( $buttons, array( 
  5. 'underline',  
  6. 'justifyleft',  
  7. 'justifycenter',  
  8. 'justifyright' 
  9. ) ); 
  10.  
  11. // Images 
  12. array_push( $buttons, 'image' ); 
  13.  
  14. return apply_filters( 'bbp_get_teeny_mce_buttons', $buttons );