WordPress.org

Codex

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

Function Reference/wp kses post

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.

Usage

<?php wp_kses_post$data ); ?>

Parameters

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

Return Values

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

Change Log

Since: 2.9

Source File

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

Related