WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/wp filter kses

Contents

Description

Sanitize content with allowed HTML Kses rules.

wp_filter_kses should generally be preferred over wp_kses_data because wp_magic_quotes escapes $_GET, $_POST, $_COOKIE, $_SERVER, and $_REQUEST fairly early in the hook system, shortly after 'plugins_loaded' but earlier then 'init' or 'wp_loaded'.

Usage

<?php wp_filter_kses$data ?>

Parameters

$data
(string) (required) Content to filter
Default: None

Return Values

(string) 
Filtered content

Examples

Notes

  • Uses global: (unknown) $allowedtags

Change Log

Since: 1.0.0

Source File

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

Related

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