WP_HTML_Active_Formatting_Elements::current_node()publicWP 6.4.0

Returns the node at the end of the stack of active formatting elements, if one exists. If the stack is empty, returns null.

Method of the class: WP_HTML_Active_Formatting_Elements{}

No Hooks.

Return

WP_HTML_Token|null. Last node in the stack of active formatting elements, if one exists, otherwise null.

Usage

$WP_HTML_Active_Formatting_Elements = new WP_HTML_Active_Formatting_Elements();
$WP_HTML_Active_Formatting_Elements->current_node();

Changelog

Since 6.4.0 Introduced.

WP_HTML_Active_Formatting_Elements::current_node() code WP 6.6.2

public function current_node() {
	$current_node = end( $this->stack );

	return $current_node ? $current_node : null;
}