WP_HTML_Active_Formatting_Elements::clear_up_to_last_marker()publicWP 6.7.0

Clears the list of active formatting elements up to the last marker.

When the steps below require the UA to clear the list of active formatting elements up to > the last marker, the UA must perform the following steps: > > 1. Let entry be the last (most recently added) entry in the list of active > formatting elements. > 2. Remove entry from the list of active formatting elements. > 3. If entry was a marker, then stop the algorithm at this point. > The list has been cleared up to the last marker. > 4. Go to step 1.

Метод класса: WP_HTML_Active_Formatting_Elements{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_HTML_Active_Formatting_Elements = new WP_HTML_Active_Formatting_Elements();
$WP_HTML_Active_Formatting_Elements->clear_up_to_last_marker(): void;

Заметки

Список изменений

С версии 6.7.0 Введена.

Код WP_HTML_Active_Formatting_Elements::clear_up_to_last_marker() WP 6.7.1

public function clear_up_to_last_marker(): void {
	foreach ( $this->walk_up() as $item ) {
		array_pop( $this->stack );
		if ( 'marker' === $item->node_name ) {
			break;
		}
	}
}