Astra_Ext_Advanced_Headers_Loader::astra_advanced_headers_design_css_option( string $option, mixed $default = '' )

Return an Advanced Headers design option that is written into the generated CSS.


Description

The value is validated by astra_addon_sanitize_css_value() against the type its option expects, so a stored value can never close the current CSS rule or add declarations to it. Use this for every design value that lands in CSS; astra_advanced_headers_design_option() also feeds HTML output (custom-menu-item-text-html) and must stay untouched.


Parameters

$option

(Required) Option key.

$default

(Optional) Option default value.

Default value: ''


Return

(string) Validated option value, else the validated default, else an empty string.


Source

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

		public static function astra_advanced_headers_design_css_option( $option, $default = '' ) {

			$type = self::get_design_css_type( $option );
			$type = '' !== $type ? $type : 'color';

			$value = astra_addon_sanitize_css_value( self::astra_advanced_headers_design_option( $option ), $type );

			// An invalid stored value falls back to the default, as an empty one does.
			return '' !== $value ? $value : astra_addon_sanitize_css_value( $default, $type );
		}

Changelog

Changelog
Version Description
4.13.11 Introduced.


User Contributed Notes

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