bbp_filter_kses

Custom kses filter for forum topics and replies, for filtering incoming data.

Description

(string) bbp_filter_kses( (string) $data = '' ); 

Returns (string)

Filtered content

Parameters (1)

0. $data — Optional. (string) => ''
Content to filter, expected to be escaped with slashes

Usage

  1. if ( !function_exists( 'bbp_filter_kses' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/common/formatting.php'; 
  3.  
  4. // Content to filter, expected to be escaped with slashes 
  5. $data = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_filter_kses($data); 
  9.  

Defined (1)

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

/includes/common/formatting.php  
  1. function bbp_filter_kses( $data = '' ) { 
  2. return addslashes( wp_kses( stripslashes( $data ), bbp_kses_allowed_tags() ) );