advantage_page_walker

The Advantage advantage page walker class.

Defined (1)

The class is defined in the following location(s).

/inc/lib-foundation.php  
  1. class advantage_page_walker extends Walker_Page { 
  2.  
  3. function start_el( &$output, $page, $depth, $args, $current_page ) { 
  4. $item_html = ''; 
  5. parent::start_el( $item_html, $page, $depth, $args, $current_page ); 
  6. $css_class = array( 'page_item', 'page-item-'.$page->ID ); 
  7. if ( $args['has_children'] && 0 == $depth ) { 
  8. $css_class[] = 'dropdown'; 
  9. } elseif ( $args['has_children'] && 0 < $depth ) 
  10. $css_class[] = 'dropdown-submenu'; 
  11.  
  12. $css_class = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) ); 
  13. if ( $args['has_children'] && 0 == $depth ) { 
  14. $item_html = '<li class="' . $css_class . '"><a href="' . get_permalink($page->ID) . '">' . apply_filters( 'the_title', $page->post_title, $page->ID ) . '<span class="caret dropdown-toggle" data-toggle="dropdown"></span></a>';  
  15. else 
  16. $item_html = '<li class="' . $css_class . '"><a href="' . get_permalink($page->ID) . '">' . apply_filters( 'the_title', $page->post_title, $page->ID ) . '</a>'; 
  17. $output .= $item_html; 
  18.  
  19. function start_lvl( &$output, $depth = 0, $args = array() ) { 
  20. $output .= "\n<ul class=\"dropdown-menu\">\n";