children as $group ) {
$this->_render_group( $group );
}
?>
type || empty( $node->children ) ) {
return;
}
echo '';
foreach ( $node->children as $group ) {
$this->_render_group( $group );
}
echo '
';
}
/**
* @since 3.3.0
* @since 6.5.0 Added `$menu_title` parameter to allow an ARIA menu name.
*
* @param object $node
* @param string|bool $menu_title The accessible name of this ARIA menu or false if not provided.
*/
final protected function _render_group( $node, $menu_title = false ) {
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 = '';
}
if ( empty( $menu_title ) ) {
echo "