wp_kses_data

Sanitize content with allowed HTML Kses rules.

Description

(string) wp_kses_data( (string) $data ); 

Returns (string)

Filtered content

Parameters (1)

0. $data (string)
Content to filter, expected to not be escaped

Usage

  1. if ( !function_exists( 'wp_kses_data' ) ) { 
  2. require_once ABSPATH . WPINC . '/kses.php'; 
  3.  
  4. // Content to filter, expected to not be escaped 
  5. $data = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_kses_data($data); 
  9.  

Defined (1)

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

/wp-includes/kses.php  
  1. function wp_kses_data( $data ) { 
  2. return wp_kses( $data, current_filter() );