A WordPress-centric search engine for devs and theme authors



wp_filter_post_kses ›

Since2.0.0
Deprecatedn/a
wp_filter_post_kses ( $data )
Parameters:
  • (string) $data Post content to filter, expected to be escaped with slashes
    Required: Yes
Returns:
  • (string) Filtered post content with allowed HTML tags and attributes intact.
Defined at:
Codex:

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.



Source

function wp_filter_post_kses( $data ) {
	return addslashes( wp_kses( stripslashes( $data ), 'post' ) );
}