WordPress at a glance

wp_kses_post() 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.

Works based on: wp_kses()
✈ 1 time = 0.000492s = fast | 50000 times = 10.07s = slow PHP 7.1.5, WP 4.8

No Hooks.

Return

String. Filtered post content with allowed HTML tags and attributes intact.

Usage

wp_kses_post( $data );
$data(string) (required)
Post content to filter

Code of wp_kses_post: wp-includes/kses.php VER 5.0.1

<?php
function wp_kses_post( $data ) {
	return wp_kses( $data, 'post' );
}

Related Functions

From tag: kses (html cleanup sanitize)

More from category: Security

No comments
    Hello, !     Log In . Register