On this page
apply_filters( 'pre_kses', string $string, array[]|string $allowed_html, string[] $allowed_protocols )
Filters content to be run through KSES.
Parameters
$stringstring-
Content to filter through KSES.
$allowed_htmlarray[]|string-
An array of allowed HTML elements and attributes, or a context name such as
'post'. See wp_kses_allowed_html() for the list of accepted context names. $allowed_protocolsstring[]-
Array of allowed URL protocols.
More Information
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.
Source
File: wp-includes/kses.php. View all references
return apply_filters( 'pre_kses', $string, $allowed_html, $allowed_protocols );
Related
Used By
| Used By | Description |
|---|---|
| wp_kses_hook() wp-includes/kses.php | You add any KSES hooks here. |
Changelog
| Version | Description |
|---|---|
| 2.3.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_kses