\n"; } /** * @see Walker::start_el() * @since 3.0.0 * * @param string $output Passed by reference. Used to append additional content. * @param object $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @param int $current_page Menu item ID. * @param object $args */ function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; /** * Dividers & Headers * ================== * Determine whether the item is a Divider, Header, or regular menu item. * To prevent errors we use the strcasecmp() function to so a comparison * that is not case sensitive. The strcasecmp() function returns a 0 if * the strings are equal. */ if (strcasecmp($item->title, 'divider') == 0) { // Item is a Divider $output .= $indent . '
  • '; } else if (strcasecmp($item->title, 'divider-vertical') == 0) { // Item is a Vertical Divider $output .= $indent . '
  • '; } else if (strcasecmp($item->title, 'nav-header') == 0) { // Item is a Header $output .= $indent . '