Astra_Ext_Header_Sections_Markup::get_above_header_section( string $option )
Function to get Above Header Section
Description
Parameters
- $option
-
(string) (Required) Above Header Menu Option.
Return
(mixed)
Source
File: addons/header-sections/classes/class-astra-ext-header-sections-markup.php
public static function get_above_header_section( $option ) { $value = astra_get_option( $option ); $output = ''; if ( 'above-header-section-1' == $option ) { $above_header_widget = 'above-header-widget-1'; } if ( 'above-header-section-2' == $option ) { $above_header_widget = 'above-header-widget-2'; } switch ( $value ) { case 'search': case 'text-html': $sections = astra_get_dynamic_header_content( $option ); if ( is_array( $sections ) && 0 < count( $sections ) ) { foreach ( $sections as $key => $value ) { $output .= '<div class="above-header-user-select user-select">'; $output .= $value; $output .= '</div> <!-- .above-header-user-select.user-select -->'; } } break; case 'menu': $output .= self::above_header_menu( $option ); break; case 'widget': $output .= '<div class="above-header-widget above-header-user-select">'; ob_start(); astra_get_sidebar( $above_header_widget ); $output .= ob_get_clean(); $output .= '</div> <!-- .above-header-widget -->'; break; default: $output = apply_filters( 'astra_get_dynamic_header_content', '', $option, $value ); break; } return $output; }
Expand full source code Collapse full source code View on Trac