Sanitizes content for allowed HTML tags for post content.
Description
Post content refers to the page contents of the ‘post’ type and not $_POST data from forms.
This function expects slashed data.
Parameters
$datastringrequired- Post content to filter, expected to be escaped with slashes.
Source
function wp_filter_post_kses( $data ) {
return addslashes( wp_kses( stripslashes( $data ), 'post' ) );
}
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
The second argument passes to kses() does not match with its documentation :
https://developer.wordpress.org/reference/functions/wp_kses/