WP_HTML_Processor::get_namespace
Indicates the namespace of the current token, or "html" if there is none.
Method of the class: WP_HTML_Processor{}
No Hooks.
Returns
String. One of "html", "math", or "svg".
Usage
$WP_HTML_Processor = new WP_HTML_Processor(); $WP_HTML_Processor->get_namespace(): string;
WP_HTML_Processor::get_namespace() WP HTML Processor::get namespace code WP 6.9
public function get_namespace(): string {
if ( ! isset( $this->current_element ) ) {
return parent::get_namespace();
}
return $this->current_element->token->namespace;
}