WP_HTML_Processor::is_mathml_integration_point
Indicates if the current token is a MathML integration point.
Method of the class: WP_HTML_Processor{}
No Hooks.
Returns
true|false. Whether the current token is a MathML integration point.
Usage
// private - for code of main (parent) class only $result = $this->is_mathml_integration_point(): bool;
Notes
Changelog
| Since 6.7.0 | Introduced. |
WP_HTML_Processor::is_mathml_integration_point() WP HTML Processor::is mathml integration point code WP 6.9
private function is_mathml_integration_point(): bool {
$current_token = $this->state->current_token;
if ( ! isset( $current_token ) ) {
return false;
}
if ( 'math' !== $current_token->namespace || 'M' !== $current_token->node_name[0] ) {
return false;
}
$tag_name = $current_token->node_name;
return (
'MI' === $tag_name ||
'MO' === $tag_name ||
'MN' === $tag_name ||
'MS' === $tag_name ||
'MTEXT' === $tag_name
);
}