wp_filter_kses
Sanitize content with allowed HTML Kses rules.
Description
(string) wp_filter_kses( (string) $data );
Returns (string)
Filtered content
Parameters (1)
- 0. $data (string)
- Content to filter, expected to be escaped with slashes
Usage
if ( !function_exists( 'wp_filter_kses' ) ) { require_once ABSPATH . WPINC . '/kses.php'; } // Content to filter, expected to be escaped with slashes $data = ''; // NOTICE! Understand what this does before running. $result = wp_filter_kses($data);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/kses.php
- function wp_filter_kses( $data ) {
- return addslashes( wp_kses( stripslashes( $data ), current_filter() ) );
- }