* @package Componentz * @subpackage Componentz Theme * @since 1.0.0 */ namespace Componentz; // Do not allow direct access. if( ! defined( 'ABSPATH' ) ) { exit; } /** * WP Bootstrap Navwalker * * @package WP-Bootstrap-Navwalker * @link https://github.com/wp-bootstrap/wp-bootstrap-navwalker */ class NavWalker extends \Walker_Nav_Menu { /** * Starts the list before the elements are added. * * @since WP 3.0.0 * * @see Walker_Nav_Menu::start_lvl() * * @param string $output Used to append additional content (passed by reference). * @param int $depth Depth of menu item. Used for padding. * @param stdClass $args An object of wp_nav_menu() arguments. */ public function start_lvl( &$output, $depth = 0, $args = array() ) { if ( isset( $args->item_spacing ) && 'discard' === $args->item_spacing ) { $t = ''; $n = ''; } else { $t = "\t"; $n = "\n"; } $indent = str_repeat( $t, $depth ); // Default class to add to the file. $classes = array( 'cz-dropdown-menu' ); /** * Filters the CSS class(es) applied to a menu list element. * * @since WP 4.8.0 * * @param array $classes The CSS classes that are applied to the menu `