bbp_get_quicktags_settings

Edit TinyMCE quicktags buttons to match allowedtags.

Description

(array) bbp_get_quicktags_settings( (array) $settings = array() ); 

Returns (array)

Quicktags settings

Parameters (1)

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

Usage

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

Defined (1)

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

/includes/common/template.php  
  1. function bbp_get_quicktags_settings( $settings = array() ) { 
  2.  
  3. // Get buttons out of settings 
  4. $buttons_array = explode( ', ', $settings['buttons'] ); 
  5.  
  6. // Diff the ones we don't want out 
  7. $buttons = array_diff( $buttons_array, array( 
  8. 'ins',  
  9. 'more',  
  10. 'spell' 
  11. ) ); 
  12.  
  13. // Put them back into a string in the $settings array 
  14. $settings['buttons'] = implode( ', ', $buttons ); 
  15.  
  16. return apply_filters( 'bbp_get_quicktags_settings', $settings );