WireMarkupRegions::stripRegions()
Strip the given region non-nested tags from the document
Note that this only works on non-nested tags like HTML comments, script or style tags.
Usage
// basic usage
$string = $wireMarkupRegions->stripRegions(string $tag, string $markup);
// usage with all arguments
$string = $wireMarkupRegions->stripRegions(string $tag, string $markup, bool $getRegions = false);Arguments
| Name | Type(s) | Description |
|---|---|---|
$tag | string | Specify "<!--" to remove comments or "<script" to remove scripts, or "<tag" for any other tags. |
$markup | string | Markup to remove the tags from |
$getRegions (optional) | bool | Specify true to return array of the strip regions rather than the updated markup |
Return value
string array
WireMarkupRegions methods and properties
API reference based on ProcessWire core version 3.0.268