kses_init_filters

Advertisement

Summery Summery

Adds all KSES input form content filters.

Syntax Syntax

kses_init_filters()

Description Description

All hooks have default priority. The wp_filter_kses() function is added to the ‘pre_comment_content’ and ‘title_save_pre’ hooks.

The wp_filter_post_kses() function is added to the ‘content_save_pre’, ‘excerpt_save_pre’, and ‘content_filtered_save_pre’ hooks.

Source Source

File: wp-includes/kses.php

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

/**
 * Sanitizes 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.
 *
 * This function expects slashed data.
 *
 * @since 2.0.0
 *
 * @param string $data Post content to filter, expected to be escaped with slashes.
 * @return string Filtered post content with allowed HTML tags and attributes intact.

Advertisement

Changelog Changelog

Changelog
Version Description
2.0.0 Introduced.

Advertisement

Leave a Reply