Astra_Ext_Advanced_Headers_Markup::get_sanitized_layout( mixed $layout )

Restrict the Page Header layout to templates that ship with the addon, else ‘disable’.


Description


Parameters

$layout

(mixed) (Required) Raw layout value from post meta.


Return

(string) Known layout slug, or 'disable'.


Source

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

		public static function get_sanitized_layout( $layout ) {

			$allowed_layouts = array(
				'advanced-headers-layout-1',
				'advanced-headers-layout-2',
			);

			if ( is_string( $layout ) && in_array( $layout, $allowed_layouts, true ) ) {
				return $layout;
			}

			return 'disable';
		}

Changelog

Changelog
Version Description
4.13.9 Introduced.


User Contributed Notes

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