Astra_Ext_Advanced_Headers_Markup::custom_primary_menu( array $args )

Custom Primary Menu


Description

If custom primary menu is selected.


Parameters

$args

(array) (Required) menu arguments.


Return

(array) $args menu arguments.


Source

File: addons/advanced-headers/classes/class-astra-ext-advanced-headers-markup.php

		public function custom_primary_menu( $args ) {
			$transparent_header = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_layout_option( 'merged' );

			if ( ! ( self::advanced_header_enabled() || $transparent_header ) || ( is_front_page() && 'posts' == get_option( 'show_on_front' ) ) ) {
				return $args;
			}
			$custom_menu = Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_design_option( 'custom-menu' );
			if ( ( '' != $custom_menu || 0 != $custom_menu ) && 'primary' == $args['theme_location'] ) {
				$args['menu'] = $custom_menu;
			}
			return $args;
		}


User Contributed Notes

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