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

function maglume_customize_control_color_palettes( $palettes ){
	return array(
		'#fa6c04', '#ffffff', // accentcolor/accentfont
		'#f4f2ef', // module_bg
		'#000000', // black
		'#0ea7ef', '#37be5a', '#f7b528', '#ff2d2d' // color options
	);
}
add_filter( 'hoot_customize_control_color_palettes', 'maglume_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( 'maglume_default_style' ) ) :
function maglume_default_style( $key = false ){
	// Used by customizer-options.php, as well as customize-preview.js
	$defaults = apply_filters( 'maglume_default_style', array(
		'overlay_color'              => '#fa6c0400', // accentcolor with 0 opacity
		'accent_color'               => '#fa6c04',
		'accent_font'                => '#ffffff',
		'button_color'               => '#fa6c04',
		'button_font'                => '#ffffff',
		'module_bg_default'          => '#f4f2ef',
		'module_fontcolor_default'   => '#555555',
		'belowsh_bg'                 => '#f7f7f7',
		'belowsh_color'              => '#666666',
		'article_background_type'    => 'background-whensidebar',
		'article_background_color'   => '#f8f8f8',
		'box_background'             => '#ffffff',
		'site_background'            => '#ffffff',
		'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 ),
		'borderradius'               => 5,
		'sticky_sitehead_dtp_logozoom' => 65,
		'sticky_sitehead_mob_logozoom' => 50,
		'topann_content_bg'          => '#00000080', // 50% opacity
		'topann_content_color'       => '#eeeeee',
		'topbar_padding'             => array(
									'desktop' => array('t'=>0,'r'=>0,'b'=>0,'l'=>0,'linked'=>true),
									'tablet'  => array('t'=>7,'r'=>0,'b'=>7,'l'=>0,'linked'=>true),
									'mobile'  => array('t'=>7,'r'=>0,'b'=>7,'l'=>0,'linked'=>true) ),
		'logo_margin'                => array(
									'desktop' => array('t'=>40,'r'=>0,'b'=>40,'l'=>0,'linked'=>true),
									'tablet'  => array('t'=>15,'r'=>0,'b'=>15,'l'=>0,'linked'=>true),
									'mobile'  => array('t'=>15,'r'=>0,'b'=>15,'l'=>0,'linked'=>true) ),
		'logotype'                   => 'mixedcustom',
		'site_title_icon_size'       => 50,
		'logo_image_width'           => array( 'desktop' => 350, 'tablet' => 300, 'mobile' => 150 ),
		'logo_custom_line_font'      => 45,
		'below_sitehead_padding'     => array(
									'desktop' => array('t'=>0,'r'=>0,'b'=>0, 'l'=>0,'linked'=>false),
									'tablet'  => array('t'=>7,'r'=>0,'b'=>12,'l'=>0,'linked'=>false),
									'mobile'  => array('t'=>7,'r'=>0,'b'=>12,'l'=>0,'linked'=>false) ),
		'subfooter_padding'          => array(
									'desktop' => array('t'=>35,'r'=>0,'b'=>40,'l'=>0,'linked'=>false),
									'tablet'  => array('t'=>35,'r'=>0,'b'=>40,'l'=>0,'linked'=>false),
									'mobile'  => array('t'=>35,'r'=>0,'b'=>40,'l'=>0,'linked'=>false) ),
		'footer_padding'             => array(
									'desktop' => array('t'=>50,'b'=>45,'linked'=>false),
									'tablet'  => array('t'=>40,'b'=>35,'linked'=>false),
									'mobile'  => array('t'=>40,'b'=>35,'linked'=>false) ),
		'postfooter_padding'         => array(
									'desktop' => array('t'=>20,'b'=>20,'linked'=>true),
									'tablet'  => array('t'=>20,'b'=>20,'linked'=>true),
									'mobile'  => array('t'=>20,'b'=>20,'linked'=>true) ),
		'logo_background'            => '#fa6c0400', // accentcolor with 0 opacity
		'logo_color'                 => '#222222',
		'logo_font'                  => array(
										'face' => 'Oswald', 'category' => 'sans-serif',
										'subsets' => array( 'latin' ),
										'size' => array( 'desktop' => 60, 'tablet' => 50, 'mobile' => 40, 'alldevices' => 'on' ),
										'lheight' => 1, 'lspace' => 0,
										'weight' => '400',
										'style' => 'normal', 'trans' => 'none', 'deco' => 'none'
									),
		'heading_size_enum' => array(
			'small'      => array( 'h1' => '26px', 'h2' => '22px', 'h3' => '20px', 'h4' => '18px', 'h5' => '16px', 'h6' => '15px', 'widgethead' => '15px', 'footerhead' => '15px' ),
			'normal'     => array( 'h1' => '30px', 'h2' => '26px', 'h3' => '24px', 'h4' => '22px', 'h5' => '20px', 'h6' => '16px', 'widgethead' => '16px', 'footerhead' => '16px' ),
			'large'      => array( 'h1' => '32px', 'h2' => '28px', 'h3' => '26px', 'h4' => '24px', 'h5' => '22px', 'h6' => '18px', 'widgethead' => '18px', 'footerhead' => '18px' ),
			'extralarge' => array( 'h1' => '34px', 'h2' => '30px', 'h3' => '28px', 'h4' => '26px', 'h5' => '24px', 'h6' => '20px', 'widgethead' => '20px', 'footerhead' => '20px' ),
			'huge'       => array( 'h1' => '38px', 'h2' => '34px', 'h3' => '32px', 'h4' => '30px', 'h5' => '28px', 'h6' => '24px', 'widgethead' => '24px', 'footerhead' => '24px' ),
		),
		'heading_font'               => array(
										'color' => '#444444',
										'face' => 'Roboto', 'category' => 'sans-serif',
										'subsets' => array( 'latin' ),
										'weight' => '500',
										'style' => 'normal', 'trans' => 'none', 'deco' => 'none'
									),
		'subheading_font'            => array(
										'color' => '#838383',
										'face' => 'Noto Sans', 'category' => 'sans-serif',
										'subsets' => array( 'latin' ),
										'weight' => '400',
										'style' => 'italic', 'trans' => 'none', 'deco' => 'none'
									),
		'body_font'                  => array(
										'color' => '#666666',
										'face' => 'Noto Sans', 'category' => 'sans-serif',
										'subsets' => array( 'latin' ),
										'size' => array( 'desktop' => 16, 'tablet' => 16, 'mobile' => 16, 'alldevices' => 'on' ),
										'lheight' => 1.65, 'lspace' => 0,
										'weight' => '400',
										'style' => 'normal', 'trans' => 'none'
									),
		'link_color'                 => '#fa6c04',
		'link_hover_color'           => '#5f4300',
		'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( 'maglume_customizer_options' ) ) :
function maglume_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( maglume_default_style() );

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

	// Logo Font Options for Lite version
	$logofont = apply_filters( 'maglume_options_logofont', array(
					'heading'  => esc_html__( 'Logo Font', 'magazine-lume' ),
					'heading2' => esc_html__( 'Headings Font', 'magazine-lume' ),
					'standard' => esc_html__( 'Body Font', 'magazine-lume' ),
					) );

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

	/** Section **/

	$section = 'links';

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

	$lcontent = array();
	if ( ! class_exists( 'HootKit' ) && !defined( 'MAGLUME_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", 'magazine-lume') .
				 '</span><span class="hoot-cust-link-desc">' .
				 esc_html__( "Supercharge your theme experience with premium features.", 'magazine-lume') .
				 '</span></a>';
	endif;
	$lcontent['demo'] = '<a class="hoot-cust-link" href="' .
				 maglume_abouttag('urldemo') .
				 '" target="_blank"><span class="hoot-cust-link-head">' .
				 '<i class="fas fa-eye"></i> ' .
				 esc_html__( "Preview Demo", 'magazine-lume') . 
				 '</span><span class="hoot-cust-link-desc">' .
				 esc_html__( "View the Demo Site to preview the theme features and options.", 'magazine-lume') .
				 '</span></a>';
	$lcontent['install'] = '<a class="hoot-cust-link" href="' .
				 esc_url( hoot_dashboard( 'url', array( 'tab' => 'demoimport' ) ) ) .
				 '" target="_blank"><span class="hoot-cust-link-head">' .
				 '<i class="fas fa-upload"></i> ' .
				 esc_html__( "1 Click Demo Content Import", 'magazine-lume') . 
				 '</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.", 'magazine-lume') .
				 '</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", 'magazine-lume') . 
				 '</span><span class="hoot-cust-link-desc">' .
				 esc_html__( "Get theme related support for both free and premium users.", 'magazine-lume') .
				 '</span></a>';
	$lcontent['rateus'] = '<a class="hoot-cust-link" href="' .
				 'https://wordpress.org/support/theme/magazine-lume/reviews/#new-post' .
				 '" target="_blank"><span class="hoot-cust-link-head">' .
				 '<i class="fas fa-star"></i> ' .
				 esc_html__( "Rate Us", 'magazine-lume') . 
				 '</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!', 'magazine-lume'), '<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( 'maglume_customizer_option_linksection', $lcontent ) ),
	);

	/** Section **/

	$section = 'hootshead-su';

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

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

	/** Section **/

	/** Section **/

	$section = 'logo';

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

	$logo_custom_line_options = array(
		'text' => array(
			'label'       => esc_html__( 'Line Text', 'magazine-lume' ),
			'type'        => 'text',
		),
		'font' => array(
			'label'       => esc_html__( 'Line Font Family', 'magazine-lume' ),
			'betooltip'   => array( 'tip', sprintf( esc_html__( 'These Font Families can be selected in the %1$sTypography%2$s section.', 'magazine-lume' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=typography' ) ) . '" rel="focuslink" data-focustype="section" data-href="typography">', '</a>' ) ),
			'type'        => 'select',
			'choices'     => $logofont,
			'default'     => 'heading',
		),
		'size' => array(
			'label'       => esc_html__( 'Line Font Size', 'magazine-lume' ),
			'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', 'magazine-lume' ),
					'type'        => 'radio',
					'choices'     => array(
						'text'        => esc_html__( 'Default Text (Site Title)', 'magazine-lume' ),
						'custom'      => esc_html__( 'Custom Text', 'magazine-lume' ),
						'image'       => esc_html__( 'Image Logo', 'magazine-lume' ),
						'mixed'       => esc_html__( 'Image &amp; Default Text (Site Title)', 'magazine-lume' ),
						'mixedcustom' => esc_html__( 'Image &amp; Custom Text', 'magazine-lume' ),
					),
					'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', 'magazine-lume' ), '<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'     => 'maglume_branding',
						'container_inclusive' => true,
						) ),
				),

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

				'site_title_icon_size' => array(
					'boxdivi'         => false,
					'label'           => esc_html__( 'Site Title Icon Size', 'magazine-lume' ),
					'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' => 'maglume_callback_site_title_icon',
					'transport' => 'postMessage',
				),

				'logo_image_width' => array(
					'boxdivi'         => false,
					'label'           => esc_html__( 'Maximum Image Width', 'magazine-lume' ),
					'betooltip'       => esc_html__( 'The logo width may be adjusted automatically by the browser depending on title length and space available.', 'magazine-lume' ),
					'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' => 'maglume_callback_logo_image_width',
					'transport' => 'postMessage',
				),

				'logo_custom' => array(
					'label'           => esc_html__( 'Custom Logo Text', 'magazine-lume' ),
					'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; Magazine &lt;/b&gt;%3$s Bold %1$s%2$s&lt;i&gt; Lume &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$ss', 'magazine-lume' ), '<hr>', '<code>', '</code>' ),
					'choices'         => array(
						'line1' => esc_html__( 'Line 1', 'magazine-lume' ),
						'line2' => esc_html__( 'Line 2', 'magazine-lume' ),
						'line3' => esc_html__( 'Line 3', 'magazine-lume' ),
						'line4' => esc_html__( 'Line 4', 'magazine-lume' ),
					),
					'default'     => array(
						'line1'  => array( 'text' => wp_kses_post( __( 'magazine <em>LUME</em>', 'magazine-lume' ) ), 'size' => 56 ),
						'line2'  => array( 'sortitem_hide' => 1, 'size' => 20 ),
						'line3'  => array( 'sortitem_hide' => 1, ),
						'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' => 'maglume_callback_logo_custom',
					'transport' => 'postMessage',
				),

			),
			'tagline' => array(
				'show_tagline' => array(
					'label'           => esc_html__( 'Show Tagline', 'magazine-lume' ),
					/* 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.', 'magazine-lume' ), '<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.', 'magazine-lume' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=typography' ) ) . '" rel="focuslink" data-focustype="section" data-href="typography">', '</a>' ),
					'priority'    => '55',
				),
				'logo_bg_font' => array(
					'label'       => esc_html__( 'Logo Background / Font', 'magazine-lume' ),
					'description' => sprintf( esc_html__( '%1$sTIP:%2$s To remove the background, set opacity to 0 in the color picker.', 'magazine-lume' ), '<strong>', '</strong>' ),
					'type'        => 'color',
					'section'     => $section,
					'multi'       => array( 'logo_background', 'logo_color' ),
					'default'     => array( $logo_background, $logo_color ),
					'hasalpha'    => array( true, false ),
					'transport'   => 'postMessage',
					'priority'    => '60',
				),
				'logo_border' => array(
					'label'       => esc_html__( 'Logo Border', 'magazine-lume' ),
					'betooltip'   => esc_html__( 'Display a border around logo.', 'magazine-lume' ),
					'type'        => 'radio',
					'default'     => 'none',
					'priority'    => '70',
					'choices'     => array(
						'none'        => esc_html__( 'None', 'magazine-lume' ),
						'border'      => esc_html__( 'Border (With padding)', 'magazine-lume' ),
						'bordernopad' => esc_html__( 'Border (No padding)', 'magazine-lume' ),
					),
					'transport' => 'postMessage',
				),
				'logo_margin' => array(
					'label'       => esc_html__( 'Logo Margin', 'magazine-lume' ),
					'betooltip'   => esc_html__( 'Set the margins around the logo. Negative values are allowed.', 'magazine-lume' ),
					'type'        => 'spacings',
					'default'     => $logo_margin,
					'showreset'   => $logo_margin,
					'mediaquery'  => true,
					'priority'    => '80',
					'transport' => 'postMessage',
				),
			),
		),
	);

	/** Section **/

	$section = 'layout';

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

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

	$settings['site_layout'] = array(
		'label'       => esc_html__( 'Site Layout - Boxed vs Stretched', 'magazine-lume' ),
		'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.', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'boxed'   => esc_html__( 'Boxed layout', 'magazine-lume' ),
			'stretch' => esc_html__( 'Stretched layout', 'magazine-lume' ),
		),
		'default'     => 'stretch',
		'priority'    => '110',
		'transport' => 'postMessage',
	);

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

	$settings['disable_sticky_sidebar'] = array(
		'label'       => esc_html__( 'Enable Sticky Sidebar', 'magazine-lume' ),
		'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.', 'magazine-lume' ),
		'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', 'magazine-lume' ),
					'type'        => 'select',
					'choices'     => array(
						'auto' => esc_html__( 'auto', 'magazine-lume'),
						'px'   => esc_html__( 'pixels', 'magazine-lume'),
						'pcnt' => esc_html__( '%age', 'magazine-lume'),
					),
					'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' => 'maglume_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' => 'maglume_callback_sb1w_pcnt',
				),
				'sidebar2_width' => array(
					'label'       => esc_html__( 'Secondary Sidebar', 'magazine-lume' ),
					// 'description' => esc_html__( '(for 2 column layouts)', 'magazine-lume' ),
					'type'        => 'select',
					'choices'     => array(
						'auto' => esc_html__( 'auto', 'magazine-lume'),
						'px'   => esc_html__( 'pixels', 'magazine-lume'),
						'pcnt' => esc_html__( '%age', 'magazine-lume'),
					),
					'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' => 'maglume_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' => 'maglume_callback_sb2w_pcnt',
				),
			),
			'layout' => array(
				'sblayoutpnote' => array( 'type' => 'note' ),
				'sidebar' => array(
					'label'       => esc_html__( 'Default (Site wide)', 'magazine-lume' ),
					'betooltip'   => esc_html__( 'Set the default sidebar for your entire site.', 'magazine-lume' ),
					'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', 'magazine-lume' ),
					/* 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', 'magazine-lume' ), '<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', 'magazine-lume' ),
					'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', 'magazine-lume' ),
					'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'     => 'none',
				),
				'sidebar_posts' => array(
					'label'       => esc_html__( 'Single Posts', 'magazine-lume' ),
					'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', 'magazine-lume' ),
			'betooltip'   => esc_html__( 'Set the default sidebar width and position for WooCommerce Shop and Archives pages like product categories etc.', 'magazine-lume' ),
			'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', 'magazine-lume' ),
			'betooltip'   => esc_html__( 'Set the default sidebar width and position for WooCommerce product page', 'magazine-lume' ),
			'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', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '143',
	);

	$settings['widgetmargin'] = array(
		'label'       => esc_html__( 'Widget Margin', 'magazine-lume' ),
		'betooltip'   => esc_html__( '(in pixels) Margin space above and below widgets.', 'magazine-lume' ),
		'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', 'magazine-lume' ),
		'priority'    => '20',
	);

	$settings['sitestyle_headline'] = array(
		'label'       => esc_html__( 'General Styling', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '143',
	);

	$settings['borderradius'] = array(
		'label'       => esc_html__( 'Border Radius', 'magazine-lume' ),
		'betooltip'   => esc_html__( 'Border radius for various Elements throughout the site - like Forms, Images, Widget outlines etc.', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'betterrange',
		'mediaquery'  => false,
		'displaysuffix' => 'px',
		'input_attrs' => array(
			'min'  => 0,
			'max'  => 100,
			'step' => 1,
		),
		'default'     => $borderradius,
		'showreset'   => $borderradius,
		'priority'    => '145',
		'transport' => 'postMessage',
	);
	$settings['buttonradius'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Button Radius', 'magazine-lume' ),
		'betooltip'   => esc_html__( 'Default border radius for Buttons', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'betterrange',
		'mediaquery'  => false,
		'displaysuffix' => 'px',
		'input_attrs' => array(
			'min'  => 0,
			'max'  => 50,
			'step' => 1,
		),
		'default'     => $borderradius,
		'showreset'   => $borderradius,
		'priority'    => '145',
		'transport' => 'postMessage',
	);

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

	$settings['disable_goto_top'] = array(
		'label'       => esc_html__( "Enable 'Goto Top' Button", 'magazine-lume' ),
		'betooltip'   => esc_html__( 'Check this to show "Top" button (bottom right of screen) when a user scrolls down the page.', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'inverttoggle'=> true,
		'priority'    => '160',
		'transport' => 'postMessage',
	);
	$settings['goto_top_mobile'] = array(
		'boxdivi'     => 'div-ve10',
		'description' => esc_html__( 'Show on mobile', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 1,
		'priority'    => '170',
		'active_callback' => 'maglume_callback_goto_top',
		'transport' => 'postMessage',
	);
	$settings['goto_top_icon'] = array(
		'boxdivi'     => 'div-ve10',
		'description' => esc_html__( 'Icon:', 'magazine-lume' ),
		'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' => 'maglume_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:', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'style1'  => array( '<span class="gotostyle_s gotostyle1"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Dark', 'magazine-lume' ) ),
			'style2'  => array( '<span class="gotostyle_s gotostyle2"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Light', 'magazine-lume' ) ),
			'style3'  => array( '<span class="gotostyle_s gotostyle3"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Accent Color', 'magazine-lume' ) ),
			'style4'  => array( '<span class="gotostyle_s gotostyle4"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Invert Accent', 'magazine-lume' ) ),
			'style5'  => array( '<span class="gotostyle_c gotostyle5"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Dark', 'magazine-lume' ) ),
			'style6'  => array( '<span class="gotostyle_c gotostyle6"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Light', 'magazine-lume' ) ),
			'style7'  => array( '<span class="gotostyle_c gotostyle7"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Accent Color', 'magazine-lume' ) ),
			'style8'  => array( '<span class="gotostyle_c gotostyle8"><i class="' . $gototopiconclass . '"></i></span>' . esc_html__( 'Invert Accent', 'magazine-lume' ) ),
		),
		'default'     => 'style7',
		'priority'    => '190',
		'active_callback' => 'maglume_callback_goto_top',
		'transport' => 'postMessage',
	);
	$settings['goto_top_offset'] = array(
		'boxdivi'     => false,
		'description' => esc_html__( 'Offset from bottom', 'magazine-lume' ),
		'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' => 'maglume_callback_goto_top',
		'transport' => 'postMessage',
	);

	$settings['anim_headline'] = array(
		'label'       => esc_html__( 'Animations', 'magazine-lume' ),
		'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.', 'magazine-lume' );
	$settings['enable_anims'] = array(
		'label'       => esc_html__( 'Enable Animations', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 1,
		'priority'    => '220',
		'description' => $animdescription,
	);
	$animchoices = array(
		'h00' => array( esc_html__( 'General:', 'magazine-lume' ) ),
			'sscroll'     => esc_html__( 'Smooth Scroll on Desktop (Lenis)', 'magazine-lume' ),
			'stickyhead'  => esc_html__( 'Animate Sticky Header when it appears', 'magazine-lume' ),
			'aos'         => esc_html__( 'Animate elements when they come into view - Desktop', 'magazine-lume' ) . '<em>' . esc_html__( '* preview not available in Customizer', 'magazine-lume' ) . '</em>',
			'aosmob'      => esc_html__( 'Animate elements when they come into view - Mobile', 'magazine-lume' ) . '<em>' . esc_html__( '* preview not available in Customizer', 'magazine-lume' ) . '</em>',
			'imghov'      => esc_html__( 'Image Hover effect', 'magazine-lume' ),
		'h01' => array( esc_html__( 'Goto Top:', 'magazine-lume' ) ),
			'waygototop'  => esc_html__( 'Show Goto Top button after user has scrolled down a bit', 'magazine-lume' ),
			'animgototop' => esc_html__( 'Smooth scroll to top on button click', 'magazine-lume' ),
		'h02' => array( esc_html__( 'Posts/Pages/Archives:', 'magazine-lume' ) ),
			'pagehead'    => esc_html__( 'Animate Header Featured Image when user scrolls down', 'magazine-lume' ),
			'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)', 'magazine-lume' ),
		'h03' => array( esc_html__( 'Posts:', 'magazine-lume' ) ),
			'prevnext'    => esc_html__( 'Briefly show previous/next posts (flyout types) when user reaches end of post.', 'magazine-lume' ),
		'h04' => array( esc_html__( 'Auto Scrolls **', 'magazine-lume' ) ),
			'scrollhash'  => esc_html__( 'Auto Scroll to #hash in the link url', 'magazine-lume' ),
			'scrollmain'  => esc_html__( 'Auto Scroll down to main content of page when a link is clicked', 'magazine-lume' ),
	);
	$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' => 'maglume_callback_enabled_anims',
	);

	$settings['autoscroll_scope'] = array(
		'label'       => esc_html__( '** Auto Scrolls', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'sitewide'   => esc_html__( 'Apply to links throughout the site', 'magazine-lume' ),
			'menu'       => esc_html__( 'Apply to links only in the menu', 'magazine-lume' ),
			'menu-posts' => esc_html__( 'Apply to links in menu, archives and post content', 'magazine-lume' ),
		),
		'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.', 'magazine-lume' ),
		'default'     => 'sitewide',
		'priority'    => '240',
		'transport' => 'postMessage',
		'active_callback' => 'maglume_callback_autoscroll',
	);

	/** Panel **/

	/** Section **/

	$section = 'hootshead-sc';

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

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

	/** Section **/

	$section = 'topannounce';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Top Announcement', 'magazine-lume' ),
		'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.', 'magazine-lume' ),
		'priority'    => '270',
	);

	$settings['topann_sticky'] = array(
		'label'       => esc_html__( 'Stick to Top on scroll down', 'magazine-lume' ),
		/* 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.', 'magazine-lume' ), '<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', 'magazine-lume' ),
					'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', 'magazine-lume' ),
					'default'     => 1,
					'transport' => 'postMessage',
				),
				'topann_imgstretch' => array(
					'boxdivi'     => 'div-ve15',
					'type'        => 'bettercheckbox',
					'description' => esc_html__( 'Stretch Image to full width', 'magazine-lume' ),
					'default'     => 1,
					'active_callback' => 'maglume_callback_topann_imgstretch',
					'transport' => 'postMessage',
				),
			),
			'link' => array(
				'topann_url' => array(
					'label'       => esc_html__( 'Link URL', 'magazine-lume' ),
					'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?', 'magazine-lume' ),
					'transport' => 'postMessage',
				),
				'topann_url_scope' => array(
					'label'       => esc_html__( 'Link URL Scope', 'magazine-lume' ),
					'type'        => 'radio',
					'choices'     => array(
						'background' => esc_html__( 'Entire Top Area', 'magazine-lume' ),
						'content'    => esc_html__( 'Only Content Box', 'magazine-lume' ),
					),
					'default'     => 'background',
					'transport' => 'postMessage',
				),
			),
			'content' => array(

				'topann_content_stretch' => array(
					'label'       => esc_html__( 'Content Box Size - Default vs Stretched', 'magazine-lume' ),
					'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?', 'magazine-lume' ),
					'active_callback' => 'maglume_callback_topann_content_nopad',
					'transport' => 'postMessage',
				),
				'topann_content_style' => array(
					'label'       => esc_html__( 'Content Style', 'magazine-lume' ),
					'type'        => 'select',
					'choices'     => array(
						'dark'            => esc_html__( 'Dark Font', 'magazine-lume' ),
						'light'           => esc_html__( 'Light Font', 'magazine-lume' ),
						'dark-on-light'   => esc_html__( 'Dark Font / Light Background', 'magazine-lume' ),
						'light-on-dark'   => esc_html__( 'Light Font / Dark Background', 'magazine-lume' ),
						'custom'          => esc_html__( 'Custom Colors', 'magazine-lume' ),
					),
					'default'     => 'light-on-dark',
					'transport' => 'postMessage',
				),
				'topann_content_customcolor' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Custom Background / Font', 'magazine-lume' ),
					'type'            => 'color',
					'hasalpha'    => array( true, false ),
					'multi'       => array( 'topann_content_bg', 'topann_content_color' ),
					'default'     => array( $topann_content_bg, $topann_content_color ),
					'active_callback' => 'maglume_callback_topann_content_bg',
					'transport' => 'postMessage',
				),
				'topann_content_title' => array(
					'label'       => esc_html__( 'Content Title', 'magazine-lume' ),
					'type'        => 'text',
					'transport' => 'postMessage', // to work with 'selective_refresh' added via 'topann_content'
				),
				'topann_content' => array(
					'label'       => esc_html__( 'Content Text (HTML)', 'magazine-lume' ),
					'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'     => 'maglume_topann',
						'container_inclusive' => true,
						) ),
				),

			),
		),
	);
	$settings['topann_ops']['options']['content']['topann_content']['description'] = '<strong>' . esc_html__( 'Insert Timer', 'magazine-lume' ) . '</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', 'magazine-lume' ), '<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"]', 'magazine-lume' ), '<span style="text-decoration:underline">', '</span>' ) . '</code>'
			: sprintf( esc_html__( '%1$sInstall HootKit plugin%2$s to add a timer to your content.', 'magazine-lume' ), '<a href="' . esc_url( hoot_dashboard( 'url', array( 'tab' => 'hootkit' ) ) ) .'" target="_blank">', '</a>' )
		);

	/** Section **/

	$section = 'topbar';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Top Bar', 'magazine-lume' ),
		'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', 'magazine-lume' ), '<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_display'] = array(
		'label'       => esc_html__( 'Enable Topbar area on following pages', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'checkbox',
		'choices'     => array(
			'home'      => esc_html__( 'Home Page', 'magazine-lume' ),
			'blog'      => esc_html__( 'Blog Page', 'magazine-lume' ),
			'archive'   => esc_html__( 'Archive Page (Categories, Tags etc)', 'magazine-lume' ),
			'posts'     => esc_html__( 'Single Post Page', 'magazine-lume' ),
			'pages'     => esc_html__( 'Single Page', 'magazine-lume' ),
			'search'    => esc_html__( 'Search Results Page', 'magazine-lume' ),
			'notfound'  => esc_html__( '404 Page', 'magazine-lume' ),
		),
		'default'     => 'home, blog, archive, posts, pages, search, notfound',
		'priority'    => '415',
	);
	if ( current_theme_supports( 'woocommerce' ) ) :
		$settings['topbar_display']['choices'] = array_merge(
			$settings['topbar_display']['choices'],
			array(
				'h01'         => array( esc_html__( 'WooCommerce:', 'magazine-lume' ) ),
				'shop'        => esc_html__( 'Shop Page', 'magazine-lume' ),
				'product'     => esc_html__( 'Single Product Page', 'magazine-lume' ),
				'shoparchive' => esc_html__( 'Product Archive Page (Categories, Tags etc)', 'magazine-lume' ),
				'cart'        => esc_html__( 'Cart Page', 'magazine-lume' ),
				'checkout'    => esc_html__( 'Checkout Page', 'magazine-lume' ),
				'account'     => esc_html__( 'My Account Page', 'magazine-lume' ),
			)
		);
		$settings['topbar_display']['default'] .= ', shop, product, shoparchive, cart, checkout, account';
	endif;

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

	$settings['topbar_align'] = array(
		'boxdivi'     => 'div-ve10',
		'description' => esc_html__( "Topbar areas alignment", 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'leftright'   => esc_html__( 'Left / Right', 'magazine-lume' ),
			'center'      => esc_html__( 'Center', 'magazine-lume' ),
		),
		'default'     => 'leftright',
		'priority'    => '420',
		'transport' => 'postMessage',
	);

	$settings['topbar_padding'] = array(
		'label'       => esc_html__( 'Top Bar Padding', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'spacings',
		'default'     => $topbar_padding,
		'showreset'   => $topbar_padding,
		'allowneg'    => false,
		'mediaquery'  => true,
		'priority'    => '430',
		'transport' => 'postMessage',
	);

	$settings['topbar_background_shortcut'] = array(
		'label'       => esc_html__( 'Topbar Background/Text Color', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'content'     => sprintf( esc_html__( 'To modify Topbar colors, go to %1$sColors / Backgrounds section%2$s.', 'magazine-lume' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=colors' ) ) . '" rel="focuslink" data-focustype="section" data-href="colors">', '</a>' ),
		'priority'    => '440',
	);

	/** Section **/

	$section = 'sitehead';

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

	$settings['logo_side_headline'] = array(
		'label'       => esc_html__( 'Display Header Side Widget Area', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '430',
		'active_callback' => 'maglume_callback_logo_side',
	);
	$settings['logo_side'] = array(
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'widget-area' => esc_html__( "Logo (left) + 'Header Side' widget area (right)", 'magazine-lume' ),
			'none'        => esc_html__( 'Logo (center)', 'magazine-lume' ),
		),
		'default'     => 'widget-area',
		'priority'    => '440',
		'active_callback' => 'maglume_callback_logo_side',
		'selective_refresh' => array( 'logo_side_partial', array(
			'selector'            => '#sitehead-aside',
			'settings'            => array( 'logo_side' ),
			'render_callback'     => 'maglume_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', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '450',
	);

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

	$settings['fullwidth_menu_align'] = array(
		'label'       => esc_html__( 'Menu alignment (Desktop)', 'magazine-lume' ),
		'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'     => 'left',
		'priority'    => '470',
		'active_callback' => 'maglume_callback_menu_align',
		'transport' => 'postMessage',
	);

	$settings['menu_background_shortcut'] = array(
		'label'       => esc_html__( 'Menu Background/Text Color', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'content'     => sprintf( esc_html__( 'To modify Menu colors, go to %1$sColors / Backgrounds section%2$s.', 'magazine-lume' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=colors' ) ) . '" rel="focuslink" data-focustype="section" data-href="colors">', '</a>' ),
		'active_callback' => 'maglume_callback_menu_misc',
		'priority'    => '475',
	);

	$settings['disable_table_menu'] = array(
		'label'       => esc_html__( 'Single Line Menu', 'magazine-lume' ),
		/* 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', 'magazine-lume' ), '<hr>', "<hr><img src='{$imagepath}menu-table.png'>" ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 1,
		'priority'    => '480',
		'active_callback' => 'maglume_callback_menu_misc',
		'transport' => 'postMessage',
	);

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

	$settings['mobile_submenu_click'] = array(
		'label'       => esc_html__( "[Mobile Menu] Submenu opens on 'Click'", 'magazine-lume' ),
		'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).", 'magazine-lume' ), '<hr>' ),
		'priority'    => '500',
		'active_callback' => 'maglume_callback_menu_misc',
		'transport' => 'postMessage',
	);

	/** Section **/

	$section = 'stickysitehead';

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

	$settings['sticky_accent'] = array(
		'label'       => esc_html__( 'Color Scheme', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'default' => esc_html__( 'Default', 'magazine-lume' ),
			'accent'  => esc_html__( 'Use Accent Color', 'magazine-lume' ),
		),
		'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', 'magazine-lume' ),
					'betooltip'   => esc_html__( 'Check this to display a fixed Header at top when a user scrolls down the page.', 'magazine-lume' ),
					'type'        => 'bettertoggle',
					'default'     => 1,
					'transport' => 'postMessage',
				),
				'sticky_sitehead_dtp_layout' => array(
					'label'       => esc_html__( 'Sticky Header on Desktop', 'magazine-lume' ),
					'type'        => 'radio',
					'choices'     => array(
						'topbar'       => esc_html__( 'Topbar', 'magazine-lume' ),
						'logo'         => esc_html__( 'Logo', 'magazine-lume' ),
						'menu'         => esc_html__( 'Menu', 'magazine-lume' ),
						'text'         => esc_html__( 'Text', 'magazine-lume' ),
						'logomenu'     => esc_html__( 'Logo (left) + Menu (right)', 'magazine-lume' ),
						'logomenudiv'  => esc_html__( 'Logo (top) + Menu (bottom)', 'magazine-lume' ),
						'logotext'     => esc_html__( 'Logo (left) + Text (right)', 'magazine-lume' ),
						'logotextdiv'  => esc_html__( 'Logo (top) + Text (bottom)', 'magazine-lume' ),
						'logomenutext' => esc_html__( 'Logo (left) + Menu (right) + Text (bottom)', 'magazine-lume' ),
					),
					'default'     => 'logomenu',
					'active_callback' => 'maglume_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', 'magazine-lume' ), '<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' => 'maglume_callback_sticky_dtp',
				),
				'sticky_sitehead_dtp_logozoom' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Logo Size (desktop sticky)', 'magazine-lume' ),
					'type'        => 'betterrange',
					'displaysuffix' => '%',
					'default'       => $sticky_sitehead_dtp_logozoom,
					'showreset'     => $sticky_sitehead_dtp_logozoom,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 100,
						'step' => 1,
					),
					'active_callback' => 'maglume_callback_sticky_dtp_logo',
					'transport' => 'postMessage',
				),
				'sticky_sitehead_dtp_text' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Custom Text (desktop sticky)', 'magazine-lume' ),
					'type'        => 'textarea',
					'active_callback' => 'maglume_callback_sticky_dtp_text',
					'selective_refresh' => array( 'sticky_dtp_text_partial', array(
						'selector'            => '#sitehead-extradtp',
						'settings'            => array( 'sticky_sitehead_dtp_text' ),
						'render_callback'     => 'maglume_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', 'magazine-lume' ),
					'betooltip'   => esc_html__( 'Check this to display a fixed Header at top when a user scrolls down the page.', 'magazine-lume' ),
					'type'        => 'bettertoggle',
					'default'     => 1,
					'transport' => 'postMessage',
				),
				'sticky_sitehead_mob_layout' => array(
					'label'       => esc_html__( 'Sticky Header on Mobile', 'magazine-lume' ),
					'type'        => 'radio',
					'choices'     => array(
						'topbar'       => esc_html__( 'Topbar', 'magazine-lume' ),
						'logo'         => esc_html__( 'Logo', 'magazine-lume' ),
						'menu'         => esc_html__( 'Menu', 'magazine-lume' ),
						'menuleft'     => esc_html__( 'Menu (left)', 'magazine-lume' ), // XTRA
						'menuright'    => esc_html__( 'Menu (right)', 'magazine-lume' ), // XTRA
						'text'         => esc_html__( 'Text', 'magazine-lume' ),
						'logomenu'     => esc_html__( 'Logo (left) + Menu (right)', 'magazine-lume' ),
						'menulogo'     => esc_html__( 'Menu (left) + Logo (right)', 'magazine-lume' ),
						'logotext'     => esc_html__( 'Logo (left) + Text (right)', 'magazine-lume' ),
						'logotextdiv'  => esc_html__( 'Logo (top) + Text (bottom)', 'magazine-lume' ),
						'logomenutext' => esc_html__( 'Logo (left) + Menu (right) + Text (bottom)', 'magazine-lume' ),
					),
					'default'     => 'logomenu',
					'active_callback' => 'maglume_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', 'magazine-lume' ), '<ul style="margin-top:-15px">', '</ul>', '<li>', '</li>' ),
				),
				'sticky_sitehead_mob_logozoom' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Logo Size (mobile sticky)', 'magazine-lume' ),
					'type'        => 'betterrange',
					'displaysuffix' => '%',
					'default'       => $sticky_sitehead_mob_logozoom,
					'showreset'     => $sticky_sitehead_mob_logozoom,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 100,
						'step' => 1,
					),
					'active_callback' => 'maglume_callback_sticky_mob_logo',
					'transport' => 'postMessage',
				),
				'sticky_sitehead_mob_text' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Custom Text (mobile sticky)', 'magazine-lume' ),
					'type'        => 'textarea',
					'active_callback' => 'maglume_callback_sticky_mob_text',
					'selective_refresh' => array( 'sticky_mob_text_partial', array(
						'selector'            => '#sitehead-extramob',
						'settings'            => array( 'sticky_sitehead_mob_text' ),
						'render_callback'     => 'maglume_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', 'magazine-lume' ),
		'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', 'magazine-lume' ), '<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", 'magazine-lume' ),
		/* 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.', 'magazine-lume' ), '<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', 'magazine-lume' ),
			'blog'      => esc_html__( 'Blog Page', 'magazine-lume' ),
			'archive'   => esc_html__( 'Archive Page (Categories, Tags etc)', 'magazine-lume' ),
			'posts'     => esc_html__( 'Single Post Page', 'magazine-lume' ),
			'pages'     => esc_html__( 'Single Page', 'magazine-lume' ),
			'search'    => esc_html__( 'Search Results Page', 'magazine-lume' ),
			'notfound'  => esc_html__( '404 Page', 'magazine-lume' ),
		),
		'default'     => 'home, blog, archive, posts, pages, search, 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:', 'magazine-lume' ) ),
				'shop'        => esc_html__( 'Shop Page', 'magazine-lume' ),
				'product'     => esc_html__( 'Single Product Page', 'magazine-lume' ),
				'shoparchive' => esc_html__( 'Product Archive Page (Categories, Tags etc)', 'magazine-lume' ),
				'cart'        => esc_html__( 'Cart Page', 'magazine-lume' ),
				'checkout'    => esc_html__( 'Checkout Page', 'magazine-lume' ),
				'account'     => esc_html__( 'My Account Page', 'magazine-lume' ),
			)
		);
		$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", 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'radioimage',
		'choices'     => array(
			'boxed'   => $imagepath . 'fp-widgetarea-boxed.png',
			'stretch' => $imagepath . 'fp-widgetarea-stretch.png',
		),
		'default'     => 'boxed',
		'priority'    => '530',
		'transport' => 'postMessage',
	);

	$settings['below_sitehead_align'] = array(
		'boxdivi'     => 'div-ve10',
		'description' => esc_html__( "'Below Header' areas alignment", 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'leftright'   => esc_html__( 'Left / Right', 'magazine-lume' ),
			'center'      => esc_html__( 'Center', 'magazine-lume' ),
		),
		'default'     => 'leftright',
		'priority'    => '530',
		'transport' => 'postMessage',
	);

	$settings['below_sitehead_padding'] = array(
		'label'       => esc_html__( 'Padding', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'spacings',
		'default'     => $below_sitehead_padding,
		'showreset'   => $below_sitehead_padding,
		'allowneg'    => false,
		'mediaquery'  => true,
		'priority'    => '535',
		'transport' => 'postMessage',
	);
	$settings['belowsh_scheme_shortcut'] = array(
		'label'       => esc_html__( 'Below Sitehead Area Background/Text', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'content'     => sprintf( esc_html__( 'To modify Below Sitehead colors, go to %1$sColors / Backgrounds section%2$s.', 'magazine-lume' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=colors' ) ) . '" rel="focuslink" data-focustype="section" data-href="colors">', '</a>' ),
		'priority'    => '540',
	);

	/** Section **/

	$section = 'footer';

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

	$settings['footer_ops'] = array(
		'section'     => $section,
		'type'        => 'tabs',
		'headingtabs' => true,
		'disablejstoggle' => true,
		'priority'    => '540',
		'options'     => array(

			'sub-footer' => array(
				'subfooter_conastipnote' => array(
					'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.', 'magazine-lume' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[panel]=widgets' ) ) . '" rel="focuslink" data-focustype="panel" data-href="widgets">', '</a>' ),
				),
				'subfooter_display' => array(
					'label'       => esc_html__( 'Enable Subfooter area on following pages', 'magazine-lume' ),
					'type'        => 'checkbox',
					'choices'     => array(
						'home'      => esc_html__( 'Home Page', 'magazine-lume' ),
						'blog'      => esc_html__( 'Blog Page', 'magazine-lume' ),
						'archive'   => esc_html__( 'Archive Page (Categories, Tags etc)', 'magazine-lume' ),
						'posts'     => esc_html__( 'Single Post Page', 'magazine-lume' ),
						'pages'     => esc_html__( 'Single Page', 'magazine-lume' ),
						'search'    => esc_html__( 'Search Results Page', 'magazine-lume' ),
						'notfound'  => esc_html__( '404 Page', 'magazine-lume' ),
					),
					'default'     => 'home, blog, archive, posts, pages, search, notfound',
				),
				'subfooter_grid' => array(
					'label'       => esc_html__( 'Stretch Subfooter Content to cover full available width', 'magazine-lume' ),
					'type'        => 'radioimage',
					'choices'     => array(
						'boxed'   => $imagepath . 'fp-widgetarea-boxed.png',
						'stretch' => $imagepath . 'fp-widgetarea-stretch.png',
					),
					'default'     => 'boxed',
					'transport' => 'postMessage',
				),
				'subfooter_padding' => array(
					'label'       => esc_html__( 'Sub Footer Padding', 'magazine-lume' ),
					'type'        => 'spacings',
					'default'     => $subfooter_padding,
					'showreset'   => $subfooter_padding,
					'allowneg'    => false,
					// 'defaultlinked'=>false, // added to default/reset array instead
					'mediaquery'  => true,
					'transport' => 'postMessage',
				),
			),

			'footer' => array(
				'footer' => array(
					'label'       => esc_html__( 'Footer Layout Columns', 'magazine-lume' ),
					/* 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', 'magazine-lume' ), '<a href="' . esc_url( admin_url('widgets.php') ) . '" target="_blank">', '</a>' ),
					'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',
					'transport' => 'postMessage',
				),
				'footer_flexstretch' => array(
					'boxdivi'     => false,
					'description' => esc_html__( 'Try to space widgets vertically for a more symmetrical look.', 'magazine-lume' ),
					'betooltip'   => '<img src="' . $imagepath . 'flexstretch.png">',
					'type'        => 'checkbox',
					'default'     => $footer_flexstretch,
					'transport' => 'postMessage',
				),
				'footer_padding' => array(
					'boxdivi'     => 'divbig',
					'label'       => esc_html__( 'Footer Padding', 'magazine-lume' ),
					'type'        => 'spacings',
					'spaces'      => 'tb',
					'default'     => $footer_padding,
					'showreset'   => $footer_padding,
					'allowneg'    => false,
					// 'defaultlinked'=>false, // added to default/reset array instead
					'mediaquery'  => true,
					'transport' => 'postMessage',
				),
			),

			'post-footer' => array(
				'postfooter_text' => array(
					'label'       => esc_html__( 'Post Footer Text', 'magazine-lume' ),
					'betooltip'   => array( 'desctip' => 'info' ),
					'type'        => 'textarea',
					'default'     => esc_html__( '<!--default--> &copy; <!--year-->', 'magazine-lume'),
					'selective_refresh' => array( 'postfooter_partial', array(
						'selector'            => '#post-footer',
						'settings'            => array( 'postfooter_text' ),
						'render_callback'     => 'maglume_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
					', 'magazine-lume' ),
						'<ul>', '</ul>',
						'<li>', '</li>',
						'<mark>', '</mark>',
						'<a href="http://ascii.cl/htmlcodes.htm" target="_blank">', '</a>' ),
				),
				'postfooter_padding' => array(
					'label'       => esc_html__( 'Post Footer Padding', 'magazine-lume' ),
					'type'        => 'spacings',
					'spaces'      => 'tb',
					'default'     => $postfooter_padding,
					'showreset'   => $postfooter_padding,
					'allowneg'    => false,
					'mediaquery'  => true,
					'transport' => 'postMessage',
				),
			),

		),
	);

	if ( current_theme_supports( 'woocommerce' ) ) :
		$settings['footer_ops']['options']['sub-footer']['subfooter_display']['choices'] = array_merge(
			$settings['footer_ops']['options']['sub-footer']['subfooter_display']['choices'],
			array(
				'h01'         => array( esc_html__( 'WooCommerce:', 'magazine-lume' ) ),
				'shop'        => esc_html__( 'Shop Page', 'magazine-lume' ),
				'product'     => esc_html__( 'Single Product Page', 'magazine-lume' ),
				'shoparchive' => esc_html__( 'Product Archive Page (Categories, Tags etc)', 'magazine-lume' ),
				'cart'        => esc_html__( 'Cart Page', 'magazine-lume' ),
				'checkout'    => esc_html__( 'Checkout Page', 'magazine-lume' ),
				'account'     => esc_html__( 'My Account Page', 'magazine-lume' ),
			)
		);
		$settings['footer_ops']['options']['sub-footer']['subfooter_display']['default'] .= ', shop, product, shoparchive, cart, checkout, account';
	endif;

	/** Section **/

	$section = 'hootshead-st';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Styling', 'magazine-lume' ),
		'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', 'magazine-lume' ),
		'priority'    => '65',
	);

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

	$settings['color1_headline'] = array(
		'label'       => esc_html__( 'General', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '625',
	);

	$presets_arr = array(
		'default'    => array( 'accent_color' => $accent_color, 'accent_font' => $accent_font, 'link_hover_color' => ( !empty( $link_hover_color ) ? $link_hover_color : $accent_color ) ),
		'orange'     => array( 'accent_color' => '#e27500', 'accent_font' => '#ffffff', 'link_hover_color' => '#914300' ),
		'green'      => array( 'accent_color' => '#7ea844', 'accent_font' => '#ffffff', 'link_hover_color' => '#435a24' ),
		'dgreen'     => array( 'accent_color' => '#458700', 'accent_font' => '#ffffff', 'link_hover_color' => '#1f3b00' ),
		'aqua'       => array( 'accent_color' => '#38b295', 'accent_font' => '#ffffff', 'link_hover_color' => '#246e5d' ),
		'blue'       => array( 'accent_color' => '#0d99e9', 'accent_font' => '#ffffff', 'link_hover_color' => '#074d75ff' ),
		'rblue'      => array( 'accent_color' => '#107cdb', 'accent_font' => '#ffffff', 'link_hover_color' => '#093f6e' ),
		'brown'      => array( 'accent_color' => '#614c23', 'accent_font' => '#ffffff', 'link_hover_color' => '#201a0c' ),
		'black'      => array( 'accent_color' => '#222222', 'accent_font' => '#ffffff', 'link_hover_color' => '#757575' ),
		'maroon'     => array( 'accent_color' => '#ad2929', 'accent_font' => '#ffffff', 'link_hover_color' => '#501313' ),
		'red'        => array( 'accent_color' => '#db0000', 'accent_font' => '#ffffff', 'link_hover_color' => '#700000' ),
	);
	$presets = '';
	foreach ( $presets_arr as $key => $value ) {
		$value['link_color'] = $value['accent_color'];
		$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:', 'magazine-lume' ),
		'description' => esc_html__( 'Applying these presets will modify the color settings below.', 'magazine-lume' ),
		'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', 'magazine-lume' ),
		'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', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'color',
		'multi'       => array( 'button_color', 'button_font' ),
		'default'     => array( $button_color, $button_font ),
		'priority'    => '650',
		'transport' => 'postMessage',
	);

	$settings['color2_headline'] = array(
		'label'       => esc_html__( 'Site', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '655',
	);

	$settings['background'] = array(
		'label'       => esc_html__( 'Site Background', 'magazine-lume' ),
		/* 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.', 'magazine-lume' ), '<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',
		'overlay'     => true,
		'priority'    => '660',
		'default'     => array(
			'color'      => $site_background,
			'overlay'    => $overlay_color,
		),
		'transport' => 'postMessage',
	);

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

	$settings['color3_headline'] = array(
		'label'       => esc_html__( 'Header', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '680',
	);

	$settings['topbar_colorscheme'] = array(
		'label'           => esc_html__( 'Topbar', 'magazine-lume' ),
		'section'         => $section,
		'type'            => 'selectsmall',
		'choices'     => array(
			'default'   => esc_html__( 'Default', 'magazine-lume' ),
			'accent'    => esc_html__( 'Accent Color/Font', 'magazine-lume' ),
			'darkfont'  => esc_html__( 'Dark Font', 'magazine-lume' ),
			'lightfont' => esc_html__( 'Light Font', 'magazine-lume' ),
			'light'     => esc_html__( 'Dark Font / Light Background', 'magazine-lume' ),
			'dark'      => esc_html__( 'Light Font / Dark Background', 'magazine-lume' ),
		),
		'default'     => 'default',
		'priority'    => '715',
		'transport' => 'postMessage',
	);

	$settings['menu_colorscheme'] = array(
		'boxdivi'         => false,
		'label'           => esc_html__( 'Main Menu', 'magazine-lume' ),
		'section'         => $section,
		'type'            => 'selectsmall',
		'choices'     => array(
			'default'   => esc_html__( 'Default', 'magazine-lume' ),
			'accent'    => esc_html__( 'Accent Color/Font', 'magazine-lume' ),
			'darkfont'  => esc_html__( 'Dark Font', 'magazine-lume' ),
			'lightfont' => esc_html__( 'Light Font', 'magazine-lume' ),
			'light'     => esc_html__( 'Dark Font / Light Background', 'magazine-lume' ),
			'dark'      => esc_html__( 'Light Font / Dark Background', 'magazine-lume' ),
		),
		'default'     => 'default',
		'priority'    => '715',
		'transport' => 'postMessage',
	);
	$settings['menu_colorscheme_pnote'] = array(
		'boxdivi'     => 'div-ve15',
		'section'     => $section,
		'priority'    => '715',
	);

	$settings['logo_background_clone'] = array(
		'label'           => esc_html__( 'Logo Background Color', 'magazine-lume' ),
		'description'     => sprintf( esc_html__( '%1$sTIP:%2$s To remove the background, set opacity to 0 in the color picker.', 'magazine-lume' ), '<strong>', '</strong>' ),
		'betooltip'       => array( 'tip', sprintf( esc_html__( 'Logo font color can be changed in the %1$sTypography%2$s section.', 'magazine-lume' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=typography' ) ) . '" rel="focuslink" data-focustype="section" data-href="typography">', '</a>' ) ),
		'section'         => $section,
		'type'            => 'color',
		'cloneof'         => 'logo_background',
		'priority'        => '720',
	);
	$settings['belowsh_scheme'] = array(
		'label'       => esc_html__( 'Below Sitehead Area Background/Text', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'selectsmall',
		'choices'     => array(
			'default'   => esc_html__( 'Default', 'magazine-lume' ),
			'light'     => esc_html__( 'Dark Font / Light Background', 'magazine-lume' ),
			'dark'      => esc_html__( 'Light Font / Dark Background', 'magazine-lume' ),
			'custom'    => esc_html__( 'Custom Colors', 'magazine-lume' ),
		),
		'default'     => 'default',
		'priority'    => '770',
		'transport' => 'postMessage',
	);
	$settings['belowsh_colorscheme'] = array(
		'boxdivi'     => 'div-ve15',
		'description' => esc_html__( 'Custom Background / Font', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'color',
		'hasalpha'    => array( true, false ),
		'multi'       => array( 'belowsh_bg', 'belowsh_color' ),
		'default'     => array( $belowsh_bg, $belowsh_color ),
		'priority'    => '770',
		'active_callback' => 'maglume_callback_belowsh_colors',
		'transport' => 'postMessage',
	);

	$settings['color4_headline'] = array(
		'label'       => esc_html__( 'Single - Post/Page', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '780',
	);

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

	/** Section **/

	$section = 'typography';

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

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

	$settings['load_local_fonts'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Load webfonts locally', 'magazine-lume' ),
		/* 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', 'magazine-lume' ), '<hr>', '<em>', '</em>' ) ),
		'section'     => $section,
		'type'        => 'bettertoggle',
		'default'     => 0,
		'priority'    => '690',
	);

	$settings['logo_font'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Logo Font', 'magazine-lume' ),
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'betooltip'   => sprintf( esc_html__( 'Options like Font Color and Font Size will apply only if Logo is set to "Default Text" in the %1$sLogo Section%2$s', 'magazine-lume' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=logo' ) ) . '" rel="focuslink" data-focustype="section" data-href="logo">', '</a>' ),
		'type'        => 'betterfont',
		'section'     => $section,
		'choices'     => array( 'color', 'face', 'subsets', 'size', 'lheight', 'lspace', 'weight', 'style', 'trans', 'deco' ),
		'transport' => 'postMessage',
		'options'     => array(
			'color' => array(
				'cloneof'       => 'logo_color',
			),
			'size'  => array(
				'mediaquery' => true,
			),
		),
		'default'     => $logo_font,
		'showreset'   => array( 'all', 'face', 'size', 'lheight', 'lspace' ),
		'priority'    => '710',
	);
	$settings['heading_size'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Headings Sizes (Free version)', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'selectsmall',
		'choices'     => array(
			'small'      => esc_html__( 'Small', 'magazine-lume' ),
			'normal'     => esc_html__( 'Normal (default)', 'magazine-lume' ),
			'large'      => esc_html__( 'Large', 'magazine-lume' ),
			'extralarge' => esc_html__( 'Extra Large', 'magazine-lume' ),
			'huge'       => esc_html__( 'Huge', 'magazine-lume' ),
		),
		'default'     => 'normal',
		'priority'    => '720',
		'transport' => 'postMessage',
	);

	$settings['heading_font'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Headings', 'magazine-lume' ),
		'type'        => 'betterfont',
		'section'     => $section,
		'choices'     => array( 'color', 'face', 'subsets', 'weight', 'style', 'trans', 'deco' ),
		'transport' => 'postMessage',
		'options'     => array(
		),
		'default'     => $heading_font,
		'showreset'   => array( 'all', 'face' ),
		'priority'    => '730',
	);

	$settings['subheading_font'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Sub Headings', 'magazine-lume' ),
		'type'        => 'betterfont',
		'section'     => $section,
		'choices'     => array( 'color', 'face', 'subsets', 'weight', 'style', 'trans', 'deco' ),
		'transport' => 'postMessage',
		'options'     => array(
			'color' => array(
				'betooltip'   => esc_html__( 'In some cases, Font Color might not apply to some sub-headings if their parent section uses a predefined color scheme.', 'magazine-lume' ),
			),
			'size'  => array( 'mediaquery' => true ),
		),
		'default'     => $subheading_font,
		'showreset'   => array( 'all', 'face' ),
		'priority'    => '750',
	);

	$settings['body_font'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Body Font', 'magazine-lume' ),
		'type'        => 'betterfont',
		'section'     => $section,
		'choices'     => array( 'color', 'face', 'subsets', 'size', 'lheight', 'lspace', 'weight', 'style', 'trans' ),
		'transport' => 'postMessage',
		'options'     => array(
			'size'  => array( 'mediaquery' => true ),
		),
		'default'     => $body_font,
		'showreset'   => array( 'all', 'face', 'size', 'lheight', 'lspace' ),
		'priority'    => '770',
	);
	$settings['link_color_font'] = array(
		'boxdivi'     => false,
		'label'       => esc_html__( 'Link Color / Hover', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'color',
		'multi'       => array( 'link_color', 'link_hover_color' ),
		'default'     => array( $link_color, $link_hover_color ),
		'priority'    => '780',
		'transport' => 'postMessage',
	);

	/** Section **/

	$section = 'hootshead-sa';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Site Areas', 'magazine-lume' ),
		'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', 'magazine-lume' ), '<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', 'magazine-lume' ), '<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', 'magazine-lume' ), '<a href="' . esc_url( hoot_dashboard( 'url', array( 'tab' => 'hootkit' ) ) ) .'" 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', 'magazine-lume' ), '<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', 'magazine-lume' ),
		'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.', 'magazine-lume' ) ),
		'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', 'magazine-lume' ),
					'description' => esc_html__( 'To display this image, choose a layout that includes an image (see Style tab).', 'magazine-lume' ),
					'type'        => 'image',
					'default'     => hoot_data()->template_uri . 'images/placeholder.png',
					'transport' => 'postMessage',
				),
				'header_image_title' => array(
					'label'       => esc_html__( 'Heading', 'magazine-lume' ),
					'type'        => 'text',
					'default'     => esc_html__( 'Welcome to our Site', 'magazine-lume' ),
					'transport' => 'postMessage',
				),
				'header_image_subtitle' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Sub Heading', 'magazine-lume' ),
					'type'        => 'text',
					'default'     => esc_html__( 'Modify these settings from Customizer - Homepage Image section', 'magazine-lume' ),
					'transport' => 'postMessage',
				),
				'header_image_text' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Text', 'magazine-lume' ),
					'type'        => 'text',
					'transport' => 'postMessage',
					'selective_refresh' => array( 'header_image_text_partial', array(
						'selector'            => '#fpimg-text',
						'settings'            => array( 'header_image_text' ),
						'render_callback'     => 'maglume_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', 'magazine-lume' ),
					'type'        => 'text',
					'default'     => esc_html__( 'Know More', 'magazine-lume' ),
					'transport' => 'postMessage',
				),
				'header_image_url' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Button 1 URL', 'magazine-lume' ),
					'type'        => 'url',
					'default'     => esc_url( home_url() ),
					'input_attrs' => array(
						'placeholder' => esc_html__( 'https://', 'magazine-lume' ),
					),
					'transport' => 'postMessage',
				),
				'header_image_button2' => array(
					'label'       => esc_html__( 'Button 2 Text', 'magazine-lume' ),
					'type'        => 'text',
					'default'     => esc_html__( 'Know More', 'magazine-lume' ),
					'transport' => 'postMessage',
				),
				'header_image_url2' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Button 2 URL', 'magazine-lume' ),
					'type'        => 'url',
					'default'     => esc_url( home_url() ),
					'input_attrs' => array(
						'placeholder' => esc_html__( 'https://', 'magazine-lume' ),
					),
					'transport' => 'postMessage',
				),
			),
			'style' => array(

				'header_image_headlinelay' => array(
					'label'       => esc_html__( 'Layout', 'magazine-lume' ),
					'type'        => 'content',
					'class'       => 'hoot-headline2',
				),
				'header_image_layout' => array(
					'label'       => esc_html__( 'Layout (Text &amp; Feature Image)', 'magazine-lume' ),
					'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'     => 5,
					'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'     => 'maglume_header_image',
						'container_inclusive' => true,
						'fallback_refresh'    => false, // prevents full refresh on non applicable views
						) ),
				),
				'header_image_minheight' => array(
					'label'       => esc_html__( 'Minimum Height', 'magazine-lume' ),
					'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.', 'magazine-lume' ), '<hr>' ),
					'type'            => 'betterrange',
					'mediaquery'      => true,
					'displaysuffix'   => 'px',
					'default'         => array( 'desktop' => 400, 'tablet' => 200, 'mobile' => 200 ),
					'showreset'       => array( 'desktop' => 400, 'tablet' => 200, 'mobile' => 200 ),
					'input_attrs'     => array(
						'min'  => 0,
						'max'  => 1000,
						'step' => 10,
					),
					'active_callback' => 'maglume_callback_header_image_minheight',
					'transport' => 'postMessage',
				),
				'header_image_conpad' => array(
					'label'       => esc_html__( 'Content Margin', 'magazine-lume' ),
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 60,
					'input_attrs'     => array(
						'min'  => 0,
						'max'  => 250,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),
				'header_image_imgpad' => array(
					'label'       => esc_html__( 'Feature Image Margin', 'magazine-lume' ),
					'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', 'magazine-lume' ),
					'type'        => 'content',
					'class'       => 'hoot-headline2',
				),
				'header_image_headcolor' => array(
					'label'       => esc_html__( 'Heading Size / Color', 'magazine-lume' ),
					'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', 'magazine-lume' ),
					'type'            => 'color',
					'default'         => '#ffffff',
					'transport' => 'postMessage',
				),
				'header_image_subheadsize' => array(
					'boxdivi'     => 'div-ve10',
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 16,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 150,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),
				'header_image_textcolor' => array(
					'label'       => esc_html__( 'Text Size / Color', 'magazine-lume' ),
					'type'            => 'color',
					'default'         => '#ffffff',
					'transport' => 'postMessage',
				),
				'header_image_textsize' => array(
					'boxdivi'     => 'div-ve10',
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 16,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 150,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),
				'header_image_btnsize' => array(
					'label'       => esc_html__( 'Button Text Size', 'magazine-lume' ),
					'type'            => 'betterrange',
					'displaysuffix'   => 'px',
					'default'         => 16,
					'input_attrs'     => array(
						'min'  => 10,
						'max'  => 150,
						'step' => 1,
					),
					'transport' => 'postMessage',
				),
				'header_image_btn1style' => array(
					'boxdivi'     => false,
					'label'       => esc_html__( 'Button 1 Color / Font', 'magazine-lume' ),
					'description' => esc_html__( 'Leave empty for default', 'magazine-lume' ),
					'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', 'magazine-lume' ),
					'description' => esc_html__( 'Leave empty for default', 'magazine-lume' ),
					'type'            => 'color',
					'hasalpha'    => array( true, false ),
					'multi'       => array( 'header_image_btnbg2', 'header_image_btncolor2' ),
					'transport' => 'postMessage',
				),

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

			),
		),
	);

	/** Section **/

	$section = 'frontpage';

	$sections[ $section ] = array(
		'title'       => esc_html__( 'Frontpage Modules', 'magazine-lume' ),
		'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', 'magazine-lume' ), '<a href="' . esc_url( hoot_dashboard( 'url', array( 'tab' => 'hootkit' ) ) ) .'" target="_blank">', '</a>' ),
		'priority'    => '1',
	);
	endif;

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

	$settings['frontpage_default_sections'] = array(
		'label'       => esc_html__( 'Default Frontpage', 'magazine-lume' ),
		/* 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', 'magazine-lume' ), '<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', 'magazine-lume' ),
			'content'     => esc_html__( 'Homepage Content', 'magazine-lume' ),
		),
		'options'     => array(),
		'attributes'  => array(
			'flypanel'      => false,
			'hideable'      => false,
			'sortable'      => true,
		),
		'priority'    => '840',
		'active_callback' => 'maglume_callback_frontpage_default_sections',
	);

	$settings['frontpage_sections'] = array(
		'label'       => esc_html__( 'Frontpage Widget Areas', 'magazine-lume' ),
		/* 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', 'magazine-lume' ), '<ul>', '</ul>', '<li>', '</li>' ),
		'section'     => $section,
		'type'        => 'sortlist',
		'choices'     => array(
			'image'       => esc_html__( 'Homepage Image', 'magazine-lume' ),
			'area_a'      => esc_html__( 'Widget Area A', 'magazine-lume' ),
			'area_b'      => esc_html__( 'Widget Area B', 'magazine-lume' ),
			'area_c'      => esc_html__( 'Widget Area C', 'magazine-lume' ),
			'area_d'      => esc_html__( 'Widget Area D', 'magazine-lume' ),
			'content'     => esc_html__( 'Homepage Content', 'magazine-lume' ),
			'area_e'      => esc_html__( 'Widget Area E', 'magazine-lume' ),
			'area_f'      => esc_html__( 'Widget Area F', 'magazine-lume' ),
			'area_g'      => esc_html__( 'Widget Area G', 'magazine-lume' ),
			'area_h'      => esc_html__( 'Widget Area H', 'magazine-lume' ),
			'area_i'      => esc_html__( 'Widget Area I', 'magazine-lume' ),
			'area_j'      => esc_html__( 'Widget Area J', 'magazine-lume' ),
			'area_k'      => esc_html__( 'Widget Area K', 'magazine-lume' ),
			'area_l'      => esc_html__( 'Widget Area L', 'magazine-lume' ),
			'area_m'      => esc_html__( 'Widget Area M', 'magazine-lume' ),
			'area_n'      => esc_html__( 'Widget Area N', 'magazine-lume' ),
		),
		'default'     => array(
			'image'   => array( 'sortitem_hide' => 1, ),
			'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, ),
			'area_m'  => array( 'sortitem_hide' => 1, ),
			'area_n'  => array( 'sortitem_hide' => 1, ),
		),
		'options'     => array(),
		'attributes'  => array(
			'flypanel'      => true,
			'hideable'      => true,
			'sortable'      => true,
		),
		'priority'    => '850',
		'active_callback' => 'maglume_callback_frontpage_sections',
		'transport' => 'postMessage',
	);

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

	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', 'magazine-lume' ),
			'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', 'magazine-lume' ),
						'<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', 'magazine-lume' ) . '</span>' . sprintf( esc_html__( '%1$sThis module shows the image you have set in %3$sHomepage Image%4$s section%2$s', 'magazine-lume' ),
					'<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', 'magazine-lume' ) . '</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', 'magazine-lume' ),
					'<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)', 'magazine-lume' ),
				'type'        => 'text',
				'transport' => 'postMessage',
			);
		} else {
			$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['columns'] = array(
				'label'   => esc_html__( 'Columns', 'magazine-lume' ),
				'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', 'magazine-lume' ),
			'type'        => 'content',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['grid'] = array(
			'boxdivi'     => 'div-ve20',
			'description' => esc_html__( 'Boxed vs. Full Width', 'magazine-lume' ),
			'betooltip'   => esc_html__( 'The full-width layout is ideal for displaying edge-to-edge slider widgets.', 'magazine-lume' ),
			'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.', 'magazine-lume' ),
				'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', 'magazine-lume' ),
			'type'    => 'radio',
			'choices' => array(
				'none'        => esc_html__( 'None', 'magazine-lume' ),
				'color'       => esc_html__( 'Color', 'magazine-lume' ),
				'image'       => esc_html__( 'Image', 'magazine-lume' ),
			),
			'default' => 'none',
			'transport' => 'postMessage',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['color'] = array(
			'boxdivi'     => 'div-ve10',
			'label'       => esc_html__( 'Background Color', 'magazine-lume' ),
			'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', 'magazine-lume' ),
			'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', 'magazine-lume' ),
			'type'    => 'checkbox',
			'wpctrl'  => true,
			'default' => 1,
			'transport' => 'postMessage',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['font'] = array(
			'label'   => esc_html__( 'Font Color', 'magazine-lume' ),
			'type'    => 'radio',
			'choices' => array(
				'theme'       => esc_html__( 'Default Theme Color', 'magazine-lume' ),
				'color'       => esc_html__( 'Custom Font Color', 'magazine-lume' ),
				'force'       => esc_html__( 'Force Custom Font Color', 'magazine-lume' ),
			),
			'default' => 'theme',
			'transport' => 'postMessage',
		);
		$settings["frontpage_sectionbg_{$fpgmodid}"]['options']['fontcolor'] = array(
			'boxdivi'     => 'div-ve10',
			'label'       => esc_html__( 'Custom Font Color', 'magazine-lume' ),
			'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)', 'magazine-lume' ),
		'priority'    => '85',
	);

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

	$settings['archive_type'] = array(
		'label'       => esc_html__( 'Archive (Blog) Layout', 'magazine-lume' ),
		'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', 'magazine-lume' ),
		'betooltip'   => esc_html__( 'Check which information to display for each post item on the archive page.', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'sortlist',
		'choices'     => array(
			'cats'     => esc_html__( 'Categories', 'magazine-lume' ),
			'author'   => esc_html__( 'Author', 'magazine-lume' ),
			'date'     => esc_html__( 'Date', 'magazine-lume' ),
			'tags'     => esc_html__( 'Tags', 'magazine-lume' ),
			'comments' => esc_html__( 'No. of comments', 'magazine-lume' ),
		),
		'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'     => 'maglume_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', 'magazine-lume' ),
		'betooltip'   => esc_html__( 'Content to display for each post on the archive page.', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'radio',
		'choices'     => array(
			'none' => esc_html__( 'None', 'magazine-lume' ),
			'excerpt' => esc_html__( 'Post Excerpt', 'magazine-lume' ),
			'full-content' => esc_html__( 'Full Post Content', 'magazine-lume' ),
		),
		'default'     => 'excerpt',
		'priority'    => '910',
	);

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

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

	$settings['gridarticle_align'] = array(
		'label'       => esc_html__( 'Content Alignment', 'magazine-lume' ),
		'description' => esc_html__( 'Desktop:', 'magazine-lume' ),
		'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:', 'magazine-lume' ),
		'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)', 'magazine-lume' ),
		'priority'    => '90',
	);

	$settings['page_header_full'] = array(
		'label'       => esc_html__( 'Stretch Title Area to Full Width at Top', 'magazine-lume' ),
		'description' => esc_html__( 'This is the Page Header area containing Page/Post Title and Meta details like author, categories etc.', 'magazine-lume' ) . '<hr/>' . '<img src="' . $imagepath . 'page-header.png">',
		'section'     => $section,
		'type'        => 'checkbox',
		'choices'     => array(
			'default'    => esc_html__( 'Default (Archives, Blog, Woocommerce etc.)', 'magazine-lume' ),
			'posts'      => esc_html__( 'For All Posts', 'magazine-lume' ),
			'pages'      => esc_html__( 'For All Pages', 'magazine-lume' ),
			'no-sidebar' => esc_html__( 'Always override for full width pages (any page which has no sidebar)', 'magazine-lume' ),
		),
		'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)', 'magazine-lume' ),
					'betooltip'   => esc_html__( 'Location of where you want to display featured image on a Post page.', 'magazine-lume' ),
					'type'        => 'select',
					'choices'     => array(
						'none'                => esc_html__( 'Do not display', 'magazine-lume'),
						'staticheader-nocrop' => esc_html__( 'Header Background (No Cropping)', 'magazine-lume'),
						'staticheader'        => esc_html__( 'Header Background (Cropped)', 'magazine-lume'),
						'header'              => esc_html__( 'Header Background (Parallax Effect)', 'magazine-lume'),
						'content'             => esc_html__( 'Beginning of content', 'magazine-lume'),
					),
					'default'     => 'content',
					'transport' => 'postMessage',
				),

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

				'post_meta' => array(
					'label'       => esc_html__( 'Meta Information on Posts', 'magazine-lume' ),
					'betooltip'   => esc_html__( "Check which information to display on an individual 'Post' page", 'magazine-lume' ),
					'type'        => 'sortlist',
					'choices'     => array(
						'author'   => esc_html__( 'Author', 'magazine-lume' ),
						'date'     => esc_html__( 'Date', 'magazine-lume' ),
						'cats'     => esc_html__( 'Categories', 'magazine-lume' ),
						'tags'     => esc_html__( 'Tags', 'magazine-lume' ),
						'comments' => esc_html__( 'No. of comments', 'magazine-lume' )
					),
					'default'     => array(
						'cats' => array( 'sortitem_hide' => 1 ),
					),
					'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'     => 'maglume_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', 'magazine-lume' ),
					'betooltip'   => esc_html__( 'Display links to Prev/Next Post links at the end of post content.', 'magazine-lume' ),
					'type'        => 'radio',
					'choices'     => array(
						'none'        => esc_html__( 'Do not Display', 'magazine-lume' ),
						'text'        => esc_html__( 'Post Title', 'magazine-lume' ),
						'thumb'       => esc_html__( 'Post Title and Thumbnail', 'magazine-lume' ),
						'fixed-text'  => esc_html__( 'Flyout : Post Title', 'magazine-lume' ),
						'fixed-thumb' => esc_html__( 'Flyout : Post Title and Thumbnail', 'magazine-lume' ),
					),
					'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'     => 'maglume_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)', 'magazine-lume' ),
					'betooltip'   => esc_html__( "Location of where you want to display featured image on a 'Page' page.", 'magazine-lume' ),
					'type'        => 'select',
					'choices'     => array(
						'none'                => esc_html__( 'Do not display', 'magazine-lume'),
						'staticheader-nocrop' => esc_html__( 'Header Background (No Cropping)', 'magazine-lume'),
						'staticheader'        => esc_html__( 'Header Background (Cropped)', 'magazine-lume'),
						'header'              => esc_html__( 'Header Background (Parallax Effect)', 'magazine-lume'),
						'content'             => esc_html__( 'Beginning of content', 'magazine-lume'),
					),
					'default'     => 'staticheader',
					'transport' => 'postMessage',
				),

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

				'page_meta' => array(
					'label'       => esc_html__( 'Meta Information on Page', 'magazine-lume' ),
					'betooltip'   => esc_html__( "Check which information to display on an individual 'Page' page", 'magazine-lume' ),
					'type'        => 'sortlist',
					'choices'     => array(
						'author'   => esc_html__( 'Author', 'magazine-lume' ),
						'date'     => esc_html__( 'Date', 'magazine-lume' ),
						'comments' => esc_html__( 'No. of comments', 'magazine-lume' ),
					),
					'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'     => 'maglume_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', 'magazine-lume' ),
		'section'     => $section,
		'type'        => 'content',
		'class'       => 'hoot-headline1',
		'priority'    => '962',
	);

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

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

	$settings['article_align'] = array(
		'label'       => esc_html__( 'Content Alignment', 'magazine-lume' ),
		'description' => esc_html__( 'Desktop:', 'magazine-lume' ),
		'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'     => 'left',
		'priority'    => '968',
		'transport' => 'postMessage',
	);
	$settings['article_align_mob'] = array(
		'boxdivi'     => 'div-ve20',
		'description' => esc_html__( 'Mobile:', 'magazine-lume' ),
		'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_background_shortcut'] = array(
		'boxdivi'     => 'div-ve10',
		'section'     => $section,
		'type'        => 'content',
		/* Translators: The %s are placeholders for HTML, so the order can't be changed. */
		'content'     => sprintf( esc_html__( 'To add background to Single Post/Page Article Content, go to %1$sColors / Backgrounds section%2$s.', 'magazine-lume' ), '<a href="' . esc_url( admin_url( 'customize.php?autofocus[section]=colors' ) ) . '" rel="focuslink" data-focustype="section" data-href="colors">', '</a>' ),
		'priority'    => '969',
	);

	$settings['article_maxwidth_conastipnote'] = array(
		'boxdivi'         => 'divbig',
		'label'           => esc_html__( 'Article Maximum Width', 'magazine-lume' ),
		'section'         => $section,
		'type'            => 'content',
		'description'     => esc_html__( 'Limit the content text width within the article for better readability on larger screens.', 'magazine-lume' ),
		/* Translators: 1 is the link start markup, 2 is link markup end */
		'content'         => '<img src="' . $imagepath . 'article-maxwidth.png">',
		'priority'    => '970',
	);
	$settings['article_maxwidth'] = array(
		'boxdivi'         => false,
		'section'         => $section,
		'type'            => 'betterrange',
		'description'     => esc_html__( 'When Post/Page has a Sidebar present', 'magazine-lume' ),
		'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', 'magazine-lume' ),
		'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', 'magazine-lume' ),
		'priority'    => '95',
	);

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


	/*** Return Options Array ***/
	return apply_filters( 'maglume_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( 'maglume_add_customizer_options' ) ) :
function maglume_add_customizer_options() {

	$hoot_customize = Hoot_Customize::get_instance();

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

}
endif;
add_action( 'init', 'maglume_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 maglume_customizer_enqueue_scripts() {
	// Enqueue Styles
	$style_uri = hoot_locate_style( hoot_data()->incuri . 'admin/css/customize-controls' );
	wp_enqueue_style( 'maglume-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( 'maglume-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', 'maglume_customizer_enqueue_scripts', 12 );

