<?php /**
 * Header Builder Options
 *
 * @package Kadence
 */

namespace Kadence;

use Kadence\Theme_Customizer;
use function Kadence\kadence;

ob_start(); ?>
<div class="kadence-compontent-tabs nav-tab-wrapper wp-clearfix">
	<a href="#" class="nav-tab kadence-general-tab kadence-compontent-tabs-button nav-tab-active" data-tab="general">
		<span><?php esc_html_e( 'General', 'kadence' ); ?></span>
	</a>
	<a href="#" class="nav-tab kadence-design-tab kadence-compontent-tabs-button" data-tab="design">
		<span><?php esc_html_e( 'Design', 'kadence' ); ?></span>
	</a>
</div>
<?php $compontent_tabs = ob_get_clean();
$settings = array(
	'logo_settings' => array(
		'control_type' =&gt; 'kadence_blank_control',
		'section'      =&gt; 'title_tagline',
		'settings'     =&gt; false,
		'priority'     =&gt; 1,
		'description'  =&gt; $compontent_tabs,
	),
	'logo_width' =&gt; array(
		'control_type' =&gt; 'kadence_range_control',
		'section'      =&gt; 'title_tagline',
		'priority'     =&gt; 5,
		'label'        =&gt; esc_html__( 'Logo Max Width', 'kadence' ),
		'description'  =&gt; esc_html__( 'Define the maxium width for the logo', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'general',
			),
			array(
				'setting'  =&gt; 'custom_logo',
				'operator' =&gt; '!empty',
				'value'    =&gt; '',
			),
		),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '#masthead .custom-logo',
				'property' =&gt; 'max-width',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'size',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '#masthead .site-branding a.brand img.svg-logo-image',
				'property' =&gt; 'width',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'size',
			),
		),
		'default'      =&gt; kadence()-&gt;default( 'logo_width' ),
		'input_attrs'  =&gt; array(
			'min'     =&gt; array(
				'px'  =&gt; 10,
				'em'  =&gt; 1,
				'rem' =&gt; 1,
				'vw'  =&gt; 2,
				'%'   =&gt; 2,
			),
			'max'     =&gt; array(
				'px'  =&gt; 800,
				'em'  =&gt; 50,
				'rem' =&gt; 50,
				'vw'  =&gt; 80,
				'%'   =&gt; 80,
			),
			'step'    =&gt; array(
				'px'  =&gt; 1,
				'em'  =&gt; 0.01,
				'rem' =&gt; 0.01,
				'vw'  =&gt; 1,
				'%'   =&gt; 1,
			),
			'units'   =&gt; array( 'px', 'em', 'rem', 'vw' ),
		),
	),
	'info_transparent_logo_in_use' =&gt; array(
		'control_type' =&gt; 'kadence_title_control',
		'section'      =&gt; 'title_tagline',
		'priority'     =&gt; 5,
		'description'        =&gt; esc_html__( '*NOTICE Custom transparent logo will show on pages that have the transparent header enabled. Change that in your transparent header settings.', 'kadence' ),
		'settings'     =&gt; false,
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'general',
			),
			array(
				'setting'    =&gt; 'logo_layout',
				'operator'   =&gt; 'sub_object_contains',
				'sub_key'    =&gt; 'include',
				'responsive' =&gt; true,
				'value'      =&gt; 'logo',
			),
			array(
				'setting'  =&gt; 'transparent_header_enable',
				'operator' =&gt; '=',
				'value'    =&gt; true,
			),
			array(
				'setting'  =&gt; 'transparent_header_custom_logo',
				'operator' =&gt; '=',
				'value'    =&gt; true,
			),
		),
	),
	'use_mobile_logo' =&gt; array(
		'control_type' =&gt; 'kadence_switch_control',
		'sanitize'     =&gt; 'kadence_sanitize_toggle',
		'section'      =&gt; 'title_tagline',
		'transport'    =&gt; 'refresh',
		'priority'     =&gt; 6,
		'default'      =&gt; kadence()-&gt;default( 'use_mobile_logo' ),
		'label'        =&gt; esc_html__( 'Different Logo for Mobile?', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'general',
			),
			array(
				'setting'  =&gt; '__device',
				'operator' =&gt; 'in',
				'value'    =&gt; array( 'tablet', 'mobile' ),
			),
		),
	),
	'mobile_logo' =&gt; array(
		'control_type' =&gt; 'media',
		'section'      =&gt; 'title_tagline',
		'transport'    =&gt; 'refresh',
		'priority'     =&gt; 6,
		'mime_type'    =&gt; 'image',
		'default'      =&gt; '',
		'label'        =&gt; esc_html__( 'Mobile Logo', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'general',
			),
			array(
				'setting'  =&gt; 'use_mobile_logo',
				'operator' =&gt; '=',
				'value'    =&gt; true,
			),
			array(
				'setting'  =&gt; '__device',
				'operator' =&gt; 'in',
				'value'    =&gt; array( 'tablet', 'mobile' ),
			),
		),
	),
	'logo_layout' =&gt; array(
		'control_type' =&gt; 'kadence_multi_radio_icon_control',
		'section'      =&gt; 'title_tagline',
		'priority'     =&gt; 6,
		'default'      =&gt; kadence()-&gt;default( 'logo_layout' ),
		'label'        =&gt; esc_html__( 'Logo Layout', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'general',
			),
		),
		'partial'      =&gt; array(
			'selector'            =&gt; '#masthead',
			'container_inclusive' =&gt; true,
			'render_callback'     =&gt; 'Kadence\header_markup',
		),
	),
	'brand_typography' =&gt; array(
		'control_type' =&gt; 'kadence_typography_control',
		'section'      =&gt; 'title_tagline',
		'label'        =&gt; esc_html__( 'Site Title Font', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'design',
			),
			array(
				'setting'    =&gt; 'logo_layout',
				'operator'   =&gt; 'sub_object_contains',
				'sub_key'    =&gt; 'include',
				'responsive' =&gt; true,
				'value'      =&gt; 'title',
			),
		),
		'default'      =&gt; kadence()-&gt;default( 'brand_typography' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css_typography',
				'selector' =&gt; array(
					'desktop' =&gt; '#main-header .site-branding .site-title',
					'tablet'  =&gt; '#mobile-header .site-branding .site-title',
					'mobile'  =&gt; '#mobile-header .site-branding .site-title',
				),
				'pattern'  =&gt; array(
					'desktop' =&gt; '$',
					'tablet'  =&gt; '$',
					'mobile'  =&gt; '$',
				),
				'property' =&gt; 'font',
				'key'      =&gt; 'typography',
			),
		),
		'input_attrs'  =&gt; array(
			'id' =&gt; 'brand_typography',
		),
	),
	'brand_typography_color' =&gt; array(
		'control_type' =&gt; 'kadence_color_control',
		'section'      =&gt; 'title_tagline',
		'label'        =&gt; esc_html__( 'Site Title Hover and Active Colors', 'kadence' ),
		'default'      =&gt; kadence()-&gt;default( 'brand_typography_color' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '#masthead .site-branding .site-title:hover',
				'pattern'  =&gt; '$',
				'property' =&gt; 'color',
				'key'      =&gt; 'hover',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '#main-header .header-html a:hover',
				'property' =&gt; 'color',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'hover',
			),
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; 'body.home #masthead .site-branding .site-title',
				'pattern'  =&gt; '$',
				'property' =&gt; 'color',
				'key'      =&gt; 'active',
			),
		),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'design',
			),
			array(
				'setting'    =&gt; 'logo_layout',
				'operator'   =&gt; 'sub_object_contains',
				'sub_key'    =&gt; 'include',
				'responsive' =&gt; true,
				'value'      =&gt; 'title',
			),
		),
		'input_attrs'  =&gt; array(
			'colors' =&gt; array(
				'hover' =&gt; array(
					'tooltip' =&gt; __( 'Hover Color', 'kadence' ),
					'palette' =&gt; true,
				),
				'active' =&gt; array(
					'tooltip' =&gt; __( 'Active Color', 'kadence' ),
					'palette' =&gt; true,
				),
			),
		),
	),
	// Logo Tagline Typography.
	'brand_tag_typography' =&gt; array(
		'control_type' =&gt; 'kadence_typography_control',
		'section'      =&gt; 'title_tagline',
		'label'        =&gt; esc_html__( 'Site Tagline Font', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'design',
			),
			array(
				'setting'    =&gt; 'logo_layout',
				'operator'   =&gt; 'sub_object_contains',
				'sub_key'    =&gt; 'include',
				'responsive' =&gt; true,
				'value'      =&gt; 'tagline',
			),
		),
		'default'      =&gt; kadence()-&gt;default( 'brand_tag_typography' ),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css_typography',
				'selector' =&gt; array(
					'desktop' =&gt; '#masthead .site-branding .site-description',
					'tablet'  =&gt; '#masthead .site-branding .site-description',
					'mobile'  =&gt; '#masthead .site-branding .site-description',
				),
				'pattern'  =&gt; array(
					'desktop' =&gt; '$',
					'tablet'  =&gt; '$',
					'mobile'  =&gt; '$',
				),
				'property' =&gt; 'font',
				'key'      =&gt; 'typography',
			),
		),
		'input_attrs'  =&gt; array(
			'id' =&gt; 'brand_tag_typography',
		),
	),
	'header_logo_padding' =&gt; array(
		'control_type' =&gt; 'kadence_measure_control',
		'section'      =&gt; 'title_tagline',
		'priority'     =&gt; 15,
		'default'      =&gt; kadence()-&gt;default( 'header_logo_padding' ),
		'label'        =&gt; esc_html__( 'Padding', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting' =&gt; '__current_tab',
				'value'   =&gt; 'design',
			),
		),
		'live_method'     =&gt; array(
			array(
				'type'     =&gt; 'css',
				'selector' =&gt; '.site-branding',
				'property' =&gt; 'padding',
				'pattern'  =&gt; '$',
				'key'      =&gt; 'measure',
			),
		),
		'input_attrs'  =&gt; array(
			'min'        =&gt; array(
				'px'  =&gt; 0,
				'em'  =&gt; 0,
				'rem' =&gt; 0,
			),
			'max'        =&gt; array(
				'px'  =&gt; 100,
				'em'  =&gt; 6,
				'rem' =&gt; 6,
			),
			'step'       =&gt; array(
				'px'  =&gt; 1,
				'em'  =&gt; 0.01,
				'rem' =&gt; 0.01,
			),
			'units'      =&gt; array( 'px', 'em', 'rem' ),
			'responsive' =&gt; true,
		),
	),
	'logo_link_to_site_icon' =&gt; array(
		'control_type' =&gt; 'kadence_focus_button_control',
		'section'      =&gt; 'title_tagline',
		'settings'     =&gt; false,
		'priority'     =&gt; 25,
		'label'        =&gt; esc_html__( 'Site Icon', 'kadence' ),
		'input_attrs'  =&gt; array(
			'section' =&gt; 'kadence_customizer_site_identity',
		),
	),
	'site_logo_link' =&gt; array(
		'control_type' =&gt; 'kadence_focus_button_control',
		'section'      =&gt; 'site_identity',
		'settings'     =&gt; false,
		'priority'     =&gt; 5,
		'label'        =&gt; esc_html__( 'Site Title and Logo Control', 'kadence' ),
		'input_attrs'  =&gt; array(
			'section' =&gt; 'title_tagline',
		),
	),
	'post_archive_home_title' =&gt; array(
		'control_type' =&gt; 'kadence_switch_control',
		'sanitize'     =&gt; 'kadence_sanitize_toggle',
		'section'      =&gt; 'static_front_page',
		'transport'    =&gt; 'refresh',
		'default'      =&gt; kadence()-&gt;default( 'post_archive_home_title' ),
		'label'        =&gt; esc_html__( 'Show site name for page title', 'kadence' ),
		'context'      =&gt; array(
			array(
				'setting'    =&gt; 'show_on_front',
				'operator'   =&gt; '==',
				'value'      =&gt; 'posts',
			),
		),
	),
);

Theme_Customizer::add_settings( $settings );

