<?php
/**
 * Defines customizer options
 *
 * This file is loaded at 'after_setup_theme' hook with 10 priority.
 */

function olius_customize_control_color_palettes( $palettes ){
	return array(
		'#7ea844', '#ffffff', // accentcolor/accentfont
		'#f8f8f8', // module_bg
		'#000000', // black
		'#0ea7ef', '#37be5a', '#f7b528', '#ff2d2d' // color options
	);
}
add_filter( 'hoot_customize_control_color_palettes', 'olius_customize_control_color_palettes' );

/**
 * Theme default colors and fonts
 *
 * @since 1.0
 * @access public
 * @param string $key return a specific key value, else the entire defaults array
 * @return array|string
 */
if ( !function_exists( 'olius_default_style' ) ) :
function olius_default_style( $key = false ){
	// Used by customizer-options.php, as well as customize-preview.js
	$defaults = apply_filters( 'olius_default_style', array(
		'accent_color'               => '#7ea844',
		'accent_font'                => '#ffffff',
		'button_color'               => '#7ea844',
		'button_font'                => '#ffffff',
		'module_bg_default'          => '#ffffff',
		'module_fontcolor_default'   => '#666666',
		'article_background_type'    => 'background-whensidebar',
		'article_background_color'   => '#ffffff',
		'box_background'             => '#f8f8f8',
		'site_background'            => '#f8f8f8',
		'sidebar_width_px'           => 350,
		'sidebar_width_pcnt'         => 25,
		'goto_top_offset'            => array( 'desktop' => 60, 'tablet' => 30, 'mobile' => 10 ),
		'widgetmargin'               => array( 'desktop' => 50, 'tablet' => 40, 'mobile' => 30 ),
		'sticky_sitehead_dtp_logozoom' => 65,
		'sticky_sitehead_mob_logozoom' => 50,
		'topann_content_bg'          => '#ffffffbf', // 75% opacity
		'topann_content_color'       => '#333333',
		'logotype'                   => 'text',
		'site_title_icon_size'       => 50,
		'logo_image_width'           => array( 'desktop' => 350, 'tablet' => 300, 'mobile' => 150 ),
		'logo_custom_line_font'      => 45,
		'logo_fontface'              => 'fontpt',
		'logo_fontface_style'        => 'standardi',
		'headings_fontface'          => 'fontpt',
		'headings_fontface_style'    => 'standardi',
		'subheadings_fontface'       => 'fontpt',
		'subheadings_fontface_style' => 'standardi',
		'body_fontface'              => 'fontpo',
		'frontpage_sectionbg_flexstretch' => 0,
		'footer_flexstretch'         => 0,
		'article_maxwidth'           => 800,
		'article_maxwidth_nosidebar' => 1400,
	) );

	if ( $key )
		return ( isset( $defaults[ $key ] ) ) ? $defaults[ $key ] : false;
	else
		return $defaults;
}
endif;

/**
 * Build the Customizer options (panels, sections, settings)
 *
 * Always remember to mention specific priority for non-static options like:
 *     - options being added based on a condition (eg: if woocommerce is active)
 *     - options which may get removed (eg: logo_size, headings_fontface)
 *     - options which may get rearranged (eg: logo_background_type, box_background_color)
 *     This will allow other options inserted with priority to be inserted at
 *     their intended place.
 *
 * @since 1.0
 * @access public
 * @return array
 */
if ( !function_exists( 'olius_customizer_options' ) ) :
function olius_customizer_options() {

	// Stores all the settings to be added
	$settings = array();

	// Stores all the sections to be added
	$sections = array();

	// Stores all the panels to be added
	$panels = array();

	// Theme default colors and fonts
	extract( olius_default_style() );

	// Directory path for radioimage buttons
	$imagepath =  hoot_data()->incuri . 'admin/images/';

	// Logo Font Options for Lite version
	$logofont = apply_filters( 'olius_options_logofont', array(
					'heading'  => esc_html__( "Logo Font (set in 'Typography' section)", 'olius' ),
					'heading2' => esc_html__( "Heading Font (set in 'Typography' section)", 'olius' ),
					'standard' => esc_html__( "Standard Body Font", 'olius' ),
					) );
	$fontfaces = hoot_themefonts('options');

	/*** Add Options (Panels, Sections, Settings) ***/

	/** Section **/

	$section = 'links';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Demo Install / Support', 'olius' ),
		'priority'    => '2',
	);

	$lcontent = array();
	if ( ! class_exists( 'HootKit' ) && !defined( 'OLIUS_PREMIUM_VERSION' ) && !defined( 'HOOT_PREMIUM_VERSION' ) ) :
		$lcontent['premium'] = '<a class="hoot-cust-link hoot-cust-prolink" href="' .
				 esc_url( hoot_dashboard( 'url', array( 'tab' => 'premium' ) ) ) .
				 '" target="_blank"><span class="hoot-cust-link-head">' .
				 '<i class="fas fa-heart"></i> ' .
				 esc_html__( "View Premium Features", 'olius') .
				 '</span><span class="hoot-cust-link-desc">' .
				 esc_html__( "Supercharge your theme experience with premium features.", 'olius') .
				 '</span></a>';
	endif;
	$lcontent['demo'] = '<a class="hoot-cust-link" href="' .
				 olius_abouttag('urldemo') .
				 '" target="_blank"><span class="hoot-cust-link-head">' .
				 '<i class="fas fa-eye"></i> ' .
				 esc_html__( "Preview Demo", 'olius') . 
				 '</span><span class="hoot-cust-link-desc">' .
				 esc_html__( "View the Demo Site to preview the theme features and options.", 'olius') .
				 '</span></a>';
	$himplink = class_exists( 'HootImport' ) ? admin_url( 'themes.php?page=hoot-import' ) : hoot_dashboard( 'url', array( 'tab' => 'plugins' ) );
	$lcontent['install'] = '<a class="hoot-cust-link" href="' .
				 esc_url( $himplink ) .
				 '" target="_blank"><span class="hoot-cust-link-head">' .
				 '<i class="fas fa-upload"></i> ' .
				 esc_html__( "1 Click Demo Content Import", 'olius') . 
				 '</span><span class="hoot-cust-link-desc">' .
				 esc_html__( "Install demo content to make your site look exactly like the Demo Site. Use it as a starting point instead of starting from scratch.", 'olius') .
				 '</span></a>';
	$lcontent['support'] = '<a class="hoot-cust-link" href="' .
				 esc_url( hoot_dashboard( 'url', array( 'tab' => 'qstart' ) ) ) .
				 '" target="_blank"><span class="hoot-cust-link-head">' .
				 '<i class="far fa-life-ring"></i> ' .
				 esc_html__( "Documentation / Support", 'olius') . 
				 '</span><span class="hoot-cust-link-desc">' .
				 esc_html__( "Get theme related support for both free and premium users.", 'olius') .
				 '</span></a>';
	$lcontent['rateus'] = '<a class="hoot-cust-link" href="' .
				 'https://wordpress.org/support/theme/olius/reviews/#new-post' .
				 '" target="_blank"><span class="hoot-cust-link-head">' .
				 '<i class="fas fa-star"></i> ' .
				 esc_html__( "Rate Us", 'olius') . 
				 '</span><span class="hoot-cust-link-desc">' .
				 /* Translators: five stars */
				 sprintf( esc_html__( 'If you are happy with the theme, please give us a %1$s rating on WordPress.org. Thanks in advance!', 'olius'), '<span style="color:#0073aa;">&#9733;&#9733;&#9733;&#9733;&#9733;</span>' ) .
				 '</span></a>';

	$settings['linksection'] = array(
		'section'     => $section,
		'type'        => 'content',
		'priority'    => '10', // Non static options must have a priority
		'content'     => implode( ' ', apply_filters( 'olius_customizer_option_linksection', $lcontent ) ),
	);

	/** Section **/

	$section = 'hootshead-su';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Setup', 'olius' ),
		'priority'    => '5',
	);

	$settings['su_settings'] = array(
		'section'     => $section,
		'type'        => 'content',
		'content'     => '',
		'priority'    => '1111',
	);

	/** Section **/

	/** Section **/

	$section = 'logo';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Logo', 'olius' ),
		'priority'    => '10',
	);

	$logo_custom_line_options = array(
		'text' => array(
			'label'       => esc_html__( 'Line Text', 'olius' ),
			'type'        => 'text',
		),
		'font' => array(
			'label'       => esc_html__( 'Line Font', 'olius' ),
			'type'        => 'select',
			'choices'     => $logofont,
			'default'     => 'heading',
		),
		'size' => array(
			'label'       => esc_html__( 'Line Font Size', 'olius' ),
			'type'        => 'betterrange',
			'displaysuffix' => 'px',
			'default'     => $logo_custom_line_font,
			'input_attrs' => array(
				'min'  => 10,
				'max'  => 200,
				'step' => 1,
			),
		),
	);

	$settings['logo_ops'] = array(
		'section'     => $section,
		'type'        => 'tabs',
		'headingtabs' => true,
		'disablejstoggle' => true,
		'priority'    => '20',
		'options'     => array(
			'logo' => array(

				'logo' => array(
					'label'       => esc_html__( 'Site Logo', 'olius' ),
					'type'        => 'radio',
					'choices'     => array(
						'text'        => esc_html__( 'Default Text (Site Title)', 'olius' ),
						'custom'      => esc_html__( 'Custom Text', 'olius' ),
						'image'       => esc_html__( 'Image Logo', 'olius' ),
						'mixed'       => esc_html__( 'Image &amp; Default Text (Site Title)', 'olius' ),
						'mixedcustom' => esc_html__( 'Image &amp; Custom Text', 'olius' ),
					),
					'default'     => $logotype,
					/* Translators: 1 is the link start markup, 2 is link markup end */
					'description' => sprintf( esc_html__( 'Default Text is the %1$sSite Title%2$s set in WordPress Settings', 'olius' ), '<a href="' . esc_url( admin_url('options-general.php') ) . '" data-cust-linksection="title_tagline" target="_blank">', '</a>' ),
					'priority'    => '25',
					'selective_refresh' => array( 'logo_partial', array(
						'selector'            => '#branding',
						'settings'            => array( 'logo', 'custom_logo' ),
						'primary_setting'     => 'logo', // Redundant as 'logo' is first ID in settings array
						'render_callback'     => 'olius_branding',
						'container_inclusive' => true,
						) ),
				),

				'site_title_icon' => array(
					'label'           => esc_html__( 'Site Title Icon (Optional)', 'olius' ),
					'betooltip'       => esc_html__( 'Leave empty to hide icon.', 'olius' ),
					'type'            => 'icon',
					'priority'    => '30',
					'active_callback' => 'olius_callback_site_title_icon',
					'transport' => 'postMessage',
				),

				'site_title_icon_size' => array(
					'boxdivi'         => false,
					'label'           => esc_html__( 'Site Title Icon Size', 'olius' ),
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => $site_title_icon_size,
					'showreset'       => $site_title_icon_size,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 350,
						'step' => 1,
					),
					'priority'    => '35',
					'active_callback' => 'olius_callback_site_title_icon',
					'transport' => 'postMessage',
				),

				'logo_image_width' => array(
					'boxdivi'         => false,
					'label'           => esc_html__( 'Maximum Image Width', 'olius' ),
					'betooltip'       => esc_html__( 'The logo width may be adjusted automatically by the browser depending on title length and space available.', 'olius' ),
					'type'            => 'betterrange',
					'mediaquery'      => true,
					'displaysuffix'   => 'px',
					'input_attrs' => array(
						'min'  => 50,
						'max'  => 1380,
						'step' => 10,
					),
					'priority'        => '40', // Keep it with custom_logo->priority logo
					'default'         => $logo_image_width,
					'showreset'       => $logo_image_width,
					'active_callback' => 'olius_callback_logo_image_width',
					'transport' => 'postMessage',
				),

				'logo_custom' => array(
					'label'           => esc_html__( 'Custom Logo Text', 'olius' ),
					'betooltip'   => array( 'desctip' => 'info' ),
					'type'            => 'sortlist',
					/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
					'description'     => sprintf( esc_html__( 'Use &lt;em&gt; &lt;b&gt; and &lt;i&gt; tags in "Line Text" fields below to emphasize different words with color / bold / italics. Example:%1$s%2$s&lt;em&gt; wpHoot &lt;/em&gt;%3$s Accent Color %1$s%2$s&lt;b&gt; Olius &lt;/b&gt;%3$s Bold %1$s%2$s&lt;i&gt; Theme &lt;/i&gt;%3$s Italics %1$s%2$s&lt;b&gt; &lt;i&gt; Title &lt;/i&gt; &lt;/b&gt;%3$s Bold + Italics %1$s', 'olius' ), '<hr>', '<code>', '</code>' ),
					'choices'         => array(
						'line1' => esc_html__( 'Line 1', 'olius' ),
						'line2' => esc_html__( 'Line 2', 'olius' ),
						'line3' => esc_html__( 'Line 3', 'olius' ),
						'line4' => esc_html__( 'Line 4', 'olius' ),
					),
					'default'     => array(
						'line1'  => array( 'text' => wp_kses_post( __( '<em>wpHoot</em>', 'olius' ) ), 'size' => 20, 'font' => 'standard' ),
						'line2'  => array( 'text' => wp_kses_post( __( 'Hoot <b>Olius</b>', 'olius' ) ), 'size' => 50 ),
						'line3'  => array( 'sortitem_hide' => 1, 'font' => 'standard' ),
						'line4'  => array( 'sortitem_hide' => 1, ),
					),
					'options'         => array(
						'line1' => $logo_custom_line_options,
						'line2' => $logo_custom_line_options,
						'line3' => $logo_custom_line_options,
						'line4' => $logo_custom_line_options,
					),
					'attributes'      => array(
						'hideable'   => true,
						'sortable'   => false,
					),
					'priority'    => '45',
					'active_callback' => 'olius_callback_logo_custom',
					'transport' => 'postMessage',
				),

			),
			'tagline' => array(
				'show_tagline' => array(
					'label'           => esc_html__( 'Show Tagline', 'olius' ),
					/* Translators: 1 is the link start markup, 2 is link markup end */
					'description'     => sprintf( esc_html__( 'Display %1$sSite Description%2$s as tagline below logo.', 'olius' ), '<a href="' . esc_url( admin_url('options-general.php') ) . '" data-cust-linksection="title_tagline" target="_blank">', '</a>' ),
					'type'            => 'bettertoggle',
					'default'         => 1,
					'priority'    => '50',
					'transport' => 'postMessage',
				),
			),
			'style' => array(
				'logotypo_conastipnote' => array(
					'type'        => 'content',
					'class'       => 'hootnote hootnote--tip',
					'content'     => sprintf( esc_html__( 'Logo Font options are available in the %1$sTypography%2$s section.', 'olius' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=typography' ) ) . '" rel="focuslink" data-focustype="section" data-href="typography">', '</a>' ),
					'priority'    => '55',
				),
				'logo_background_type' => array(
					'label'       => esc_html__( 'Logo Background', 'olius' ),
					'type'        => 'radio',
					'priority'    => '65', // Non static options must have a priority
					'choices'     => array(
						'transparent'   => esc_html__( 'None', 'olius' ),
						'accent'        => esc_html__( 'Accent Background', 'olius' ),
						'invert-accent' => esc_html__( 'Invert Accent Background', 'olius' ), // Implemented for possible child themes;
					),
					'default'     => 'transparent',
					'transport' => 'postMessage',
				),
				'logo_border' => array(
					'label'       => esc_html__( 'Logo Border', 'olius' ),
					'betooltip'   => esc_html__( 'Display a border around logo.', 'olius' ),
					'type'        => 'radio',
					'default'     => 'none',
					'priority'    => '70',
					'choices'     => array(
						'none'        => esc_html__( 'None', 'olius' ),
						'border'      => esc_html__( 'Border (With padding)', 'olius' ),
						'bordernopad' => esc_html__( 'Border (No padding)', 'olius' ),
					),
					'transport' => 'postMessage',
				),
			),
		),
	);
	if ( !apply_filters( 'logo_background_type_invert_accent', false ) )
		unset( $settings['logo_ops']['options']['style']['logo_background_type']['choices']['invert-accent'] );

	/** Section **/

	$section = 'layout';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Site Layout', 'olius' ),
		'priority'    => '15',
	);

	$settings['site_layout_headline'] = array(
		'label'       => esc_html__( 'Site Layout', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '100',
	);

	$settings['site_layout'] = array(
		'label'       => esc_html__( 'Site Layout - Boxed vs Stretched', 'olius' ),
		'betooltip'   => esc_html__( 'On larger screens, the Boxed layout contains the site content within a fixed-width box, leaving the Site Background visible on the sides.', 'olius' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'boxed'   => esc_html__( 'Boxed layout', 'olius' ),
			'stretch' => esc_html__( 'Stretched layout', 'olius' ),
		),
		'default'     => 'stretch',
		'priority'    => '110',
		'transport' => 'postMessage',
	);

	$settings['sidebar_headline'] = array(
		'label'       => esc_html__( 'Sidebars', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '120',
	);

	$settings['disable_sticky_sidebar'] = array(
		'label'       => esc_html__( 'Enable Sticky Sidebar', 'olius' ),
		'betooltip'   => esc_html__( 'Keeps the sidebar fixed while scrolling. Useful when the page content is longer than the sidebar, so the sidebar remains visible instead of leaving empty space.', 'olius' ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'inverttoggle'=> true,
		'priority'    => '130',
	);

	$settings['sidebar_tabs'] = array(
		'section'     => $section,
		'type'        => 'tabs',
		'priority'    => '140',
		'options'     => array(
			'width' => array(
				'sidebar1_width' => array(
					'label'       => esc_html__( 'Primary Sidebar', 'olius' ),
					'type'        => 'select',
					'choices'     => array(
						'auto' => esc_html__( 'auto', 'olius'),
						'px'   => esc_html__( 'pixels', 'olius'),
						'pcnt' => esc_html__( '%age', 'olius'),
					),
					'default'     => 'auto',
					'transport' => 'postMessage',
				),
				'sidebar1_width_px' => array(
					'boxdivi'     => false,
					'type'        => 'betterrange',
					'displaysuffix' => 'px',
					'input_attrs' => array(
						'min'  => 100,
						'max'  => 600,
						'step' => 5,
					),
					'default'     => $sidebar_width_px,
					'showreset'   => $sidebar_width_px,
					'transport' => 'postMessage',
					'active_callback' => 'olius_callback_sb1w_px',
				),
				'sidebar1_width_pcnt' => array(
					'boxdivi'     => false,
					'type'        => 'betterrange',
					'displaysuffix' => '%',
					'input_attrs' => array(
						'min'  => 20,
						'max'  => 75,
						'step' => 1,
					),
					'default'     => $sidebar_width_pcnt,
					'showreset'   => $sidebar_width_pcnt,
					'transport' => 'postMessage',
					'active_callback' => 'olius_callback_sb1w_pcnt',
				),
				'sidebar2_width' => array(
					'label'       => esc_html__( 'Secondary Sidebar', 'olius' ),
					// 'description' => esc_html__( '(for 2 column layouts)', 'olius' ),
					'type'        => 'select',
					'choices'     => array(
						'auto' => esc_html__( 'auto', 'olius'),
						'px'   => esc_html__( 'pixels', 'olius'),
						'pcnt' => esc_html__( '%age', 'olius'),
					),
					'default'     => 'auto',
					'transport' => 'postMessage',
				),
				'sidebar2_width_px' => array(
					'boxdivi'     => false,
					'type'        => 'betterrange',
					'displaysuffix' => 'px',
					'input_attrs' => array(
						'min'  => 100,
						'max'  => 600,
						'step' => 5,
					),
					'default'     => $sidebar_width_px,
					'showreset'   => $sidebar_width_px,
					'transport' => 'postMessage',
					'active_callback' => 'olius_callback_sb2w_px',
				),
				'sidebar2_width_pcnt' => array(
					'boxdivi'     => false,
					'type'        => 'betterrange',
					'displaysuffix' => '%',
					'input_attrs' => array(
						'min'  => 20,
						'max'  => 75,
						'step' => 1,
					),
					'default'     => $sidebar_width_pcnt,
					'showreset'   => $sidebar_width_pcnt,
					'transport' => 'postMessage',
					'active_callback' => 'olius_callback_sb2w_pcnt',
				),
			),
			'layout' => array(
				'sblayoutpnote' => array( 'type' => 'note' ),
				'sidebar' => array(
					'label'       => esc_html__( 'Default (Site wide)', 'olius' ),
					'betooltip'   => esc_html__( 'Set the default sidebar for your entire site.', 'olius' ),
					'type'        => 'radioimage',
					'choices'     => array(
						'narrow-right'       => $imagepath . 'sidebar-narrow-right.png',
						'narrow-left'        => $imagepath . 'sidebar-narrow-left.png',
						'narrow-left-right'  => $imagepath . 'sidebar-narrow-left-right.png',
						'narrow-left-left'   => $imagepath . 'sidebar-narrow-left-left.png',
						'narrow-right-right' => $imagepath . 'sidebar-narrow-right-right.png',
						'full-width'         => $imagepath . 'sidebar-full.png',
						'none'               => $imagepath . 'sidebar-none.png',
					),
					'default'     => 'narrow-right',
				),
				'sidebar_fp' => array(
					'label'       => esc_html__( 'Front Page', 'olius' ),
					/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
					'betooltip'   => sprintf( esc_html__( 'This is sidebar for the "Homepage Content" Module in %1$sFrontpage Modules Settings%2$s', 'olius' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=frontpage' ) ) . '" rel="focuslink" data-focustype="section" data-href="frontpage">', '</a>' ),
					'type'        => 'radioimage',
					'choices'     => array(
						'narrow-right'       => $imagepath . 'sidebar-narrow-right.png',
						'narrow-left'        => $imagepath . 'sidebar-narrow-left.png',
						'narrow-left-right'  => $imagepath . 'sidebar-narrow-left-right.png',
						'narrow-left-left'   => $imagepath . 'sidebar-narrow-left-left.png',
						'narrow-right-right' => $imagepath . 'sidebar-narrow-right-right.png',
						'full-width'         => $imagepath . 'sidebar-full.png',
						'none'               => $imagepath . 'sidebar-none.png',
					),
					'default'     => ( ( 'page' == get_option('show_on_front' ) ) ? 'full-width' : 'narrow-right' ),
				),
				'sidebar_archives' => array(
					'label'       => esc_html__( 'Blog/Archives', 'olius' ),
					'type'        => 'radioimage',
					'choices'     => array(
						'narrow-right'       => $imagepath . 'sidebar-narrow-right.png',
						'narrow-left'        => $imagepath . 'sidebar-narrow-left.png',
						'narrow-left-right'  => $imagepath . 'sidebar-narrow-left-right.png',
						'narrow-left-left'   => $imagepath . 'sidebar-narrow-left-left.png',
						'narrow-right-right' => $imagepath . 'sidebar-narrow-right-right.png',
						'full-width'         => $imagepath . 'sidebar-full.png',
						'none'               => $imagepath . 'sidebar-none.png',
					),
					'default'     => 'narrow-right',
				),
				'sidebar_pages' => array(
					'label'       => esc_html__( 'Single Pages', 'olius' ),
					'type'        => 'radioimage',
					'choices'     => array(
						'narrow-right'       => $imagepath . 'sidebar-narrow-right.png',
						'narrow-left'        => $imagepath . 'sidebar-narrow-left.png',
						'narrow-left-right'  => $imagepath . 'sidebar-narrow-left-right.png',
						'narrow-left-left'   => $imagepath . 'sidebar-narrow-left-left.png',
						'narrow-right-right' => $imagepath . 'sidebar-narrow-right-right.png',
						'full-width'         => $imagepath . 'sidebar-full.png',
						'none'               => $imagepath . 'sidebar-none.png',
					),
					'default'     => 'narrow-right',
				),
				'sidebar_posts' => array(
					'label'       => esc_html__( 'Single Posts', 'olius' ),
					'type'        => 'radioimage',
					'choices'     => array(
						'narrow-right'       => $imagepath . 'sidebar-narrow-right.png',
						'narrow-left'        => $imagepath . 'sidebar-narrow-left.png',
						'narrow-left-right'  => $imagepath . 'sidebar-narrow-left-right.png',
						'narrow-left-left'   => $imagepath . 'sidebar-narrow-left-left.png',
						'narrow-right-right' => $imagepath . 'sidebar-narrow-right-right.png',
						'full-width'         => $imagepath . 'sidebar-full.png',
						'none'               => $imagepath . 'sidebar-none.png',
					),
					'default'     => 'narrow-right',
				),
			),
		),
	);

	if ( current_theme_supports( 'woocommerce' ) ) :

		$settings['sidebar_tabs']['options']['layout']['sidebar_wooshop'] = array(
			'label'       => esc_html__( 'Woocommerce - Shop/Archives', 'olius' ),
			'betooltip'   => esc_html__( 'Set the default sidebar width and position for WooCommerce Shop and Archives pages like product categories etc.', 'olius' ),
			'type'        => 'radioimage',
			'choices'     => array(
				'narrow-right'       => $imagepath . 'sidebar-narrow-right.png',
				'narrow-left'        => $imagepath . 'sidebar-narrow-left.png',
				'narrow-left-right'  => $imagepath . 'sidebar-narrow-left-right.png',
				'narrow-left-left'   => $imagepath . 'sidebar-narrow-left-left.png',
				'narrow-right-right' => $imagepath . 'sidebar-narrow-right-right.png',
				'full-width'         => $imagepath . 'sidebar-full.png',
				'none'               => $imagepath . 'sidebar-none.png',
			),
			'default'     => 'narrow-right',
		);

		$settings['sidebar_tabs']['options']['layout']['sidebar_wooproduct'] = array(
			'label'       => esc_html__( 'Woocommerce - Single Product Page', 'olius' ),
			'betooltip'   => esc_html__( 'Set the default sidebar width and position for WooCommerce product page', 'olius' ),
			'type'        => 'radioimage',
			'choices'     => array(
				'narrow-right'       => $imagepath . 'sidebar-narrow-right.png',
				'narrow-left'        => $imagepath . 'sidebar-narrow-left.png',
				'narrow-left-right'  => $imagepath . 'sidebar-narrow-left-right.png',
				'narrow-left-left'   => $imagepath . 'sidebar-narrow-left-left.png',
				'narrow-right-right' => $imagepath . 'sidebar-narrow-right-right.png',
				'full-width'         => $imagepath . 'sidebar-full.png',
				'none'               => $imagepath . 'sidebar-none.png',
			),
			'default'     => 'narrow-right',
		);

	endif;

	$settings['widgetlayout_headline'] = array(
		'label'       => esc_html__( 'Widgets', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '143',
	);

	$settings['widgetmargin'] = array(
		'label'       => esc_html__( 'Widget Margin', 'olius' ),
		'betooltip'   => esc_html__( '(in pixels) Margin space above and below widgets.', 'olius' ),
		'section'     => $section,
		'type'        => 'betterrange',
		'mediaquery'  => true,
		'displaysuffix' => 'px',
		'input_attrs' => array(
			'min'  => 0,
			'max'  => 150,
			'step' => 1,
		),
		'default'     => $widgetmargin,
		'showreset'   => $widgetmargin,
		'priority'    => '145',
		'transport' => 'postMessage',
	);

	/** Section **/

	$section = 'general';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'General', 'olius' ),
		'priority'    => '20',
	);

	$settings['gototop_headline'] = array(
		'label'       => esc_html__( 'Goto Top', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '150',
	);

	$settings['disable_goto_top'] = array(
		'label'       => esc_html__( "Enable 'Goto Top' Button", 'olius' ),
		'betooltip'   => esc_html__( 'Check this to show "Top" button (bottom right of screen) when a user scrolls down the page.', 'olius' ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'inverttoggle'=> true,
		'priority'    => '160',
		'transport' => 'postMessage',
	);
	$settings['goto_top_mobile'] = array(
		'boxdivi'     => 'div-ve10',
		'description' => esc_html__( 'Show on mobile', 'olius' ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 1,
		'priority'    => '170',
		'active_callback' => 'olius_callback_goto_top',
		'transport' => 'postMessage',
	);
	$settings['goto_top_icon'] = array(
		'boxdivi'     => 'div-ve10',
		'description' => esc_html__( 'Icon:', 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'fa-angle-double-up fas'     => array( '<i class="fa-angle-double-up fas"></i>' ),
			'fa-chevron-up fas'          => array( '<i class="fa-chevron-up fas"></i>' ),
			'fa-arrow-up fas'            => array( '<i class="fa-arrow-up fas"></i>' ),
			'fa-caret-up fas'            => array( '<i class="fa-caret-up fas"></i>' ),
			'fa-level-up-alt fas'        => array( '<i class="fa-level-up-alt fas"></i>' ),
			'fa-sort-amount-up-alt fas'  => array( '<i class="fa-sort-amount-up-alt fas"></i>' ),
		),
		'default'     => 'fa-chevron-up fas',
		'priority'    => '180',
		'active_callback' => 'olius_callback_goto_top',
		'transport' => 'postMessage',
	);
	$gototopiconclass = get_theme_mod( 'goto_top_icon', $settings['goto_top_icon']['default'] );
	$settings['goto_top_icon_style'] = array(
		'boxdivi'     => false,
		'description' => esc_html__( 'Style:', 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'style1'  => array( '<span class="gotostyle_s gotostyle1"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Dark', 'olius' ) ),
			'style2'  => array( '<span class="gotostyle_s gotostyle2"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Light', 'olius' ) ),
			'style3'  => array( '<span class="gotostyle_s gotostyle3"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Accent Color', 'olius' ) ),
			'style4'  => array( '<span class="gotostyle_s gotostyle4"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Invert Accent', 'olius' ) ),
			'style5'  => array( '<span class="gotostyle_c gotostyle5"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Dark', 'olius' ) ),
			'style6'  => array( '<span class="gotostyle_c gotostyle6"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Light', 'olius' ) ),
			'style7'  => array( '<span class="gotostyle_c gotostyle7"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Accent Color', 'olius' ) ),
			'style8'  => array( '<span class="gotostyle_c gotostyle8"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Invert Accent', 'olius' ) ),
		),
		'default'     => 'style7',
		'priority'    => '190',
		'active_callback' => 'olius_callback_goto_top',
		'transport' => 'postMessage',
	);
	$settings['goto_top_offset'] = array(
		'boxdivi'     => false,
		'description' => esc_html__( 'Offset from bottom', 'olius' ),
		'section'     => $section,
		'type'        => 'betterrange',
		'mediaquery'  => true,
		'displaysuffix' => 'px',
		'input_attrs' => array(
			'min'  => 0,
			'max'  => 150,
			'step' => 5,
		),
		'default'     => $goto_top_offset,
		'showreset'   => $goto_top_offset,
		'priority'    => '200',
		'active_callback' => 'olius_callback_goto_top',
		'transport' => 'postMessage',
	);

	$settings['anim_headline'] = array(
		'label'       => esc_html__( 'Animations', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '210',
	);
	$animdescription = esc_html__( 'Switch off to disable all animations on the site. This includes effects on hover, effects when items enter/leave view etc.', 'olius' );
	$settings['enable_anims'] = array(
		'label'       => esc_html__( 'Enable Animations', 'olius' ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 1,
		'priority'    => '220',
		'description' => $animdescription,
	);
	$animchoices = array(
		'h00' => array( esc_html__( 'General:', 'olius' ) ),
			'sscroll'     => esc_html__( 'Smooth Scroll on Desktop (Lenis)', 'olius' ),
			'stickyhead'  => esc_html__( 'Animate Sticky Header when it appears', 'olius' ),
			'aos'         => esc_html__( 'Animate elements when they come into view - Desktop', 'olius' ) . '<em>' . esc_html__( '* preview not available in Customizer', 'olius' ) . '</em>',
			'aosmob'      => esc_html__( 'Animate elements when they come into view - Mobile', 'olius' ) . '<em>' . esc_html__( '* preview not available in Customizer', 'olius' ) . '</em>',
			'imghov'      => esc_html__( 'Image Hover effect', 'olius' ),
		'h01' => array( esc_html__( 'Goto Top:', 'olius' ) ),
			'waygototop'  => esc_html__( 'Show Goto Top button after user has scrolled down a bit', 'olius' ),
			'animgototop' => esc_html__( 'Smooth scroll to top on button click', 'olius' ),
		'h02' => array( esc_html__( 'Posts/Pages/Archives:', 'olius' ) ),
			'pagehead'    => esc_html__( 'Animate Header Featured Image when user scrolls down', 'olius' ),
			'ajaxpaginate'=> esc_html__( 'Pagination links loads next set of posts while staying on page (These are page links on Blog, Archives and on Paginated Posts)', 'olius' ),
		'h03' => array( esc_html__( 'Posts:', 'olius' ) ),
			'prevnext'    => esc_html__( 'Briefly show previous/next posts (flyout types) when user reaches end of post.', 'olius' ),
		'h04' => array( esc_html__( 'Auto Scrolls **', 'olius' ) ),
			'scrollhash'  => esc_html__( 'Auto Scroll to #hash in the link url', 'olius' ),
			'scrollmain'  => esc_html__( 'Auto Scroll down to main content of page when a link is clicked', 'olius' ),
	);
	$animdefaults = 'sscroll, stickyhead, aos, aosmob, imghov, waygototop, animgototop, pagehead, ajaxpaginate, prevnext, scrollhash, scrollmain';
	$settings['enabled_anims'] = array(
		'boxdivi'     => 'div-ve20',
		'section'     => $section,
		'type'        => 'checkbox',
		'choices'     => $animchoices,
		'default'     => $animdefaults,
		'priority'    => '230',
		'active_callback' => 'olius_callback_enabled_anims',
	);

	$settings['autoscroll_scope'] = array(
		'label'       => esc_html__( '** Auto Scrolls', 'olius' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'sitewide'   => esc_html__( 'Apply to links throughout the site', 'olius' ),
			'menu'       => esc_html__( 'Apply to links only in the menu', 'olius' ),
			'menu-posts' => esc_html__( 'Apply to links in menu, archives and post content', 'olius' ),
		),
		'description' => esc_html__( 'Auto scroll is executed when a user clicks on a link within the site to navigate to a part of the site.', 'olius' ),
		'default'     => 'sitewide',
		'priority'    => '240',
		'transport' => 'postMessage',
		'active_callback' => 'olius_callback_autoscroll',
	);

	/** Panel **/

	/** Section **/

	$section = 'hootshead-sc';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Sections', 'olius' ),
		'priority'    => '25',
	);

	$settings['sc_settings'] = array(
		'section'     => $section,
		'type'        => 'content',
		'content'     => '',
		'priority'    => '1111',
	);

	/** Section **/

	$section = 'topannounce';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Top Announcement', 'olius' ),
		'priority'    => '30',
	);

	$settings['topann_conastipnote'] = array(
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hootnote hootnote--info',
		'content'     => esc_html__( 'This area is displayed at the top of the site above everything else. It can be used for displaying site-wide announcements.', 'olius' ),
		'priority'    => '270',
	);

	$settings['topann_sticky'] = array(
		'label'       => esc_html__( 'Stick to Top on scroll down', 'olius' ),
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'betooltip'   => array( 'alert', sprintf( esc_html__( 'For the best user experience, we recommend keeping only one sticky element at the top - either the Announcement or the %1$sSticky Header%2$s.', 'olius' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=stickysitehead' ) ) . '" rel="focuslink" data-focustype="section" data-href="stickysitehead">', '</a>' ) ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 0,
		'priority'    => '280',
		'transport' => 'postMessage',
	);

	$settings['topann_ops'] = array(
		'section'     => $section,
		'type'        => 'tabs',
		'headingtabs' => true,
		'disablejstoggle' => true,
		'priority'    => '290',
		'options'     => array(
			'image' => array(
				'topann_image' => array(
					'label'       => esc_html__( 'Image', 'olius' ),
					'type'        => 'image',
					'transport' => 'postMessage', // to work with 'selective_refresh' added via 'topann_content'
				),
				'topann_imgasbg' => array(
					'boxdivi'     => 'div-ve10',
					'type'        => 'bettercheckbox',
					'description' => esc_html__( 'Set Image as background', 'olius' ),
					'default'     => 1,
					'transport' => 'postMessage',
				),
				'topann_imgstretch' => array(
					'boxdivi'     => 'div-ve15',
					'type'        => 'bettercheckbox',
					'description' => esc_html__( 'Stretch Image to full width', 'olius' ),
					'default'     => 1,
					'active_callback' => 'olius_callback_topann_imgstretch',
					'transport' => 'postMessage',
				),
			),
			'link' => array(
				'topann_url' => array(
					'label'       => esc_html__( 'Link URL', 'olius' ),
					'type'        => 'url',
					'input_attrs' => array( 'placeholder' => 'https://' ),
					'transport' => 'postMessage',
				),
				'topann_url_target' => array(
					'boxdivi'     => 'div-ve10',
					'type'        => 'bettercheckbox',
					'description' => esc_html__( 'Open link in new window?', 'olius' ),
					'transport' => 'postMessage',
				),
				'topann_url_scope' => array(
					'label'       => esc_html__( 'Link URL Scope', 'olius' ),
					'type'        => 'radio',
					'choices'     => array(
						'background' => esc_html__( 'Entire Top Area', 'olius' ),
						'content'    => esc_html__( 'Only Content Box', 'olius' ),
					),
					'default'     => 'background',
					'transport' => 'postMessage',
				),
			),
			'content' => array(

				'topann_content_stretch' => array(
					'label'       => esc_html__( 'Content Box Size - Default vs Stretched', 'olius' ),
					'type'        => 'radioimage',
					'choices'     => array(
						'grid'    => $imagepath . 'topann-content-style-1.png',
						'stretch' => $imagepath . 'topann-content-style-2.png',
					),
					'default'     => 'grid',
					'transport' => 'postMessage',
				),
				'topann_content_nopad' => array(
					'boxdivi'     => 'div-ve15',
					'type'        => 'bettercheckbox',
					// 'default'     => 1,
					'description' => esc_html__( 'Remove paddings / spaces at corners?', 'olius' ),
					'active_callback' => 'olius_callback_topann_content_nopad',
					'transport' => 'postMessage',
				),
				'topann_content_style' => array(
					'label'       => esc_html__( 'Content Style', 'olius' ),
					'type'        => 'select',
					'choices'     => array(
						'dark'            => esc_html__( 'Dark Font', 'olius' ),
						'light'           => esc_html__( 'Light Font', 'olius' ),
						'dark-on-light'   => esc_html__( 'Dark Font / Light Background', 'olius' ),
						'light-on-dark'   => esc_html__( 'Light Font / Dark Background', 'olius' ),
						'custom'          => esc_html__( 'Custom Colors', 'olius' ),
					),
					'default'     => 'dark-on-light',
					'transport' => 'postMessage',
				),
				'topann_content_customcolor' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Custom Background / Font', 'olius' ),
					'type'            => 'color',
					'hasalpha'    => array( true, false ),
					'multi'       => array( 'topann_content_bg', 'topann_content_color' ),
					'default'     => array( $topann_content_bg, $topann_content_color ),
					'active_callback' => 'olius_callback_topann_content_bg',
					'transport' => 'postMessage',
				),
				'topann_content_title' => array(
					'label'       => esc_html__( 'Content Title', 'olius' ),
					'type'        => 'text',
					'transport' => 'postMessage', // to work with 'selective_refresh' added via 'topann_content'
				),
				'topann_content' => array(
					'label'       => esc_html__( 'Content Text (HTML)', 'olius' ),
					'betooltip'   => array( 'desctip' => 'info' ),
					'type'        => 'text',
					'selective_refresh' => array( 'topann_content_partial', array(
						'selector'            => '#topann',
						'settings'            => array( 'topann_content', 'topann_content_title', 'topann_image' ),
						'render_callback'     => 'olius_topann',
						'container_inclusive' => true,
						) ),
				),

			),
		),
	);
	$settings['topann_ops']['options']['content']['topann_content']['description'] = '<strong>' . esc_html__( 'Insert Timer', 'olius' ) . '</strong> ' .
		(
			class_exists( 'HootKit' ) ?
			/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
			sprintf( esc_html__( 'You can add a HootKit timer to your content using shortcode. The values are the %1$send time%2$s', 'olius' ), '<span style="text-decoration:underline">', '</span>' ) .
			/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
			'<code class="codeblock">' . sprintf( esc_html__( '[HKtimer year="%1$s2029%2$s" month="%1$s12%2$s" day="%1$s31%2$s" hour="%1$s23%2$s" minute="%1$s59%2$s"]', 'olius' ), '<span style="text-decoration:underline">', '</span>' ) . '</code>'
			: sprintf( esc_html__( '%1$sInstall HootKit plugin%2$s to add a timer to your content.', 'olius' ), '<a href="' . esc_url( hoot_dashboard( 'url', array( 'tab' => 'plugins' ) ) ) .'" target="_blank">', '</a>' )
		);

	/** Section **/

	$section = 'topbar';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Top Bar', 'olius' ),
		'priority'    => '35',
	);

	$settings['topbar_conastipnote'] = array(
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hootnote hootnote--info',
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'content'     => sprintf( esc_html__( 'To display this area, add widgets to %1$sTopbar Left/Right%2$s areas.%3$s%4$sNote: This area will be center aligned if only one of the Left/Right areas contains widgets.%5$s', 'olius' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[panel]=widgets' ) ) . '" rel="focuslink" data-focustype="panel" data-href="widgets">', '</a>', '<hr>', '<em>', '</em>' ),
		'priority'    => '410',
	);

	$settings['topbar_grid'] = array(
		'label'       => esc_html__( 'Stretch Topbar Content to cover full available width', 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'boxed'   => $imagepath . 'topbar-layout-boxed.png',
			'stretch' => $imagepath . 'topbar-layout-stretch.png',
		),
		'default'     => 'boxed',
		'priority'    => '420',
		'transport' => 'postMessage',
	);

	/** Section **/

	$section = 'sitehead';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Header Layout', 'olius' ),
		'priority'    => '40',
	);

	$settings['logo_side_headline'] = array(
		'label'       => esc_html__( 'Display Header Side Widget Area', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '430',
		'active_callback' => 'olius_callback_logo_side',
	);
	$settings['logo_side'] = array(
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'widget-area' => esc_html__( "Logo (left) + 'Header Side' widget area (right)", 'olius' ),
			'none'        => esc_html__( 'Logo (center)', 'olius' ),
		),
		'default'     => 'none',
		'priority'    => '440',
		'active_callback' => 'olius_callback_logo_side',
		'selective_refresh' => array( 'logo_side_partial', array(
			'selector'            => '#sitehead-aside',
			'settings'            => array( 'logo_side' ),
			'render_callback'     => 'olius_sitehead_aside',
			'container_inclusive' => true,
			'fallback_refresh'    => false, // prevents full refresh on non applicable views
			) ),
	);

	$settings['sitehead_menu_headline'] = array(
		'label'       => esc_html__( 'Header Menu', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '450',
	);

	$settings['menu_location'] = array(
		'label'       => esc_html__( 'Menu Location', 'olius' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'top'        => esc_html__( 'Above Logo', 'olius' ),
			'side'       => esc_html__( 'Header Side (Right of Logo)', 'olius' ),
			'bottom'     => esc_html__( 'Below Logo', 'olius' ),
			'none'       => esc_html__( 'Do not display menu', 'olius' ),
		),
		'default'     => 'bottom',
		'priority'    => '460',
		'transport' => 'postMessage',
	);

	$settings['fullwidth_menu_align'] = array(
		'label'       => esc_html__( 'Menu Area alignment', 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'left'     => array( '<span class="dashicons dashicons-editor-alignleft"></span>' ),
			'center'   => array( '<span class="dashicons dashicons-editor-aligncenter"></span>' ),
			'right'    => array( '<span class="dashicons dashicons-editor-alignright"></span>' ),
		),
		'default'     => 'center',
		'priority'    => '470',
		'active_callback' => 'olius_callback_menu_align',
		'transport' => 'postMessage',
	);

	$settings['disable_table_menu'] = array(
		'label'       => esc_html__( 'Single Line Menu', 'olius' ),
		/* Translators: 1 is line break 2 is image */
		'betooltip'   => sprintf( esc_html__( 'Enable this to "shrink" menu items to always fit in 1 single line.%1$sIf there are too many menu items to fit in one line, disabling this will let them flow to a second line.%2$s', 'olius' ), '<hr>', "<hr><img src='{$imagepath}menu-table.png'>" ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 1,
		'priority'    => '480',
		'active_callback' => 'olius_callback_menu_misc',
		'transport' => 'postMessage',
	);

	$settings['mobile_menu_label'] = array(
		'label'       => esc_html__( 'Mobile Menu Label', 'olius' ),
		'betooltip'   => esc_html__( 'This label appears next to the menu toggle button on mobile screens', 'olius' ),
		'section'     => $section,
		'type'        => 'text',
		'default'     => esc_html__( 'Menu', 'olius' ),
		'priority'    => '490',
		'active_callback' => 'olius_callback_menu_misc',
		'transport' => 'postMessage',
	);

	$settings['mobile_submenu_click'] = array(
		'label'       => esc_html__( "[Mobile Menu] Submenu opens on 'Click'", 'olius' ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 1,
		/* Translators: %s is line break. */
		'betooltip' => sprintf( esc_html__( "Uncheck this option to make all Submenus appear in 'Open' state.%sBy default, submenus open on clicking (i.e. single tap on mobile).", 'olius' ), '<hr>' ),
		'priority'    => '500',
		'active_callback' => 'olius_callback_menu_misc',
		'transport' => 'postMessage',
	);

	/** Section **/

	$section = 'stickysitehead';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Header Sticky', 'olius' ),
		'priority'    => '45',
	);

	$settings['sticky_accent'] = array(
		'label'       => esc_html__( 'Color Scheme', 'olius' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'default' => esc_html__( 'Default', 'olius' ),
			'accent'  => esc_html__( 'Use Accent Color', 'olius' ),
		),
		'default'     => 'default',
		'priority'    => '505',
		'transport' => 'postMessage',
	);

	$settings['sticky_ops'] = array(
		'section'     => $section,
		'type'        => 'tabs',
		'headingtabs' => true,
		'disablejstoggle' => true,
		'priority'    => '510',
		'options'     => array(
			'desktop' => array(

				'sticky_sitehead_dtp' => array(
					'label'       => esc_html__( 'Enable Sticky Header on Desktop', 'olius' ),
					'betooltip'   => esc_html__( 'Check this to display a fixed Header at top when a user scrolls down the page.', 'olius' ),
					'type'        => 'bettertoggle',
					'default'     => 1,
					'transport' => 'postMessage',
				),
				'sticky_sitehead_dtp_layout' => array(
					'label'       => esc_html__( 'Sticky Header on Desktop', 'olius' ),
					'type'        => 'radio',
					'choices'     => array(
						'topbar'       => esc_html__( 'Topbar', 'olius' ),
						'logo'         => esc_html__( 'Logo', 'olius' ),
						'menu'         => esc_html__( 'Menu', 'olius' ),
						'text'         => esc_html__( 'Text', 'olius' ),
						'logomenu'     => esc_html__( 'Logo (left) + Menu (right)', 'olius' ),
						'logomenudiv'  => esc_html__( 'Logo (top) + Menu (bottom)', 'olius' ),
						'logotext'     => esc_html__( 'Logo (left) + Text (right)', 'olius' ),
						'logotextdiv'  => esc_html__( 'Logo (top) + Text (bottom)', 'olius' ),
						'logomenutext' => esc_html__( 'Logo (left) + Menu (right) + Text (bottom)', 'olius' ),
					),
					'default'     => 'logomenu',
					'active_callback' => 'olius_callback_sticky_dtp',
					'transport' => 'postMessage',
				),
				'sticky_sitehead_dtp_layout_conastipnote' => array(
					'boxdivi'     => false,
					'type'        => 'content',
					/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
					'content'    => sprintf( esc_html__( '%1$s%3$sMenu wil be displayed if "Do not display Menu" is Not selected in %5$sHeader Layout%6$s section.%4$s%3$sTopbar will be displayed if you have widgets in Topbar widget areas.%4$s%2$s', 'olius' ), '<ul style="margin-top:-15px">', '</ul>', '<li>', '</li>', '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=sitehead' ) ) . '" rel="focuslink" data-focustype="section" data-href="sitehead">', '</a>' ),
					'active_callback' => 'olius_callback_sticky_dtp',
				),
				'sticky_sitehead_dtp_logozoom' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Logo Size (desktop sticky)', 'olius' ),
					'type'        => 'betterrange',
					'displaysuffix' => '%',
					'default'       => $sticky_sitehead_dtp_logozoom,
					'showreset'     => $sticky_sitehead_dtp_logozoom,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 100,
						'step' => 1,
					),
					'active_callback' => 'olius_callback_sticky_dtp_logo',
					'transport' => 'postMessage',
				),
				'sticky_sitehead_dtp_text' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Custom Text (desktop sticky)', 'olius' ),
					'type'        => 'textarea',
					'active_callback' => 'olius_callback_sticky_dtp_text',
					'selective_refresh' => array( 'sticky_dtp_text_partial', array(
						'selector'            => '#sitehead-extradtp',
						'settings'            => array( 'sticky_sitehead_dtp_text' ),
						'render_callback'     => 'olius_sitehead_extra_dtp',
						'container_inclusive' => true,
						'fallback_refresh'    => true, // prevents full refresh on non applicable views
						) ),
				),

			),
			'mobile' => array(

				'sticky_sitehead_mob' => array(
					'label'       => esc_html__( 'Enable Sticky Header on Mobile', 'olius' ),
					'betooltip'   => esc_html__( 'Check this to display a fixed Header at top when a user scrolls down the page.', 'olius' ),
					'type'        => 'bettertoggle',
					'default'     => 1,
					'transport' => 'postMessage',
				),
				'sticky_sitehead_mob_layout' => array(
					'label'       => esc_html__( 'Sticky Header on Mobile', 'olius' ),
					'type'        => 'radio',
					'choices'     => array(
						'topbar'       => esc_html__( 'Topbar', 'olius' ),
						'logo'         => esc_html__( 'Logo', 'olius' ),
						'menu'         => esc_html__( 'Menu', 'olius' ),
						'menuleft'     => esc_html__( 'Menu (left)', 'olius' ), // XTRA
						'menuright'    => esc_html__( 'Menu (right)', 'olius' ), // XTRA
						'text'         => esc_html__( 'Text', 'olius' ),
						'logomenu'     => esc_html__( 'Logo (left) + Menu (right)', 'olius' ),
						'menulogo'     => esc_html__( 'Menu (left) + Logo (right)', 'olius' ),
						'logotext'     => esc_html__( 'Logo (left) + Text (right)', 'olius' ),
						'logotextdiv'  => esc_html__( 'Logo (top) + Text (bottom)', 'olius' ),
						'logomenutext' => esc_html__( 'Logo (left) + Menu (right) + Text (bottom)', 'olius' ),
					),
					'default'     => 'logomenu',
					'active_callback' => 'olius_callback_sticky_mob',
					'transport' => 'postMessage',
				),
				'sticky_sitehead_mob_layout_conastipnote' => array(
					'boxdivi'     => false,
					'type'        => 'content',
					/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
					'content'    => sprintf( esc_html__( '%1$s%3$sTopbar will be displayed if you have widgets in Topbar widget areas.%4$s%2$s', 'olius' ), '<ul style="margin-top:-15px">', '</ul>', '<li>', '</li>' ),
				),
				'sticky_sitehead_mob_logozoom' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Logo Size (mobile sticky)', 'olius' ),
					'type'        => 'betterrange',
					'displaysuffix' => '%',
					'default'       => $sticky_sitehead_mob_logozoom,
					'showreset'     => $sticky_sitehead_mob_logozoom,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 100,
						'step' => 1,
					),
					'active_callback' => 'olius_callback_sticky_mob_logo',
					'transport' => 'postMessage',
				),
				'sticky_sitehead_mob_text' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Custom Text (mobile sticky)', 'olius' ),
					'type'        => 'textarea',
					'active_callback' => 'olius_callback_sticky_mob_text',
					'selective_refresh' => array( 'sticky_mob_text_partial', array(
						'selector'            => '#sitehead-extramob',
						'settings'            => array( 'sticky_sitehead_mob_text' ),
						'render_callback'     => 'olius_sitehead_extra_mob',
						'container_inclusive' => true,
						'fallback_refresh'    => true, // prevents full refresh on non applicable views
						) ),
				),

			),
		),
	);

	/** Section **/

	$section = 'belowsitehead';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Below Header', 'olius' ),
		'priority'    => '50',
	);

	$settings['below_sitehead_conastipnote'] = array(
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hootnote hootnote--info',
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'content'     => sprintf( esc_html__( 'To display this area, add widgets to %1$sBelow Header Left/Right%2$s areas.%3$s%4$sNote: This area will be center aligned if only one of the Left/Right areas contains widgets.%5$s', 'olius' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[panel]=widgets' ) ) . '" rel="focuslink" data-focustype="panel" data-href="widgets">', '</a>', '<hr>', '<em>', '</em>' ),
		'priority'    => '520',
	);

	$settings['below_sitehead_display'] = array(
		'label'       => esc_html__( "Enable 'Below Header' area on following pages", 'olius' ),
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'description' => sprintf( esc_html__( 'TIP: You can add a breadcrumb widget in this area by installing a plugin like %1$sBreadcrumb NavXT%2$s.', 'olius' ), '<a href="' . esc_url( admin_url( 'plugin-install.php?s=Breadcrumb%2520NavXT&tab=search&type=term' ) ) . '" target="_blank">', '</a>' ),
		'section'     => $section,
		'type'        => 'checkbox',
		'choices'     => array(
			'home'      => esc_html__( 'Home Page', 'olius' ),
			'blog'      => esc_html__( 'Blog Page', 'olius' ),
			'archive'   => esc_html__( 'Archive Page (Categories, Tags etc)', 'olius' ),
			'posts'     => esc_html__( 'Single Post Page', 'olius' ),
			'pages'     => esc_html__( 'Single Page', 'olius' ),
			'search'    => esc_html__( 'Search Results Page', 'olius' ),
			'notfound'  => esc_html__( '404 Page', 'olius' ),
		),
		'default'     => 'home, blog, search, archive, posts, pages, notfound',
		'priority'    => '525',
	);
	if ( current_theme_supports( 'woocommerce' ) ) :
		$settings['below_sitehead_display']['choices'] = array_merge(
			$settings['below_sitehead_display']['choices'],
			array(
				'h01'         => array( esc_html__( 'WooCommerce:', 'olius' ) ),
				'shop'        => esc_html__( 'Shop Page', 'olius' ),
				'product'     => esc_html__( 'Single Product Page', 'olius' ),
				'shoparchive' => esc_html__( 'Product Archive Page (Categories, Tags etc)', 'olius' ),
				'cart'        => esc_html__( 'Cart Page', 'olius' ),
				'checkout'    => esc_html__( 'Checkout Page', 'olius' ),
				'account'     => esc_html__( 'My Account Page', 'olius' ),
			)
		);
		$settings['below_sitehead_display']['default'] .= ', shop, product, shoparchive, cart, checkout, account';
	endif;

	$settings['below_sitehead_grid'] = array(
		'label'       => esc_html__( "Stretch 'Below Header' content to cover full available width", 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'boxed'   => $imagepath . 'fp-widgetarea-boxed.png',
			'stretch' => $imagepath . 'fp-widgetarea-stretch.png',
		),
		'default'     => 'boxed',
		'priority'    => '530',
		'transport' => 'postMessage',
	);

	/** Section **/

	$section = 'footer';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Footer', 'olius' ),
		'priority'    => '55',
	);

	$settings['subfooter_headline'] = array(
		'label'       => esc_html__( 'Sub Footer', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '540',
	);

	$settings['subfooter_conastipnote'] = array(
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hootnote hootnote--info',
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'content'     => sprintf( esc_html__( 'To display this area, add widgets to %1$sSub Footer%2$s widget area.', 'olius' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[panel]=widgets' ) ) . '" rel="focuslink" data-focustype="panel" data-href="widgets">', '</a>' ),
		'priority'    => '550',
	);

	$settings['footer_headline'] = array(
		'label'       => esc_html__( 'Footer', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '560',
	);

	$settings['footer'] = array(
		'label'       => esc_html__( 'Footer Layout Columns', 'olius' ),
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'betooltip'   => sprintf( esc_html__( 'To add content to Footer columns, add widgets to %1$sFooter widget areas%2$s', 'olius' ), '<a href="' . esc_url( admin_url('widgets.php') ) . '" target="_blank">', '</a>' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'1-1' => $imagepath . '1-1.png',
			'2-1' => $imagepath . '2-1.png',
			'2-2' => $imagepath . '2-2.png',
			'2-3' => $imagepath . '2-3.png',
			'3-1' => $imagepath . '3-1.png',
			'3-2' => $imagepath . '3-2.png',
			'3-3' => $imagepath . '3-3.png',
			'3-4' => $imagepath . '3-4.png',
			'4-1' => $imagepath . '4-1.png',
			'5-1' => $imagepath . '5-1.png',
			'3-5' => $imagepath . '3-5.png',
			'4-2' => $imagepath . '4-2.png',
			'5-2' => $imagepath . '5-2.png',
			'6-2' => $imagepath . '6-2.png',
			'3-6' => $imagepath . '3-6.png',
			'4-3' => $imagepath . '4-3.png',
			'5-3' => $imagepath . '5-3.png',
			'6-3' => $imagepath . '6-3.png',
		),
		'default'     => '4-1',
		'priority'    => '570',
		'transport' => 'postMessage',
	);

	$settings['footer_flexstretch'] = array(
		'boxdivi'     => false,
		'description' => esc_html__( 'Try to space widgets vertically for a more symmetrical look.', 'olius' ),
		'betooltip'   => '<img src="' . $imagepath . 'flexstretch.png">',
		'type'        => 'checkbox',
		'default'     => $footer_flexstretch,
		'transport' => 'postMessage',

		'section'     => $section,
		'priority'    => '575',
	);

	$settings['postfooter_headline'] = array(
		'label'       => esc_html__( 'Post Footer', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '590',
	);

	$settings['postfooter_text'] = array(
		'label'       => esc_html__( 'Post Footer Text', 'olius' ),
		'betooltip'   => array( 'desctip' => 'info' ),
		'section'     => $section,
		'type'        => 'textarea',
		'default'     => esc_html__( '<!--default--> &copy; <!--year-->', 'olius'),
		'priority'    => '600',
		'selective_refresh' => array( 'postfooter_partial', array(
			'selector'            => '#post-footer',
			'settings'            => array( 'postfooter_text' ),
			'render_callback'     => 'olius_postfooter',
			'container_inclusive' => true,
			'fallback_refresh'    => false, // prevents full refresh on non applicable views
			) ),
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'description' => sprintf( esc_html__( 'This can be useful for showing copyright info etc.
		%1$s
		%3$sUse the %5$s&lt;!--default--&gt;%6$s tag to show the default Info Text.%4$s
		%3$sUse the %5$s&lt;!--year--&gt;%6$s tag to insert the current year.%4$s
		%3$sAlways use %7$sHTML codes%8$s for symbols. For example, the HTML for &copy; is %5$s&amp;copy;%6$s
		%4$s
		%2$s
		', 'olius' ),
			'<ul>', '</ul>',
			'<li>', '</li>',
			'<mark>', '</mark>',
			'<a href="http://ascii.cl/htmlcodes.htm" target="_blank">', '</a>' ),
	);

	/** Section **/

	$section = 'hootshead-st';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Styling', 'olius' ),
		'priority'    => '60',
	);

	$settings['st_settings'] = array(
		'section'     => $section,
		'type'        => 'content',
		'content'     => '',
		'priority'    => '1111',
	);

	/** Section **/

	$section = 'colors';

	// Redundant as 'colors' section is added by WP. But we still add it for brevity
	$sections[ $section ] = array(
		'title'       => esc_html__( 'Colors / Backgrounds', 'olius' ),
		'priority'    => '65',
	);

	$settings['colorspnote'] = array(
		'section'     => $section,
		'priority'    => '620',
	);

	$presets_arr = array(
		'default'    => array( 'accent_color' => $accent_color, 'accent_font' => $accent_font ),
		'dgreen'     => array( 'accent_color' => '#458700', 'accent_font' => '#ffffff' ),
		'aqua'       => array( 'accent_color' => '#38b295', 'accent_font' => '#ffffff' ),
		'blue'       => array( 'accent_color' => '#0d99e9', 'accent_font' => '#ffffff' ),
		'rblue'      => array( 'accent_color' => '#107cdb', 'accent_font' => '#ffffff' ),
		'brown'      => array( 'accent_color' => '#614c23', 'accent_font' => '#ffffff' ),
		'black'      => array( 'accent_color' => '#222222', 'accent_font' => '#ffffff' ),
		'maroon'     => array( 'accent_color' => '#ad2929', 'accent_font' => '#ffffff' ),
		'red'        => array( 'accent_color' => '#db0000', 'accent_font' => '#ffffff' ),
		'orange'     => array( 'accent_color' => '#e27500', 'accent_font' => '#ffffff' ),
		'gold'       => array( 'accent_color' => '#db970f', 'accent_font' => '#ffffff' ),
	);
	$presets = '';
	foreach ( $presets_arr as $key => $value ) {
		$value['button_color'] = $value['accent_color'];
		$value['button_font'] = $value['accent_font'];
		$q1 = !empty( $value['accent_color'] ) ? $value['accent_color'] : '#ccc';
		$q2 = !empty( $value['accent_font'] ) ? $value['accent_font'] : $q1;
		$q3 = !empty( $value['some_color1'] ) ? $value['some_color1'] : $q2;
		$q4 = !empty( $value['some_color2'] ) ? $value['some_color2'] : $q1;
		$presets .= '<div class="hoot-qd" data-preset="' . esc_attr( json_encode( $value ) ) . '">' .
						'<div class="hoot-qd1" style="background:'.esc_attr($q1).';border-color:'.esc_attr($q1).'"></div>' .
						'<div class="hoot-qd2" style="background:'.esc_attr($q2).';border-color:'.esc_attr($q2).'"></div>' .
						'<div class="hoot-qd3" style="background:'.esc_attr($q3).';border-color:'.esc_attr($q3).'"></div>' .
						'<div class="hoot-qd4" style="background:'.esc_attr($q4).';border-color:'.esc_attr($q4).'"></div>' .
					'</div>';
	}
	$settings['style_presets'] = array(
		'label'       => esc_html__( 'Presets:', 'olius' ),
		'description' => esc_html__( 'Applying these presets will modify the color settings below.', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'content'     => '<div class="hoot-style-presets">' . $presets . '</div>',
		'priority'    => '630',
	);

	$settings['accent_color_font'] = array(
		'label'       => esc_html__( 'Accent Color / Font', 'olius' ),
		'section'     => $section,
		'type'        => 'color',
		'multi'       => array( 'accent_color', 'accent_font' ),
		'default'     => array( $accent_color, $accent_font ),
		'priority'    => '640',
		'transport' => 'postMessage',
	);

	$settings['button_color_font'] = array(
		'label'       => esc_html__( 'Button Color / Font', 'olius' ),
		'section'     => $section,
		'type'        => 'color',
		'multi'       => array( 'button_color', 'button_font' ),
		'default'     => array( $button_color, $button_font ),
		'priority'    => '650',
		'transport' => 'postMessage',
	);

	$settings['background'] = array(
		'label'       => esc_html__( 'Site Background', 'olius' ),
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'betooltip'   => array( 'alert', sprintf( esc_html__( 'This background is more prominently visible when %1$sSite Layout%2$s option is set to %1$s"Boxed"%2$s in the %3$sSite Layout%4$s section.', 'olius' ), '<em>', '</em>', '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=layout' ) ) . '" rel="focuslink" data-focustype="section" data-href="layout">', '</a>' ) ),
		'section'     => $section,
		'type'        => 'betterbackground',
		'priority'    => '660',
		'default'     => array(
			'color'      => $site_background,
		),
		'transport' => 'postMessage',
	);

	$settings['box_background_color'] = array(
		'label'       => esc_html__( 'Site Content Background', 'olius' ),
		'section'     => $section,
		'type'        => 'color',
		'hasalpha'    => true,
		'priority'    => '670',
		'default'     => $box_background,
		'transport' => 'postMessage',
	);

	$settings['article_background_type'] = array(
		'label'       => esc_html__( 'Article Background - on individual Post/Pages', 'olius' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'transparent' => esc_html__( 'None', 'olius' ),
			'background'  => esc_html__( 'Background', 'olius' ),
			'background-whensidebar' => esc_html__( 'Background (only when page has a sidebar)', 'olius' ),
		),
		'default'     => $article_background_type,
		'description' => esc_html__( 'This background is applied behind main article text on a Post/Page', 'olius' ) . '<br /><img src="' . $imagepath . 'article-background.png">',
		'priority'    => '755',
		'transport' => 'postMessage',
	);
	$settings['article_background_color'] = array(
		'boxdivi'     => 'div-ve15',
		'section'     => $section,
		'type'        => 'color',
		'hasalpha'    => true,
		'circleswatch'=>false,
		'default'     => $article_background_color,
		'priority'    => '755',
		'active_callback' => 'olius_callback_article_background',
		'transport' => 'postMessage',
	);
	$settings['article_background_pnote'] = array(
		'boxdivi'     => 'div-ve15',
		'section'     => $section,
		'priority'    => '755',
	);

	/** Section **/

	$section = 'typography';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Typography', 'olius' ),
		'priority'    => '70',
	);

	$settings['typopnote'] = array(
		'section'     => $section,
		'priority'    => '680',
	);

	$settings['load_local_fonts'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Load webfonts locally', 'olius' ),
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'betooltip'   => array( 'invert' => true, '', sprintf( esc_html__( 'Enable this to load Google Fonts (if used) from your own site instead of Google servers.%1$s%2$sThis is required for GDPR compliance for EU visitors.%3$s', 'olius' ), '<hr>', '<em>', '</em>' ) ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 0,
		'priority'    => '690',
	);

	$settings['logo_size'] = array(
		'boxdivi'     => 'divbig',
		'label'       => esc_html__( 'Logo Text Size', 'olius' ),
		'section'     => $section,
		'type'        => 'select',
		'priority'    => '700', // Non static options must have a priority
		'choices'     => array(
			'tiny'   => esc_html__( 'Tiny', 'olius'),
			'small'  => esc_html__( 'Small', 'olius'),
			'medium' => esc_html__( 'Medium', 'olius'),
			'large'  => esc_html__( 'Large', 'olius'),
			'huge'   => esc_html__( 'Huge', 'olius'),
		),
		'default'     => 'medium',
		'active_callback' => 'olius_callback_logo_size',
		'transport' => 'postMessage',
	);

	$settings['logo_fontface'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Logo Font (Free Version)', 'olius' ),
		'section'     => $section,
		'type'        => 'select',
		'priority'    => '710', // Non static options must have a priority
		'choices'     => $fontfaces,
		'default'     => $logo_fontface,
	);

	$settings['logo_fontface_style'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Logo Font Style', 'olius' ),
		'section'     => $section,
		'type'        => 'select',
		'priority'    => '720', // Non static options must have a priority
		'choices'     => array(
			'standard'   => esc_html__( 'Standard', 'olius'),
			'standardi'  => esc_html__( 'Standard Italics', 'olius'),
			'uppercase'  => esc_html__( 'Uppercase', 'olius'),
			'uppercasei' => esc_html__( 'Uppercase Italics', 'olius'),
		),
		'default'     => $logo_fontface_style,
		'transport' => 'postMessage',
	);

	$settings['headings_fontface'] = array(
		'boxdivi'     => 'divbig',
		'label'       => esc_html__( 'Headings Font (Free Version)', 'olius' ),
		'section'     => $section,
		'type'        => 'select',
		'priority'    => '730', // Non static options must have a priority
		'choices'     => $fontfaces,
		'default'     => $headings_fontface,
	);

	$settings['headings_fontface_style'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Heading Font Style', 'olius' ),
		'section'     => $section,
		'type'        => 'select',
		'priority'    => '740', // Non static options must have a priority
		'choices'     => array(
			'standard'   => esc_html__( 'Standard', 'olius'),
			'standardi'  => esc_html__( 'Standard Italics', 'olius'),
			'uppercase'  => esc_html__( 'Uppercase', 'olius'),
			'uppercasei' => esc_html__( 'Uppercase Italics', 'olius'),
		),
		'default'     => $headings_fontface_style,
		'transport' => 'postMessage',
	);

	$settings['subheadings_fontface'] = array(
		'boxdivi'     => 'divbig',
		'label'       => esc_html__( 'Sub Headings Font (Free Version)', 'olius' ),
		'section'     => $section,
		'type'        => 'select',
		'priority'    => '750', // Non static options must have a priority
		'choices'     => $fontfaces,
		'default'     => $subheadings_fontface,
	);

	$settings['subheadings_fontface_style'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Sub Heading Font Style', 'olius' ),
		'section'     => $section,
		'type'        => 'select',
		'priority'    => '760', // Non static options must have a priority
		'choices'     => array(
			'standard'   => esc_html__( 'Standard', 'olius'),
			'standardi'  => esc_html__( 'Standard Italics', 'olius'),
			'uppercase'  => esc_html__( 'Uppercase', 'olius'),
			'uppercasei' => esc_html__( 'Uppercase Italics', 'olius'),
		),
		'default'     => $subheadings_fontface_style,
		'transport' => 'postMessage',
	);

	$settings['body_fontface'] = array(
		'boxdivi'     => 'divbig',
		'label'       => esc_html__( 'Body Font (Free Version)', 'olius' ),
		'section'     => $section,
		'type'        => 'select',
		'priority'    => '770', // Non static options must have a priority
		'choices'     => $fontfaces,
		'default'     => $body_fontface,
	);

	/** Section **/

	$section = 'hootshead-sa';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Site Areas', 'olius' ),
		'priority'    => '75',
	);

	$settings['sa_settings'] = array(
		'section'     => $section,
		'type'        => 'content',
		'content'     => '',
		'priority'    => '1111',
	);

	/** Section **/

	/** Section **/

	$section = 'header_image';

	$settings['header_image_conastipnote1'] = array(
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hootnote hootnote--alert',
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'content' => sprintf( esc_html__( 'This area is currently hidden. To display it, click the eye icon next to %3$s"Homepage Image"%4$s module in %1$sFrontpage Modules%2$s', 'olius' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=frontpage' ) ) . '" rel="focuslink" data-focustype="section" data-href="frontpage">', '</a>', '<strong>', '</strong>' ),
		'priority'    => '1',
	);
	$settings['header_image_conastipnote2'] = array(
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hootnote hootnote--info',
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'content' => sprintf( esc_html__( 'This area is currently visible. If you want to hide it, click the eye icon next to %3$s"Homepage Image"%4$s module in %1$sFrontpage Modules%2$s', 'olius' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=frontpage' ) ) . '" rel="focuslink" data-focustype="section" data-href="frontpage">', '</a>', '<strong>', '</strong>' ),
		'priority'    => '1',
	);

	$hktext = !class_exists( 'HootKit' ) ?
				sprintf( esc_html__( 'To replace this area with a Slider, please %1$sInstall HootKit plugin%2$s to add a Slider/Cover Widget to Frontpage Modules', 'olius' ), '<a href="' . esc_url( hoot_dashboard( 'url', array( 'tab' => 'plugins' ) ) ) .'" target="_blank">', '</a>' ) :
				sprintf( esc_html__( 'To replace this area with a Slider, you can use a %1$sHootKit Slider/Cover Widget%2$s in one of the Frontpage Modules', 'olius' ), '<a href="' . esc_url( admin_url( 'widgets.php' ) ) .'" target="_blank">', '</a>' );
	$settings['headerimg_hk_conastipnote'] = array(
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hootnote hootnote--tip',
		/* Translators: Link Tags */
		'content'     => $hktext,
		'priority'    => '1',
	);

	$settings['header_image_bg'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Background Color/Image', 'olius' ),
		'betooltip'   => array( 'tip', esc_html__( 'TIP: If you are using a background image, you can add a color overlay on it in the Style tab below.', 'olius' ) ),
		'section'     => $section,
		'type'        => 'color',
		'hasalpha'    => true,
		'default'     => $box_background,
		'transport' => 'postMessage',
		'priority'    => '1',
	);

	$settings['header_image_ops'] = array(
		'section'     => $section,
		'type'        => 'tabs',
		'headingtabs' => true,
		'disablejstoggle' => true,
		'priority'    => '780',
		'options'     => array(
			'content' => array(
				'header_image_feature' => array(
					'label'       => esc_html__( 'Feature Image', 'olius' ),
					'description' => esc_html__( 'To display this image, choose a layout that includes an image (see Style tab).', 'olius' ),
					'type'        => 'image',
					'default'     => hoot_data()->template_uri . 'images/placeholder.png',
					'transport' => 'postMessage',
				),
				'header_image_title' => array(
					'label'       => esc_html__( 'Heading', 'olius' ),
					'type'        => 'textarea',
					'default'     => esc_html__( 'Welcome to our Site', 'olius' ),
					'transport' => 'postMessage',
				),
				'header_image_subtitle' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Sub Heading', 'olius' ),
					'type'        => 'textarea',
					'default'     => esc_html__( 'Modify these settings from Customizer - Homepage Image section', 'olius' ),
					'transport' => 'postMessage',
				),
				'header_image_text' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Text', 'olius' ),
					'type'        => 'textarea',
					'transport' => 'postMessage',
					'selective_refresh' => array( 'header_image_text_partial', array(
						'selector'            => '#fpimg-text',
						'settings'            => array( 'header_image_text' ),
						'render_callback'     => 'olius_header_image_text',
						'container_inclusive' => true,
						'fallback_refresh'    => false, // prevents full refresh on non applicable views
						) ),
				),
				'header_image_button' => array(
					'label'       => esc_html__( 'Button 1 Text', 'olius' ),
					'type'        => 'text',
					'default'     => esc_html__( 'Know More', 'olius' ),
					'transport' => 'postMessage',
				),
				'header_image_url' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Button 1 URL', 'olius' ),
					'type'        => 'url',
					'default'     => esc_url( home_url() ),
					'input_attrs' => array(
						'placeholder' => esc_html__( 'https://', 'olius' ),
					),
					'transport' => 'postMessage',
				),
				'header_image_button2' => array(
					'label'       => esc_html__( 'Button 2 Text', 'olius' ),
					'type'        => 'text',
					'default'     => esc_html__( 'Know More', 'olius' ),
					'transport' => 'postMessage',
				),
				'header_image_url2' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Button 2 URL', 'olius' ),
					'type'        => 'url',
					'default'     => esc_url( home_url() ),
					'input_attrs' => array(
						'placeholder' => esc_html__( 'https://', 'olius' ),
					),
					'transport' => 'postMessage',
				),
			),
			'style' => array(

				'header_image_headlinelay' => array(
					'label'       => esc_html__( 'Layout', 'olius' ),
					'type'        => 'content',
					'class'       => 'hoot-headline2',
				),
				'header_image_layout' => array(
					'label'       => esc_html__( 'Layout (Text &amp; Feature Image)', 'olius' ),
					'type'        => 'radioimage',
					'choices' => array(
						// no content
						0    => $imagepath . 'headerimg-0.jpg',
						// content - centre, tc, bl, bc, br, ml, mr
						1    => $imagepath . 'headerimg-1.jpg',
						2    => $imagepath . 'headerimg-2.jpg',
						3    => $imagepath . 'headerimg-3.jpg',
						4    => $imagepath . 'headerimg-4.jpg',
						5    => $imagepath . 'headerimg-5.jpg',
						6    => $imagepath . 'headerimg-6.jpg',
						7    => $imagepath . 'headerimg-7.jpg',
						// img - centre , r(content-l), l(content-r)
						8    => $imagepath . 'headerimg-8.jpg',
						9    => $imagepath . 'headerimg-9.jpg',
						10   => $imagepath . 'headerimg-10.jpg',
					),
					'default'     => 4,
					'transport' => 'postMessage',
					'selective_refresh' => array( 'header_image_partial', array(
						'selector'            => '#frontpage-image',
						'settings'            => array(
							'header_image_layout',
							'header_image_feature', 'header_image_title', 'header_image_subtitle', 'header_image_text', 'header_image_button', 'header_image_button2',
						),
						'render_callback'     => 'olius_header_image',
						'container_inclusive' => true,
						'fallback_refresh'    => false, // prevents full refresh on non applicable views
						) ),
				),
				'header_image_minheight' => array(
					'label'       => esc_html__( 'Minimum Height', 'olius' ),
					'betooltip'   => sprintf( esc_html__( 'The height adjusts automatically to fit the background image you set above.%1$sIf the image is too short for the content, you can set a minimum height here.%1$sSet this to 0 to show the actual image height.', 'olius' ), '<hr>' ),
					'type'            => 'betterrange',
					'mediaquery'      => true,
					'displaysuffix'   => 'px',
					'default'         => array( 'desktop' => 300, 'tablet' => 200, 'mobile' => 200 ),
					'showreset'       => array( 'desktop' => 300, 'tablet' => 200, 'mobile' => 200 ),
					'input_attrs'     => array(
						'min'  => 0,
						'max'  => 1000,
						'step' => 10,
					),
					'active_callback' => 'olius_callback_header_image_minheight',
					'transport' => 'postMessage',
				),
				'header_image_conpad' => array(
					'label'       => esc_html__( 'Content Margin', 'olius' ),
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 15,
					'input_attrs'     => array(
						'min'  => 0,
						'max'  => 250,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),
				'header_image_imgpad' => array(
					'label'       => esc_html__( 'Feature Image Margin', 'olius' ),
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 15,
					'input_attrs'     => array(
						'min'  => 0,
						'max'  => 250,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),

				'header_image_headlinecon' => array(
					'label'       => esc_html__( 'Content', 'olius' ),
					'type'        => 'content',
					'class'       => 'hoot-headline2',
				),
				'header_image_headcolor' => array(
					'label'       => esc_html__( 'Heading Size / Color', 'olius' ),
					'type'            => 'color',
					'default'         => '#ffffff',
					'transport' => 'postMessage',
				),
				'header_image_headsize' => array(
					'boxdivi'     => 'div-ve10',
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 28,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 150,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),
				'header_image_subheadcolor' => array(
					'label'       => esc_html__( 'Sub Heading Size / Color', 'olius' ),
					'type'            => 'color',
					'default'         => '#ffffff',
					'transport' => 'postMessage',
				),
				'header_image_subheadsize' => array(
					'boxdivi'     => 'div-ve10',
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 15,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 150,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),
				'header_image_textcolor' => array(
					'label'       => esc_html__( 'Text Size / Color', 'olius' ),
					'type'            => 'color',
					'default'         => '#ffffff',
					'transport' => 'postMessage',
				),
				'header_image_textsize' => array(
					'boxdivi'     => 'div-ve10',
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 15,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 150,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),
				'header_image_btnsize' => array(
					'label'       => esc_html__( 'Button Text Size', 'olius' ),
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 15,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 150,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),
				'header_image_btn1style' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Button 1 Color / Font', 'olius' ),
					'description' => esc_html__( 'Leave empty for default', 'olius' ),
					'type'            => 'color',
					'hasalpha'    => array( true, false ),
					'multi'       => array( 'header_image_btnbg', 'header_image_btncolor' ),
					'transport' => 'postMessage',
				),
				'header_image_btn2style' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Button 2 Color / Font', 'olius' ),
					'description' => esc_html__( 'Leave empty for default', 'olius' ),
					'type'            => 'color',
					'hasalpha'    => array( true, false ),
					'multi'       => array( 'header_image_btnbg2', 'header_image_btncolor2' ),
					'transport' => 'postMessage',
				),

				'header_image_headlinebgs' => array(
					'label'       => esc_html__( 'Backgrounds', 'olius' ),
					'type'        => 'content',
					'class'       => 'hoot-headline2',
				),
				'header_image_conbg' => array(
					'label'       => esc_html__( 'Content Background', 'olius' ),
					'betooltip'   => esc_html__( 'Background for Heading, Sub Heading and Text', 'olius' ),
					'type'            => 'color',
					'hasalpha'        => true,
					'default'         => '#00000099',
					'transport' => 'postMessage',
				),
				'header_image_overlay' => array(
					'label'       => esc_html__( 'Background Image Overlay', 'olius' ),
					'betooltip'   => esc_html__( 'This overlay adds a semi-transparent color layer over the background image (if one is set above).', 'olius' ),
					'type'            => 'color',
					'hasalpha'        => true,
					'default'         => '#00000000',
					'transport' => 'postMessage',
				),

			),
		),
	);

	/** Section **/

	$section = 'frontpage';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Frontpage Modules', 'olius' ),
		'priority'    => '80',
	);

	if ( ! class_exists( 'HootKit' ) ) :
	$settings['fpmods_hk_conastipnote'] = array(
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hootnote hootnote--tip',
		/* Translators: Link Tags */
		'content'     => sprintf( esc_html__( 'To get the most out of this theme, please %1$sInstall HootKit plugin%2$s to add various Widgets and Sliders to Frontpage Modules', 'olius' ), '<a href="' . esc_url( hoot_dashboard( 'url', array( 'tab' => 'plugins' ) ) ) .'" target="_blank">', '</a>' ),
		'priority'    => '1',
	);
	endif;

	$settings['frontpage_sections_enable'] = array(
		'label'       => esc_html__( "Enable Frontpage 'Widget Areas'", 'olius' ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 1,
		'priority'    => '830',
		'transport' => 'postMessage',
	);

	$settings['frontpage_default_sections'] = array(
		'label'       => esc_html__( 'Default Frontpage', 'olius' ),
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'description' => sprintf( esc_html__( '%1$s%3$s%5$sHomepage Image:%6$s This shows the image you have set in %7$sHomepage Image%8$s section%4$s%3$s%5$sHomepage Content:%6$s This module shows the content you have set in %9$sHomepage Content%10$s section%11$s It shows your %5$sBlog Posts%6$s if you selected \'Your Latest Posts\'%12$s%11$s It shows the %5$sPage Content%6$s if you selected \'A static page\'%12$s%4$s%2$s', 'olius' ), '<ul>', '</ul>', '<li>', '</li>', '<strong>', '</strong>', '<a href="' . esc_url( admin_url( 'customize.php?autofocus[control]=header_image' ) ) . '" rel="focuslink" data-focustype="control" data-href="header_image">', '</a>', '<a href="' . esc_url( admin_url( 'customize.php?autofocus[control]=show_on_front' ) ) . '" rel="focuslink" data-focustype="control" data-href="show_on_front">', '</a>', '<p style="margin:5px 0 0">&#10148;', '</p>' ),
		'section'     => $section,
		'type'        => 'sortlist',
		'choices'     => array(
			'image'       => esc_html__( 'Homepage Image', 'olius' ),
			'content'     => esc_html__( 'Homepage Content', 'olius' ),
		),
		'options'     => array(),
		'attributes'  => array(
			'flypanel'      => false,
			'hideable'      => false,
			'sortable'      => true,
		),
		'priority'    => '840',
		'active_callback' => 'olius_callback_frontpage_default_sections',
	);

	$settings['frontpage_sections'] = array(
		'label'       => esc_html__( 'Frontpage Widget Areas', 'olius' ),
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'description' => sprintf( esc_html__( '%1$s%3$sSort different sections of the Frontpage in the order you want them to appear.%4$s%3$sYou can disable areas by clicking the "eye" icon. (This will hide them on the Widgets screen as well)%4$s%2$s', 'olius' ), '<ul>', '</ul>', '<li>', '</li>' ),
		'section'     => $section,
		'type'        => 'sortlist',
		'choices'     => array(
			'image'       => esc_html__( 'Homepage Image', 'olius' ),
			'area_a'      => esc_html__( 'Widget Area A', 'olius' ),
			'area_b'      => esc_html__( 'Widget Area B', 'olius' ),
			'area_c'      => esc_html__( 'Widget Area C', 'olius' ),
			'area_d'      => esc_html__( 'Widget Area D', 'olius' ),
			'content'     => esc_html__( 'Homepage Content', 'olius' ),
			'area_e'      => esc_html__( 'Widget Area E', 'olius' ),
			'area_f'      => esc_html__( 'Widget Area F', 'olius' ),
			'area_g'      => esc_html__( 'Widget Area G', 'olius' ),
			'area_h'      => esc_html__( 'Widget Area H', 'olius' ),
			'area_i'      => esc_html__( 'Widget Area I', 'olius' ),
			'area_j'      => esc_html__( 'Widget Area J', 'olius' ),
			'area_k'      => esc_html__( 'Widget Area K', 'olius' ),
			'area_l'      => esc_html__( 'Widget Area L', 'olius' ),
		),
		'default'     => array(
			'area_g'  => array( 'sortitem_hide' => 1, ),
			'area_h'  => array( 'sortitem_hide' => 1, ),
			'area_i'  => array( 'sortitem_hide' => 1, ),
			'area_j'  => array( 'sortitem_hide' => 1, ),
			'area_k'  => array( 'sortitem_hide' => 1, ),
			'area_l'  => array( 'sortitem_hide' => 1, ),
		),
		'options'     => array(),
		'attributes'  => array(
			'flypanel'      => true,
			'hideable'      => true,
			'sortable'      => true,
		),
		'priority'    => '850',
		'active_callback' => 'olius_callback_frontpage_sections',
		'transport' => 'postMessage',
	);

	$frontpagemodule_ops = apply_filters( 'olius_frontpage_widgetarea_sectionbg_index', array(
		'area_a'      => esc_html__( 'Widget Area A', 'olius' ),
		'area_b'      => esc_html__( 'Widget Area B', 'olius' ),
		'area_c'      => esc_html__( 'Widget Area C', 'olius' ),
		'area_d'      => esc_html__( 'Widget Area D', 'olius' ),
		'area_e'      => esc_html__( 'Widget Area E', 'olius' ),
		'area_f'      => esc_html__( 'Widget Area F', 'olius' ),
		'area_g'      => esc_html__( 'Widget Area G', 'olius' ),
		'area_h'      => esc_html__( 'Widget Area H', 'olius' ),
		'area_i'      => esc_html__( 'Widget Area I', 'olius' ),
		'area_j'      => esc_html__( 'Widget Area J', 'olius' ),
		'area_k'      => esc_html__( 'Widget Area K', 'olius' ),
		'area_l'      => esc_html__( 'Widget Area L', 'olius' ),
		'content'     => esc_html__( 'Homepage Content', 'olius' ),
		'image'       => esc_html__( 'Homepage Image', 'olius' ),
		) );

	foreach ( $frontpagemodule_ops as $fpgmodid => $fpgmodname ) {

		$settings["frontpage_sectionbg_{$fpgmodid}"] = array(
			'label'       => '',
			'section'     => $section,
			'type'        => 'group',
			'startwrap'   => 'fp-section-bg-button',
			'button'      => esc_html__( 'Module Background', 'olius' ),
			'options'     => array(
				'fpheading_conastipnote' => array(
					'boxdivi'     => false,
					'label'       => '',
					'type'        => 'content',
					'content'     => '<span class="hoot-module-bg-title">' . $fpgmodname . '</span>' . sprintf( esc_html__( '%1$sOnce you Publish settings here, you can %3$sadd widgets here%4$s%2$s', 'olius' ),
						'<p style="text-align:center;margin:3px 0 0;">', '</p>',
						'<br /><a href="' . esc_url( admin_url('widgets.php') ) . '" target="_blank">', '</a>'
					),
				),
			),
			'priority'    => '860',
		);

		if ( $fpgmodid === 'image' ) {
			$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['fpheading_conastipnote'] = array(
				'boxdivi'     => false,
				'type'        => 'content',
				/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
				'content'     => '<span class="hoot-module-bg-title">' . esc_html__( 'Homepage Image', 'olius' ) . '</span>' . sprintf( esc_html__( '%1$sThis module shows the image you have set in %3$sHomepage Image%4$s section%2$s', 'olius' ),
					'<p style="text-align:center;">', '</p>',
					'<a href="' . esc_url( admin_url( 'customize.php?autofocus[control]=header_image' ) ) . '" rel="focuslink" data-focustype="control" data-href="header_image" class="hoot-flypanel-close">', '</a>'
				),
			);
			continue;
		}

		if ( $fpgmodid === 'content' ) {
			$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['fpheading_conastipnote'] = array(
				'boxdivi'     => false,
				'type'        => 'content',
				/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
				'content'     => '<span class="hoot-module-bg-title">' . esc_html__( 'Homepage Content', 'olius' ) . '</span>' . sprintf( esc_html__( '%1$sThis module shows the content you have set in %3$sHomepage Content%4$s section%2$s%9$s%11$sIt shows your %7$sBlog Posts%8$s if you selected %3$sYour Latest Posts%4$s%12$s%11$sIt shows the %7$sPage Content%8$s if you selected %3$sA static page%4$s%12$s%10$s', 'olius' ),
					'<p>', '</p>',
					'<a href="' . esc_url( admin_url( 'customize.php?autofocus[control]=show_on_front' ) ) . '" rel="focuslink" data-focustype="control" data-href="show_on_front" class="hoot-flypanel-close">', '</a>',
					'<a href="' . esc_url( admin_url('options-reading.php') ) . '" target="_blank">', '</a>',
					'<strong>', '</strong>',
					'<ul>', '</ul>',
					'<li>', '</li>',
				),
			);
			$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['title'] = array(
				'label'       => esc_html__( 'Title (optional)', 'olius' ),
				'type'        => 'text',
				'transport' => 'postMessage',
			);
		} else {
			$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['columns'] = array(
				'label'   => esc_html__( 'Columns', 'olius' ),
				'type'    => 'select',
				'type'        => 'radioimage',
				'choices' => array(
					'100'         => $imagepath . '1-1.png',
					'50-50'       => $imagepath . '2-1.png',
					'33-66'       => $imagepath . '2-2.png',
					'66-33'       => $imagepath . '2-3.png',
					'25-75'       => $imagepath . '2-5.png',
					'75-25'       => $imagepath . '2-4.png',
					'33-33-33'    => $imagepath . '3-1.png',
					'25-25-50'    => $imagepath . '3-4.png',
					'25-50-25'    => $imagepath . '3-3.png',
					'50-25-25'    => $imagepath . '3-2.png',
					'25-25-25-25' => $imagepath . '4-1.png',
				),
				'default' => '100',
				'transport' => 'postMessage',
			);
		}

		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['layoutlabel'] = array(
			'label'       => esc_html__( 'Layout', 'olius' ),
			'type'        => 'content',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['grid'] = array(
			'boxdivi'     => 'div-ve20',
			'description' => esc_html__( 'Boxed vs. Full Width', 'olius' ),
			'betooltip'   => esc_html__( 'The full-width layout is ideal for displaying edge-to-edge slider widgets.', 'olius' ),
			'type'        => 'radioimage',
			'choices'     => array(
				'boxed'   => $imagepath . 'fp-widgetarea-boxed.png',
				'stretch' => $imagepath . 'fp-widgetarea-stretch.png',
			),
			'default'  => 'boxed',
			'transport' => 'postMessage',
		);
		if ( $fpgmodid !== 'content' ) {
			$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['flexstretch'] = array(
				'boxdivi'     => 'div-ve10',
				'description' => esc_html__( 'Try to space widgets vertically for a more symmetrical look.', 'olius' ),
				'betooltip'   => '<img src="' . $imagepath . 'flexstretch.png">',
				'type'        => 'checkbox',
				'default'     => $frontpage_sectionbg_flexstretch,
				'transport' => 'postMessage',
			);
		}

		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['type'] = array(
			'label'   => esc_html__( 'Background Type', 'olius' ),
			'type'    => 'radio',
			'choices' => array(
				'none'        => esc_html__( 'None', 'olius' ),
				'color'       => esc_html__( 'Color', 'olius' ),
				'image'       => esc_html__( 'Image', 'olius' ),
			),
			'default' => 'none',
			'transport' => 'postMessage',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['color'] = array(
			'boxdivi'     => 'div-ve10',
			'label'       => esc_html__( 'Background Color', 'olius' ),
			'type'        => 'color',
			'hasalpha'    => true,
			'displayinline'=>true,
			'default'     => $module_bg_default,
			'transport' => 'postMessage',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['image'] = array(
			'boxdivi'     => false,
			'label'       => esc_html__( 'Background Image', 'olius' ),
			'type'        => 'image',
			'transport' => 'postMessage',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['parallax'] = array(
			'boxdivi' => 'div-ve10', // if wpctrl=false below
			'label'   => esc_html__( 'Apply Parallax Effect to Background Image', 'olius' ),
			'type'    => 'checkbox',
			'wpctrl'  => true,
			'default' => 1,
			'transport' => 'postMessage',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['font'] = array(
			'label'   => esc_html__( 'Font Color', 'olius' ),
			'type'    => 'radio',
			'choices' => array(
				'theme'       => esc_html__( 'Default Theme Color', 'olius' ),
				'color'       => esc_html__( 'Custom Font Color', 'olius' ),
				'force'       => esc_html__( 'Force Custom Font Color', 'olius' ),
			),
			'default' => 'theme',
			'transport' => 'postMessage',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['fontcolor'] = array(
			'boxdivi'     => 'div-ve10',
			'label'       => esc_html__( 'Custom Font Color', 'olius' ),
			'type'        => 'color',
			'displayinline'=>true,
			'default'     => $module_fontcolor_default,
			'transport' => 'postMessage',
		);

	} // end foreach

	/** Section **/

	$section = 'archives';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Archives (Blog, Cats, Tags)', 'olius' ),
		'priority'    => '85',
	);

	$settings['archive_featured_image'] = array(
		'label'       => esc_html__( 'Archive Title Area Background', 'olius' ),
		'betooltip'   => array( 'invert' => true, '', esc_html__( 'Display featured image behind title area on archive pages like Blog page, Categories page, WooCommerce Shop page etc', 'olius' ) ),
		'section'     => $section,
		'type'        => 'select',
		'choices'     => array(
			'none'                => esc_html__( 'No Background', 'olius'),
			'staticheader-nocrop' => esc_html__( 'Featured Image (No Cropping)', 'olius'),
			'staticheader'        => esc_html__( 'Featured Image (Cropped)', 'olius'),
			'header'              => esc_html__( 'Featured Image (Parallax Effect)', 'olius'),
		),
		'default'     => 'staticheader',
		'priority'    => '870',
		'transport' => 'postMessage',
	);

	$settings['archive_type'] = array(
		'label'       => esc_html__( 'Archive (Blog) Layout', 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'big'          => $imagepath . 'archive-big.png',
			'block2'       => $imagepath . 'archive-block2.png',
			'block3'       => $imagepath . 'archive-block3.png',
			'mixed-block2' => $imagepath . 'archive-mixed-block2.png',
			'mixed-block3' => $imagepath . 'archive-mixed-block3.png',
		),
		'default'     => 'mixed-block2',
		'priority'    => '880',
	);

	$settings['archivetypepnote'] = array(
		'boxdivi'     => 'div-ve15',
		'section'     => $section,
		'priority'    => '890',
	);

	$settings['archive_post_meta'] = array(
		'label'       => esc_html__( 'Meta Information for Post List Items', 'olius' ),
		'betooltip'   => esc_html__( 'Check which information to display for each post item on the archive page.', 'olius' ),
		'section'     => $section,
		'type'        => 'sortlist',
		'choices'     => array(
			'author'   => esc_html__( 'Author', 'olius' ),
			'date'     => esc_html__( 'Date', 'olius' ),
			'cats'     => esc_html__( 'Categories', 'olius' ),
			'tags'     => esc_html__( 'Tags', 'olius' ),
			'comments' => esc_html__( 'No. of comments', 'olius' ),
		),
		'default'     => array(
			'tags' => array( 'sortitem_hide' => 1, ),
			'comments' => array( 'sortitem_hide' => 1, ),
		),
		'options'     => array(),
		'attributes'  => array(
			'hideable'      => true,
			'sortable'      => true,
			'ulclass'       => 'hoot-sortlist-multicheck',
		),
		'selective_refresh' => array( 'archive_post_meta_partial', array(
			'selector'            => '.blog .entry-byline, .home .entry-byline, .plural .entry-byline',
			'settings'            => array( 'archive_post_meta' ),
			'render_callback'     => 'olius_callback_archive_post_meta',
			'container_inclusive' => true,
			'fallback_refresh'    => false, // prevents full refresh on non applicable views
			) ),
		'priority'    => '900',
	);

	$settings['archive_post_content'] = array(
		'label'       => esc_html__( 'Post Items Content', 'olius' ),
		'betooltip'   => esc_html__( 'Content to display for each post on the archive page.', 'olius' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'none' => esc_html__( 'None', 'olius' ),
			'excerpt' => esc_html__( 'Post Excerpt', 'olius' ),
			'full-content' => esc_html__( 'Full Post Content', 'olius' ),
		),
		'default'     => 'excerpt',
		'priority'    => '910',
	);

	$settings['excerpt_length'] = array(
		'boxdivi'     => 'div-ve15',
		'description' => esc_html__( 'Excerpt Length', 'olius' ),
		'betooltip'   => esc_html__( 'Number of words in excerpt if you selected "Post Excerpt" above.', 'olius' ),
		'section'     => $section,
		'type'        => 'betterrange',
		'input_attrs' => array(
			'min'  => 5,
			'max'  => 350,
			'step' => 1,
		),
		'default'     => 50,
		'showreset'   => 50,
		'active_callback' => 'olius_callback_excerpt_length',
		'priority'    => '920',
	);

	$settings['read_more'] = array(
		'label'       => esc_html__( "'Continue Reading' Text", 'olius' ),
		'betooltip'   => esc_html__( "Replace the default 'Continue Reading' text. Leave empty if you dont want to change it.", 'olius' ),
		'section'     => $section,
		'type'        => 'text',
		'input_attrs' => array(
			'placeholder' => esc_html__( 'default: Continue Reading', 'olius' ),
		),
		'default'     => esc_html__( 'Continue Reading', 'olius' ),
		'transport' => 'postMessage',
		'priority'    => '930',
	);

	$settings['gridarticle_align'] = array(
		'label'       => esc_html__( 'Content Alignment', 'olius' ),
		'description' => esc_html__( 'Desktop:', 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'left'     => array( '<span class="dashicons dashicons-editor-alignleft"></span>' ),
			'center'   => array( '<span class="dashicons dashicons-editor-aligncenter"></span>' ),
			'right'    => array( '<span class="dashicons dashicons-editor-alignright"></span>' ),
			'justify'  => array( '<span class="dashicons dashicons-editor-justify"></span>' ),
		),
		'default'     => 'center',
		'priority'    => '940',
		'transport' => 'postMessage',
	);
	$settings['gridarticle_align_mob'] = array(
		'boxdivi'     => 'div-ve20',
		'description' => esc_html__( 'Mobile:', 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'left'     => array( '<span class="dashicons dashicons-editor-alignleft"></span>' ),
			'center'   => array( '<span class="dashicons dashicons-editor-aligncenter"></span>' ),
			'right'    => array( '<span class="dashicons dashicons-editor-alignright"></span>' ),
			'justify'  => array( '<span class="dashicons dashicons-editor-justify"></span>' ),
		),
		'default'     => 'center',
		'priority'    => '940',
		'transport' => 'postMessage',
	);

	/** Section **/

	$section = 'singular';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Single (Posts, Pages)', 'olius' ),
		'priority'    => '90',
	);

	$settings['page_header_full'] = array(
		'label'       => esc_html__( 'Stretch Title Area to Full Width at Top', 'olius' ),
		'description' => esc_html__( 'This is the Page Header area containing Page/Post Title and Meta details like author, categories etc.', 'olius' ) . '<hr/>' . '<img src="' . $imagepath . 'page-header.png">',
		'section'     => $section,
		'type'        => 'checkbox',
		'choices'     => array(
			'default'    => esc_html__( 'Default (Archives, Blog, Woocommerce etc.)', 'olius' ),
			'posts'      => esc_html__( 'For All Posts', 'olius' ),
			'pages'      => esc_html__( 'For All Pages', 'olius' ),
			'no-sidebar' => esc_html__( 'Always override for full width pages (any page which has no sidebar)', 'olius' ),
		),
		'default'     => 'default, pages, no-sidebar',
		'priority'    => '940',
	);

	$settings['singular_post_page'] = array(
		'section'     => $section,
		'type'        => 'tabs',
		'priority'    => '950',
		'options'     => array(
			'posts' => array(

				'post_featured_image' => array(
					'label'       => esc_html__( 'Display Featured Image (Post)', 'olius' ),
					'betooltip'   => esc_html__( 'Location of where you want to display featured image on a Post page.', 'olius' ),
					'type'        => 'select',
					'choices'     => array(
						'none'                => esc_html__( 'Do not display', 'olius'),
						'staticheader-nocrop' => esc_html__( 'Header Background (No Cropping)', 'olius'),
						'staticheader'        => esc_html__( 'Header Background (Cropped)', 'olius'),
						'header'              => esc_html__( 'Header Background (Parallax Effect)', 'olius'),
						'content'             => esc_html__( 'Beginning of content', 'olius'),
					),
					'default'     => 'content',
					'transport' => 'postMessage',
				),

				'post_meta_location' => array(
					'label'       => esc_html__( 'Meta Information location', 'olius' ),
					'type'        => 'radio',
					'choices'     => array(
						'top'    => esc_html__( 'Top (below title)', 'olius' ),
						'bottom' => esc_html__( 'Bottom (after content)', 'olius' ),
					),
					'default'     => 'top',
				),

				'post_meta' => array(
					'label'       => esc_html__( 'Meta Information on Posts', 'olius' ),
					'betooltip'   => esc_html__( "Check which information to display on an individual 'Post' page", 'olius' ),
					'type'        => 'sortlist',
					'choices'     => array(
						'author'   => esc_html__( 'Author', 'olius' ),
						'date'     => esc_html__( 'Date', 'olius' ),
						'cats'     => esc_html__( 'Categories', 'olius' ),
						'tags'     => esc_html__( 'Tags', 'olius' ),
						'comments' => esc_html__( 'No. of comments', 'olius' )
					),
					'default'     => array(
					),
					'options'     => array(),
					'attributes'  => array(
						'hideable'      => true,
						'sortable'      => true,
						'ulclass'       => 'hoot-sortlist-multicheck',
					),
					'selective_refresh' => array( 'post_meta_partial', array(
						'selector'            => '.singular-post .entry-byline.entry-byline-metarray',
						'settings'            => array( 'post_meta' ),
						'render_callback'     => 'olius_callback_post_meta',
						'container_inclusive' => true,
						'fallback_refresh'    => false, // prevents full refresh on non applicable views
						) ),
				),
				'post_prev_next_links' => array(
					'label'       => esc_html__( 'Previous/Next Posts', 'olius' ),
					'betooltip'   => esc_html__( 'Display links to Prev/Next Post links at the end of post content.', 'olius' ),
					'type'        => 'radio',
					'choices'     => array(
						'none'        => esc_html__( 'Do not Display', 'olius' ),
						'text'        => esc_html__( 'Post Title', 'olius' ),
						'thumb'       => esc_html__( 'Post Title and Thumbnail', 'olius' ),
						'fixed-text'  => esc_html__( 'Flyout : Post Title', 'olius' ),
						'fixed-thumb' => esc_html__( 'Flyout : Post Title and Thumbnail', 'olius' ),
					),
					'default'     => 'fixed-thumb',
					'transport' => 'postMessage',
				),
				'post_prev_next_links_selective_refresh_holder' => array(
					'type'        => 'selective_refresh_holder',
					'selective_refresh' => array( 'post_prev_next_links_partial', array(
						'selector'            => '#loop-nav-wrap',
						'settings'            => array( 'post_prev_next_links_selective_refresh_holder' ),
						'render_callback'     => 'olius_post_prev_next_links',
						'container_inclusive' => true,
						'fallback_refresh'    => false, // prevents full refresh on non applicable views
						) ),
				),

			),
			'pages' => array(

				'post_featured_image_page' => array(
					'label'       => esc_html__( 'Display Featured Image (Page)', 'olius' ),
					'betooltip'   => esc_html__( "Location of where you want to display featured image on a 'Page' page.", 'olius' ),
					'type'        => 'select',
					'choices'     => array(
						'none'                => esc_html__( 'Do not display', 'olius'),
						'staticheader-nocrop' => esc_html__( 'Header Background (No Cropping)', 'olius'),
						'staticheader'        => esc_html__( 'Header Background (Cropped)', 'olius'),
						'header'              => esc_html__( 'Header Background (Parallax Effect)', 'olius'),
						'content'             => esc_html__( 'Beginning of content', 'olius'),
					),
					'default'     => 'staticheader',
					'transport' => 'postMessage',
				),

				'page_meta_location' => array(
					'label'       => esc_html__( 'Meta Information location', 'olius' ),
					'type'        => 'radio',
					'choices'     => array(
						'top'    => esc_html__( 'Top (below title)', 'olius' ),
						'bottom' => esc_html__( 'Bottom (after content)', 'olius' ),
					),
					'default'     => 'top',
				),

				'page_meta' => array(
					'label'       => esc_html__( 'Meta Information on Page', 'olius' ),
					'betooltip'   => esc_html__( "Check which information to display on an individual 'Page' page", 'olius' ),
					'type'        => 'sortlist',
					'choices'     => array(
						'author'   => esc_html__( 'Author', 'olius' ),
						'date'     => esc_html__( 'Date', 'olius' ),
						'comments' => esc_html__( 'No. of comments', 'olius' ),
					),
					'default'     => array(
					),
					'options'     => array(),
					'attributes'  => array(
						'hideable'      => true,
						'sortable'      => true,
						'ulclass'       => 'hoot-sortlist-multicheck',
					),
					'selective_refresh' => array( 'page_meta_partial', array(
						'selector'            => '.singular-page .entry-byline',
						'settings'            => array( 'page_meta' ),
						'render_callback'     => 'olius_callback_page_meta',
						'container_inclusive' => true,
						'fallback_refresh'    => false, // prevents full refresh on non applicable views
					) ),
				),

			),
		),
	);
	$settings['singlemetapnote'] = array(
		'boxdivi'     => 'div-ve15',
		'section'     => $section,
		'priority'    => '960',
	);

	$settings['meta_headline'] = array(
		'label'       => esc_html__( 'Meta Labels', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '962',
	);

	$settings['meta_label_author'] = array(
		'label'       => esc_html__( 'Post Author', 'olius' ),
		'section'     => $section,
		'type'        => 'text',
		'default'     => esc_html_x( 'By:', 'Default when not set in Customizer', 'olius' ),
		'priority'    => '964',
		'transport' => 'postMessage',
	);
	$settings['meta_label_date'] = array(
		'boxdivi'     => 'div-ve15',
		'label'       => esc_html__( 'Date', 'olius' ),
		'section'     => $section,
		'type'        => 'text',
		'default'     => esc_html_x( 'On:', 'Default when not set in Customizer', 'olius' ),
		'priority'    => '964',
		'transport' => 'postMessage',
	);
	$settings['meta_label_cats'] = array(
		'boxdivi'     => 'div-ve15',
		'label'       => esc_html__( 'Categories', 'olius' ),
		'section'     => $section,
		'type'        => 'text',
		'default'     => esc_html_x( 'In:', 'Default when not set in Customizer', 'olius' ),
		'priority'    => '964',
		'transport' => 'postMessage',
	);
	$settings['meta_label_tags'] = array(
		'boxdivi'     => 'div-ve15',
		'label'       => esc_html__( 'Tags', 'olius' ),
		'section'     => $section,
		'type'        => 'text',
		'default'     => esc_html_x( 'Tagged:', 'Default when not set in Customizer', 'olius' ),
		'priority'    => '964',
		'transport' => 'postMessage',
	);
	$settings['meta_label_comments'] = array(
		'boxdivi'     => 'div-ve15',
		'label'       => esc_html__( 'Comments', 'olius' ),
		'section'     => $section,
		'type'        => 'text',
		'default'     => esc_html_x( 'With:', 'Default when not set in Customizer', 'olius' ),
		'priority'    => '964',
		'transport' => 'postMessage',
	);

	$settings['article_headline'] = array(
		'label'       => esc_html__( 'Article Content', 'olius' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '966',
	);

	$settings['article_align'] = array(
		'label'       => esc_html__( 'Content Alignment', 'olius' ),
		'description' => esc_html__( 'Desktop:', 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'left'     => array( '<span class="dashicons dashicons-editor-alignleft"></span>' ),
			'center'   => array( '<span class="dashicons dashicons-editor-aligncenter"></span>' ),
			'right'    => array( '<span class="dashicons dashicons-editor-alignright"></span>' ),
			'justify'  => array( '<span class="dashicons dashicons-editor-justify"></span>' ),
		),
		'default'     => 'justify',
		'priority'    => '968',
		'transport' => 'postMessage',
	);
	$settings['article_align_mob'] = array(
		'boxdivi'     => 'div-ve20',
		'description' => esc_html__( 'Mobile:', 'olius' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'left'     => array( '<span class="dashicons dashicons-editor-alignleft"></span>' ),
			'center'   => array( '<span class="dashicons dashicons-editor-aligncenter"></span>' ),
			'right'    => array( '<span class="dashicons dashicons-editor-alignright"></span>' ),
			'justify'  => array( '<span class="dashicons dashicons-editor-justify"></span>' ),
		),
		'default'     => 'justify',
		'priority'    => '968',
		'transport' => 'postMessage',
	);

	$settings['article_maxwidth_conastipnote'] = array(
		'boxdivi'         => 'divbig',
		'label'           => esc_html__( 'Article Maximum Width', 'olius' ),
		'section'         => $section,
		'type'            => 'content',
		'description'     => esc_html__( 'Limit the content text width within the article for better readability on larger screens.', 'olius' ),
		/* Translators: 1 is the link start markup, 2 is link markup end */
		'content'         => '<img src="' . $imagepath . 'article-maxwidth.png">' . '<br />' . sprintf( esc_html__( 'To add a background to the Article area, go to the %1$sColors Section%2$s.', 'olius' ), '<a href="#" data-cust-linksection="colors" target="_blank">', '</a>' ),
		'priority'    => '970',
	);
	$settings['article_maxwidth'] = array(
		'boxdivi'         => false,
		'section'         => $section,
		'type'            => 'betterrange',
		'description'     => esc_html__( 'When Post/Page has a Sidebar present', 'olius' ),
		'displaysuffix'   => 'px',
		'default'         => $article_maxwidth,
		'showreset'       => $article_maxwidth,
		'input_attrs'     => array(
			'min'  => 400,
			'max'  => 1400,
			'step' => 50,
		),
		'priority'    => '980',
		'transport' => 'postMessage',
	);
	$settings['article_maxwidth_nosidebar'] = array(
		'boxdivi'         => false,
		'section'         => $section,
		'type'            => 'betterrange',
		'description'     => esc_html__( 'When Post/Page has no Sidebar Layout', 'olius' ),
		'displaysuffix'   => 'px',
		'default'         => $article_maxwidth_nosidebar,
		'showreset'       => $article_maxwidth_nosidebar,
		'input_attrs'     => array(
			'min'  => 400,
			'max'  => 1400,
			'step' => 50,
		),
		'priority'    => '990',
		'transport' => 'postMessage',
	);

	$settings['article_maxwidth_pnote'] = array(
		'section'     => $section,
		'priority'    => '1000',
	);

	/** Section **/

	/** Section **/

	$section = 'hootshead-ot';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Others', 'olius' ),
		'priority'    => '95',
	);

	$settings['ot_settings'] = array(
		'section'     => $section,
		'type'        => 'content',
		'content'     => '',
		'priority'    => '1111',
	);


	/*** Return Options Array ***/
	return apply_filters( 'olius_customizer_options', array(
		'settings' => $settings,
		'sections' => $sections,
		'panels'   => $panels,
	) );

}
endif;

/**
 * Add Options (settings, sections and panels) to Hoot_Customize class options object
 *
 * @since 1.0
 * @access public
 * @return void
 */
if ( !function_exists( 'olius_add_customizer_options' ) ) :
function olius_add_customizer_options() {

	$hoot_customize = Hoot_Customize::get_instance();

	// Add Options
	$options = olius_customizer_options();
	$hoot_customize->add_options( array(
		'settings' => $options['settings'],
		'sections' => $options['sections'],
		'panels' => $options['panels'],
		) );

}
endif;
add_action( 'init', 'olius_add_customizer_options', 0 ); // cannot hook into 'after_setup_theme' as this hook is already being executed (this file is loaded at after_setup_theme @priority 10) (hooking into same hook from within while hook is being executed leads to undesirable effects as $GLOBALS[$wp_filter]['after_setup_theme'] has already been ksorted)
// Hence, we hook into 'init' @priority 0, so that settings array gets populated before 'widgets_init' action ( which itself is hooked to 'init' at priority 1 ) for creating widget areas ( settings array is needed for creating defaults when user value has not been stored )

/**
 * Enqueue custom scripts to customizer screen
 *
 * @since 1.0
 * @return void
 */
function olius_customizer_enqueue_scripts() {
	// Enqueue Styles
	$style_uri = hoot_locate_style( hoot_data()->incuri . 'admin/css/customize-controls' );
	wp_enqueue_style( 'olius-customize-styles', $style_uri, array(),  hoot_data()->hoot_version );
	// Enqueue Scripts
	$script_uri = hoot_locate_script( hoot_data()->incuri . 'admin/js/customize-controls' );
	wp_enqueue_script( 'olius-customize-controls', $script_uri, array( 'jquery', 'wp-color-picker', 'customize-controls', 'hoot-customize' ), hoot_data()->hoot_version, true );
}
// Load scripts at priority 12 so that Custom Controls / Hoot Customizer Interface (@11) have loaded their scripts
add_action( 'customize_controls_enqueue_scripts', 'olius_customizer_enqueue_scripts', 12 );

