WPDev.one
Core Function
View Source on Trac ↗

wp_strip_all_tags()

wp_strip_all_tags( mixed $text, mixed $remove_breaks = false )

Properly strips all HTML tags including 'script' and 'style'.

Parameters 1 required

Name / Type Description
$text
string

String containing HTML tags

Required
$remove_breaks
bool

Optional. Whether to remove left over line breaks and white space chars

Return Value

(string)
The processed string.

Function Information

Since Version
2.9.0
Source File
wp-includes/formatting.php
Advertisement