WP_Admin_Bar::_render_group() WordPress Method
The WP_Admin_Bar::_render_group() method is used to render a group of admin bar menu items. This method is used internally by the WP_Admin_Bar::render() method, so you should not need to call it directly.
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>'; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |