wp_strip_all_tags


wp_strip_all_tags ( $string, $remove_breaks = false )

Parameters:
  • (string) $string 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:

Description

Properly strip all HTML tags including script and style

This differs from strip_tags() because it removes the contents of the <script> and <style> tags. E.g. strip_tags( '<script>something</script>' ) will return 'something'. wp_strip_all_tags will return ''

Related Functions

wp_script_add_data, wp_set_post_tags, wp_scripts, wp_stream_image, wp_set_all_user_settings

Top Google Results

User discussions

wpseek mobile