WP_Admin_Bar::_render_group( object $node )

Parameters

$node

(object) (Required)

Source

File: wp-includes/class-wp-admin-bar.php

final protected function _render_group( $node ) {
		if ( 'container' === $node->type ) {
			$this->_render_container( $node );
			return;
		}
		if ( 'group' !== $node->type || empty( $node->children ) ) {
			return;
		}

		if ( ! empty( $node->meta['class'] ) ) {
			$class = ' class="' . esc_attr( trim( $node->meta['class'] ) ) . '"';
		} else {
			$class = '';
		}

		echo "<ul id='" . esc_attr( 'wp-admin-bar-' . $node->id ) . "'$class>";
		foreach ( $node->children as $item ) {
			$this->_render_item( $item );
		}
		echo '</ul>';
	}

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_admin_bar/_render_group