Class walker_nav
Generates the markup for the main navigation area. This assumes Bootstrap 3's navbar capabilities, which only supports a depth of 2 - that is, 1 parent and 1 child only. Any menu items that are grandchildren or younger will have unexpected results.
Note: This class was originally copied from Walker_Nav_Menu, then modified to accomodate Bootstrap classes. This was done to ensure that the same WP hooks are in-place.
Note: Bootstrap can only support a single parent/child relation. There are no grandchildren support as of Bootstrap 3.0 - apparently, there is a thread where Mark Otto states something along the lines of: "grandchildren not being mobile-friendly". Therefore, at the top of each member function, you will see a chack to ensure that we do not process any items that are at the grandchild level or lower.
Example Bootstrap 3 navbar markup:- Walker_Nav_Menu
-
bpq\walker_nav
Uses: \Walker_Nav_Menu
Link: http://getbootstrap.com/components/#navbar
Located at services/bpq.service.menus.php
Methods summary
public
|
#
start_lvl( string & $output, integer $depth = 0, array $args = array() )
Starts the list before the elements are added. |
public
|
#
end_lvl( string & $output, integer $depth = 0, array $args = array() )
Ends the list of after the elements are added. |
public
|
#
start_el( string & $output, object $item, integer $depth = 0, array $args = array(), integer $id = 0 )
Start the element output. |
public
|
#
end_el( string & $output, object $item, integer $depth = 0, array $args = array() )
Ends the element output, if needed. |
public
null
|
#
display_element( object $element, array & $children_elements, integer $max_depth, integer $depth = 0, array $args, string & $output )
Traverse elements to create list from elements. |