function get_nav_menu_item_children( $parent_id, $nav_menu_items, $depth = true ) {
        $nav_menu_item_list = array();
        foreach ( (array) $nav_menu_items as $nav_menu_item ) {
            if ( $nav_menu_item->menu_item_parent == $parent_id ) {
                $nav_menu_item_list[] = $nav_menu_item;
                if ( $depth ) {
                    if ( $children = self::get_nav_menu_item_children( $nav_menu_item->ID, $nav_menu_items ) )
                        $nav_menu_item_list = array_merge( $nav_menu_item_list, $children );
                    }
                }
        }
        return $nav_menu_item_list;
    }