Astra_Ext_Header_Sections_Markup::above_header_toggle_button()

Below Header Toggle Button


Description


Source

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

		public function above_header_toggle_button() {
			if ( ! apply_filters( 'astra_enable_above_header_mobile_menu_button', true ) ) {
				return;
			}

			$above_header_enabled = $this->astra_above_header_enabled();
			$above_header_merged  = $this->astra_above_header_merged_enabled();

			add_filter( 'astra_enable_mobile_menu_buttons', '__return_true' );
			$above_header_toggle_class = apply_filters( 'astra_above_header_menu_toggle_classes', array() );

			if ( ! $above_header_merged && $above_header_enabled && has_nav_menu( 'above_header_menu' ) ) {
				$above_menu_title = astra_get_option( 'above-header-menu-label' );
				?>
				<div class="ast-button-wrap">
					<button class="menu-toggle menu-above-header-toggle <?php echo esc_attr( implode( ' ', $above_header_toggle_class ) ); ?>" >
					<span class="screen-reader-text"><?php esc_html_e( 'Above Header', 'astra-addon' ); ?></span>
					<?php Astra_Icons::get_icons( 'menu-bars', true, true, 'above_header' ); ?>
					<?php if ( '' !== $above_menu_title ) { ?>
						<span class="mobile-menu-wrap"><span class="mobile-menu"><?php echo esc_html( $above_menu_title ); ?></span></span>
					<?php } ?>
					</button>
				</div>
				<?php
			}
		}


User Contributed Notes

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