astra_toggle_buttons_markup()

Toggle Button Markup


Description


Source

File: inc/markup-extras.php

	function astra_toggle_buttons_markup() {
		$disable_primary_navigation = astra_get_option( 'disable-primary-nav' );
		$custom_header_section      = astra_get_option( 'header-main-rt-section' );
		/** @psalm-suppress InvalidArgument */ // phpcs:ignore Generic.Commenting.DocComment.MissingShort
		$hide_custom_menu_mobile = astra_get_option( 'hide-custom-menu-mobile', false );
		$above_header_merge      = astra_get_option( 'above-header-merge-menu' );
		$above_header_on_mobile  = astra_get_option( 'above-header-on-mobile' );
		$below_header_merge      = astra_get_option( 'below-header-merge-menu' );
		$below_header_on_mobile  = astra_get_option( 'below-header-on-mobile' );
		$menu_bottons            = true;

		if ( ( $disable_primary_navigation && 'none' == $custom_header_section ) || ( $disable_primary_navigation && true == $hide_custom_menu_mobile ) ) {
			$menu_bottons = false;
			if ( ( true == $above_header_on_mobile && true == $above_header_merge ) || ( true == $below_header_on_mobile && true == $below_header_merge ) ) {
				$menu_bottons = true;
			}
		}

		if ( apply_filters( 'astra_enable_mobile_menu_buttons', $menu_bottons ) ) {
			?>
		<div class="ast-mobile-menu-buttons">

			<?php astra_masthead_toggle_buttons_before(); ?>

			<?php astra_masthead_toggle_buttons(); ?>

			<?php astra_masthead_toggle_buttons_after(); ?>

		</div>
			<?php
		}
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.


User Contributed Notes

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