W3cubDocs

/WordPress

wp_kses_data( string $data ): string

Sanitize content with allowed HTML KSES rules.

Description

This function expects unslashed data.

Parameters

$datastringrequired
Content to filter, expected to not be escaped.

Return

string Filtered content.

Source

function wp_kses_data( $data ) {
	return wp_kses( $data, current_filter() );
}

Changelog

Version Description
2.9.0 Introduced.

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