WP_HTML_Processor::is_mathml_integration_point
Indicates if the current token is a MathML integration point.
Метод класса: WP_HTML_Processor{}
Хуков нет.
Возвращает
true|false. Whether the current token is a MathML integration point.
Использование
// private - только в коде основоного (родительского) класса $result = $this->is_mathml_integration_point(): bool;
Заметки
Список изменений
| С версии 6.7.0 | Введена. |
Код WP_HTML_Processor::is_mathml_integration_point() WP HTML Processor::is mathml integration point WP 6.9.4
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
);
}