term_tree() public static method

Turns Terms or an array of terms from a hierarchical vocabulary into a ordered HTML list with list items for each term.
public static term_tree ( mixed $terms, string $tree_name, array $config = [] ) : string
$terms mixed An array of Term objects or a Terms object.
$tree_name string The name of the tree, used for unique node id's
$config array an array of values to use to configure the output of this function
return string The transformed vocabulary.
Example #1
0
<?php

if (!defined('HABARI_PATH')) {
    die('No direct access');
}
?>
<div <?php 
echo $_attributes;
?>
><input type="hidden" name="<?php 
echo $_name;
?>
" value=""><?php 
echo \Habari\Format::term_tree($terms, $_name, $_settings);
?>
</div>