Filters content to be run through KSES.
$contentstring
$allowed_htmlarray[]|string
'post'. See wp_kses_allowed_html() for the list of accepted context names.$allowed_protocolsstring[]
KSES is a recursive acronym which stands for “KSES Strips Evil Scripts”.
The filter is used to change the types of HTML elements/attributes or context names are allowed in WordPress content, then strips any HTML elements/attributes that are registered as not allowed.
return apply_filters( 'pre_kses', $content, $allowed_html, $allowed_protocols );
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_kses