WP_HTML_Active_Formatting_Elements::current_node
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.
Returns
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() WP HTML Active Formatting Elements::current node code WP 6.9
public function current_node() {
$current_node = end( $this->stack );
return $current_node ? $current_node : null;
}