wp_strip_all_tags
wp_strip_all_tags ( $text, $remove_breaks = false )
Parameters:- (string) text String containing HTML tags
- (bool) remove_breaks Optional. Whether to remove left over line breaks and white space chars
Returns:- (string) The processed string.
Defined at: - Introduced in WordPress: 2.9.0
- Deprecated in WordPress: —
Description
Properly strips all HTML tags including 'script' and 'style'.This differs from strip_tags() because it removes the contents of
the `' )`
will return 'something'. wp_strip_all_tags() will return an empty string.