diff --git a/examples/extras/functions.php b/examples/extras/functions.php index 01ee3d7..fe54b7b 100644 --- a/examples/extras/functions.php +++ b/examples/extras/functions.php @@ -1,79 +1,79 @@ . /** * Some useful functions to DO IT YOURSELF */ /** * Generate a menu tree! * A recursive function to generate a menu tree. * * @param string $uid The menu identifier * @param int $level Level of the menu, used internally. Default 0. * @param array $args Arguments */ function print_menu( $uid = null, $level = 0, $args = [] ) { // Example of custom default args $args = array_replace( [ 'max-level' => 99, 'menu-ul-intag' => 'class="collection"' ], $args ); // End menu if level reached if( $level > $args['max-level'] ) { return; } $menuEntries = get_children_menu_entries($uid); if( ! $menuEntries ) { return; } ?>