Switches parsing mode into a new namespace, such as when encountering an SVG tag and entering foreign content.
Parameters
$new_namespacestringrequired- One of
'html','svg', or'math'indicating into what namespace the next tokens will be processed.
Source
public function change_parsing_namespace( string $new_namespace ): bool {
if ( ! in_array( $new_namespace, array( 'html', 'math', 'svg' ), true ) ) {
return false;
}
$this->parsing_namespace = $new_namespace;
return true;
}
Changelog
| Version | Description |
|---|---|
| 6.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.