On this page
kses_init()
Sets up most of the KSES filters for input form content.
Description
First removes all of the KSES filters in case the current user does not need to have KSES filter the content. If the user does not have unfiltered_html capability, then KSES filters are added.
Source
File: wp-includes/kses.php. View all references
function kses_init() {
kses_remove_filters();
if ( ! current_user_can( 'unfiltered_html' ) ) {
kses_init_filters();
}
}
Related
Uses
| Uses | Description |
|---|---|
| kses_init_filters() wp-includes/kses.php | Adds all KSES input form content filters. |
| kses_remove_filters() wp-includes/kses.php | Removes all KSES input form content filters. |
| current_user_can() wp-includes/capabilities.php | Returns whether the current user has the specified capability. |
Changelog
| Version | Description |
|---|---|
| 2.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/kses_init