Astra_Ext_Header_Sections_Markup::below_header_toggle_button()

Toggle Button


Description


Source

File: addons/header-sections/classes/class-astra-ext-header-sections-markup.php

		public function below_header_toggle_button() {

			if ( ! apply_filters( 'astra_enable_below_header_mobile_menu_button', true ) ) {
				return;
			}

			$below_header_enabled = $this->astra_below_header_enabled();
			$below_header_merged  = $this->astra_below_header_merged_enabled();
			// Add filter to enable the menu buttons.
			add_filter( 'astra_enable_mobile_menu_buttons', '__return_true' );
			$below_header_toggle_class = apply_filters( 'astra_below_header_menu_toggle_classes', array() );

			if ( ! $below_header_merged && $below_header_enabled && has_nav_menu( 'below_header_menu' ) ) {

				$below_menu_title = astra_get_option( 'below-header-menu-label' );
				?>
				<div class="ast-button-wrap">
					<span class="screen-reader-text"><?php esc_html_e( 'Below Header', 'astra-addon' ); ?></span>
					<button class="menu-toggle menu-below-header-toggle <?php echo esc_attr( implode( ' ', $below_header_toggle_class ) ); ?>" >
					<?php Astra_Icons::get_icons( 'menu-bars', true, true, 'below_header' ); ?>
					<?php if ( '' !== $below_menu_title ) { ?>
						<span class="mobile-menu-wrap"><span class="mobile-menu"><?php echo esc_html( $below_menu_title ); ?></span></span>
					<?php } ?>
					</button>
				</div>
				<?php
			}
		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.