Astra_Ext_Sticky_Header_Markup::localize_variables( array $localize_vars )

Add Localize variables


Description


Parameters

$localize_vars

(array) (Required) Localize variables array.


Return

(array)


Source

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

		public function localize_variables( $localize_vars ) {

			$site_layout = '';
			if ( Astra_Ext_Extension::is_active( 'site-layouts' ) ) {
				$site_layout = astra_get_option( 'site-layout' );
			}

			/**
			 * Stick Header
			 */
			$localize_vars['header_main_stick'] = astra_get_option( 'header-main-stick' );

			$localize_vars['header_above_stick']      = astra_get_option( 'header-above-stick' );
			$localize_vars['header_below_stick']      = astra_get_option( 'header-below-stick' );
			$localize_vars['stick_header_meta']       = astra_get_option_meta( 'stick-header-meta' );
			$localize_vars['header_main_stick_meta']  = astra_get_option_meta( 'header-main-stick-meta' );
			$localize_vars['header_above_stick_meta'] = astra_get_option_meta( 'header-above-stick-meta' );
			$localize_vars['header_below_stick_meta'] = astra_get_option_meta( 'header-below-stick-meta' );

			/**
			 * Sticky Header on Devices
			 */
			$localize_vars['sticky_header_on_devices'] = astra_get_option_meta( 'sticky-header-on-devices' );

			/**
			 * Sticky Header Style
			 */
			$localize_vars['sticky_header_style'] = astra_get_option_meta( 'sticky-header-style' );

			$localize_vars['sticky_hide_on_scroll'] = astra_get_option_meta( 'sticky-hide-on-scroll' );

			/**
			 * Breakpoint
			 */
			$localize_vars['break_point']        = astra_header_break_point();
			$localize_vars['tablet_break_point'] = astra_addon_get_tablet_breakpoint();
			$localize_vars['mobile_break_point'] = astra_addon_get_mobile_breakpoint();

			$localize_vars['header_main_shrink']           = astra_get_option( 'header-main-shrink' );
			$localize_vars['header_logo_width']            = astra_get_option( 'ast-header-logo-width' );
			$localize_vars['responsive_header_logo_width'] = astra_get_option( 'ast-header-responsive-logo-width' );
			$localize_vars['stick_origin_position']        = apply_filters( 'astra_addon_sticky_header_stick_origin_position', false );

			/**
			 * Site Layout
			 */
			$localize_vars['site_layout']              = esc_attr( $site_layout );
			$localize_vars['site_content_width']       = ( ASTRA_THEME_CONTAINER_PADDING_TWICE + astra_get_option( 'site-content-width' ) );
			$localize_vars['site_layout_padded_width'] = ( astra_get_option( 'site-layout-padded-width', 1200 ) );
			$localize_vars['site_layout_box_width']    = ( astra_get_option( 'site-layout-box-width', 1200 ) );

			/**
			 * Is new header builder active.
			 */
			$localize_vars['header_builder_active'] = astra_addon_builder_helper()->is_header_footer_builder_active;
			$localize_vars['component_limit']       = astra_addon_builder_helper()->component_limit;

			return $localize_vars;
		}


User Contributed Notes

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