bp_strip_script_and_style_tags( string $string )

Remove script and style tags from a string.

Description

Parameters

$string

(string) (Required) The string to strip tags from.

Return

(string) The stripped tags string.

Source

File: bp-core/bp-core-functions.php

function bp_strip_script_and_style_tags( $string ) {
	return preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
}

Changelog

Changelog
Version Description
BuddyPress 3.0.1 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.