wp_filter_nohtml_kses() WordPress Function
The wp_filter_nohtml_kses() function is a built-in Wordpress function that strips all HTML tags from a string. This function is typically used to sanitize user-provided input before saving it to the database.
wp_filter_nohtml_kses( string $data ) #
Strips all HTML from a text string.
Description
This function expects slashed data.
Parameters
- $data
(string)(Required)Content to strip all HTML from.
Return
(string) Filtered content without any HTML.
Source
File: wp-includes/kses.php
function wp_filter_nohtml_kses( $data ) { return addslashes( wp_kses( stripslashes( $data ), 'strip' ) ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |