WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp filter post kses

Description

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.

KSES seems to stand for "kses strips evil scripts!".

Usage

<?php wp_filter_post_kses$data ?>

Parameters

$data
(string) (required) Post content to filter
Default: None

Return Values

(string) 
Filtered post content with allowed HTML tags and attributes intact.

Examples

Notes

  • Uses global: (unknown) $allowedposttags

Change Log

Since: 2.0.0

Source File

wp_filter_post_kses() is located in wp-includes/kses.php.

Related

See also index of Function Reference and index of Template Tags.