ID);
$slug = $post->post_name;
$output .= sprintf("\n
%s",
(is_front_page() ? '' : get_site_url().'/').($slug == 'blog' ? $slug : '#'.$slug),
apply_filters( 'the_title', $page->post_title, $page->ID )
);
}
public function end_el( &$output, $page, $depth=0, $args=array(), $current_page = 0 ) {
$output .= '';
}
}*/
/**
* Class DropDown_Nav_Menu
* This class defines the logic for the menu rendering.
*/
class Navthemes_Nav_Menu extends Walker_Nav_Menu {
public function display_element ($element, &$children_elements, $max_depth, $depth = 0, $args, &$output) {
// check, whether there are children for the given ID and append it to the element with a (new) ID
$element->hasChildren = isset($children_elements[$element->ID]) && !empty($children_elements[$element->ID]);
return parent::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
}
public function start_el(&$output, $item, $depth=0, $args=array(), $current_object_id = 0) {
$output .= sprintf("\n %s ",
$item->url,
$item->title
);
}
public function end_el(&$output, $item, $depth=0, $args=array(), $current_object_id = 0) {
$output .= '';
}
}