W3cubDocs

/WordPress

wp_filter_kses( string $data )

Sanitize content with allowed HTML KSES rules.

Description

This function expects slashed data.

Parameters

$data

(string) (Required) Content to filter, expected to be escaped with slashes.

Return

(string) Filtered content.

Source

File: wp-includes/kses.php

function wp_filter_kses( $data ) {
	return addslashes( wp_kses( stripslashes( $data ), current_filter() ) );
}

Changelog

Version Description
1.0.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_filter_kses