WP_HTML_Active_Formatting_Elements::contains_node
Reports if a specific node is in the stack of active formatting elements.
Метод класса: WP_HTML_Active_Formatting_Elements{}
Хуков нет.
Возвращает
true|false. Whether the referenced node is in the stack of active formatting elements.
Использование
$WP_HTML_Active_Formatting_Elements = new WP_HTML_Active_Formatting_Elements(); $WP_HTML_Active_Formatting_Elements->contains_node( $token );
- $token(WP_HTML_Token) (обязательный)
- Look for this node in the stack.
Список изменений
| С версии 6.4.0 | Введена. |
Код WP_HTML_Active_Formatting_Elements::contains_node() WP HTML Active Formatting Elements::contains node WP 7.0.2
public function contains_node( WP_HTML_Token $token ) {
foreach ( $this->walk_up() as $item ) {
if ( $token->bookmark_name === $item->bookmark_name ) {
return true;
}
}
return false;
}