wp_kses_post_deep() WordPress Function

The wp_kses_post_deep() function is used to filter content in a post before it is saved to the database. This function will remove all dangerous HTML tags and attributes, and will also convert some entities to their safe counterparts. This function should be used before saving any content that has been entered by a user.

wp_kses_post_deep( mixed $data ) #

Navigates through an array, object, or scalar, and sanitizes content for allowed HTML tags for post content.


Description

Top ↑

See also


Top ↑

Parameters

$data

(mixed)(Required)The array, object, or scalar value to inspect.


Top ↑

Return

(mixed) The filtered content.


Top ↑

Source

File: wp-includes/kses.php

function wp_kses_post_deep( $data ) {
	return map_deep( $data, 'wp_kses_post' );
}


Top ↑

Changelog

Changelog
VersionDescription
4.4.2Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.