0 ? str_repeat( "\t", $depth ) : '' ); // code indent error_log('start_lvl ----'); error_log('$output:'.var_export($output, true)); error_log('$depth:'.var_export($depth, true)); //error_log('$args:'.var_export($args, true)); } /** * Start El. * * @see Walker::start_el() * @since 3.0.0 * * @access public * @param mixed $output Passed by reference. Used to append additional content. * @param mixed $item Menu item data object. * @param int $depth (default: 0) Depth of menu item. Used for padding. * @param array $args (default: array()) Arguments. * @param int $id (default: 0) Menu item ID. * @return void */ public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { error_log('start_el ----'); error_log('$output:'.var_export($output, true)); //error_log('$item:'.var_export($item, true)); error_log('$depth:'.var_export($depth, true)); //error_log('$args:'.var_export($args, true)); //error_log('$id:'.var_export($id, true)); $indent = ( $depth > 0 ? str_repeat( "\t", $depth ) : '' ); // code indent // Depth-dependent classes. $depth_classes = array( ( $depth == 0 ? 'main-menu-item' : 'sub-menu-item' ), ( $depth >=2 ? 'sub-sub-menu-item' : '' ), ( $depth % 2 ? 'menu-item-odd' : 'menu-item-even' ), 'menu-item-depth-' . $depth ); $depth_class_names = esc_attr( implode( ' ', $depth_classes ) ); // Passed classes. $classes = empty( $item->classes ) ? array() : (array) $item->classes; $class_names = esc_attr( implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $item ) ) ); // Build HTML. if ($depth == 0) { $output .= $indent . '
'; } else { $output .= $indent . '
  • ' . esc_attr( 'Add a menu', '' ) . '
  • '; echo ''; if ( $container ) { echo ''; } } } } } // End if().