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