WP_HTML_Active_Formatting_Elements::walk_down()
Steps through the stack of active formatting elements, starting with the top element (added first) and walking downwards to the one added last.
This generator function is designed to be used inside a "foreach" loop.
Example:
$html = '<em><strong><a>We are here'; foreach ( $stack->walk_down() as $node ) { echo "{$node->node_name} -> "; } > EM -> STRONG -> A ->
To start with the most-recently added element and walk towards the top, see WP_HTML_Active_Formatting_Elements::walk_up().
Метод класса: WP_HTML_Active_Formatting_Elements{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WP_HTML_Active_Formatting_Elements = new WP_HTML_Active_Formatting_Elements(); $WP_HTML_Active_Formatting_Elements->walk_down();
Список изменений
С версии 6.4.0 | Введена. |
Код WP_HTML_Active_Formatting_Elements::walk_down() WP HTML Active Formatting Elements::walk down WP 6.6.1
public function walk_down() { $count = count( $this->stack ); for ( $i = 0; $i < $count; $i++ ) { yield $this->stack[ $i ]; } }