weblizar_walker_page_menu

The Enigma weblizar walker page menu class.

Defined (1)

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

/core/menu/default_menu_walker.php  
  1. class weblizar_walker_page_menu extends Walker_Page{ 
  2. function start_lvl( &$output, $depth = 0, $args = array() ) { 
  3. $indent = str_repeat("\t", $depth); 
  4. $output .= "\n$indent<ul class='dropdown-menu'>\n"; 
  5. function start_el( &$output, $page, $depth=0, $args = array(), $current_page = 0 ) { 
  6. if ( $depth ) 
  7. $indent = str_repeat("\t", $depth); 
  8. else 
  9. $indent = ''; 
  10.  
  11. extract($args, EXTR_SKIP); 
  12. $css_class = array('page_item', 'page-item-'.$page->ID); 
  13. if ( !empty($current_page) ) { 
  14. $_current_page = get_post( $current_page ); 
  15. if ( in_array( $page->ID, $_current_page->ancestors ) ) 
  16. $css_class[] = 'current_page_ancestor'; 
  17. if ( $page->ID == $current_page ) 
  18. $css_class[] = 'current_page_item'; 
  19. elseif ( $_current_page && $page->ID == $_current_page->post_parent ) 
  20. $css_class[] = 'current_page_parent'; 
  21. } elseif ( $page->ID == get_option('page_for_posts') ) { 
  22. $css_class[] = 'current_page_parent'; 
  23.  
  24. $css_class = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) ); 
  25.  
  26. $output .= $indent . '<li class="' . $css_class . '"><a href="' . get_permalink($page->ID) . '">' . $link_before . apply_filters( 'the_title', $page->post_title, $page->ID ) . $link_after . '</a>'; 
  27.  
  28. if ( !empty($show_date) ) { 
  29. if ( 'modified' == $show_date ) 
  30. $time = $page->post_modified; 
  31. else 
  32. $time = $page->post_date; 
  33.  
  34. $output .= " " . mysql2date($date_format, $time);