kses_init() WordPress Function
The kses_init() function is a security measure implemented in WordPress that strips dangerous content from user-submitted data. It is important to note that kses does not remove all potential threats, but is a good first line of defense against malicious code.
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
function kses_init() { kses_remove_filters(); if ( ! current_user_can( 'unfiltered_html' ) ) { kses_init_filters(); } }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |