wp_filter_post_kses() WP 1.0
Sanitize content for allowed HTML tags for post content.
Post content refers to the page contents of the 'post' type and not $_POST data from forms.
This function expects slashed data.
Works based on: wp_kses()
No Hooks.
Return
String. Filtered post content with allowed HTML tags and attributes intact.
Usage
wp_filter_post_kses( $data );
- $data(string) (required)
- Post content to filter, expected to be escaped with slashes.
Changelog
Since 2.0.0 | Introduced. |
Code of wp_filter_post_kses() wp filter post kses WP 5.6
function wp_filter_post_kses( $data ) {
return addslashes( wp_kses( stripslashes( $data ), 'post' ) );
}Related Functions
From category: Sanitizing, Escaping
- esc_attr()
- esc_html()
- esc_js()
- esc_textarea()
- esc_url()
- esc_url_raw()
- sanitize_email()
- sanitize_file_name()