<?php
/**
 * Digital Marketer Theme Customizer
 *
 * @package Digital Marketer
 */

function digital_marketer_customize_register( $wp_customize ) {

	load_template( trailingslashit( get_template_directory() ) . 'revolution/inc/fontawesome-change.php' );
	
	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';

	if ( isset( $wp_customize->selective_refresh ) ) {
		$wp_customize->selective_refresh->add_partial(
			'blogname',
			array(
				'selector'        => '.site-title a',
				'render_callback' => 'digital_marketer_customize_partial_blogname',
			)
		);
		$wp_customize->selective_refresh->add_partial(
			'blogdescription',
			array(
				'selector'        => '.site-description',
				'render_callback' => 'digital_marketer_customize_partial_blogdescription',
			)
		);
	}

	/*
    * Theme Options Panel
    */
	$wp_customize->add_panel('digital_marketer_panel', array(
		'priority' => 25,
		'capability' => 'edit_theme_options',
		'title' => __('Digital Marketer Theme Options', 'digital-marketer'),
	));

	/*
	* Customizer Global COlor
	*/

	/*Global Color Options*/
	$wp_customize->add_section('digital_marketer_global_color_section', array(
		'priority'       => 1,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Global Color Options', 'digital-marketer'),
		'panel'       => 'digital_marketer_panel',
	));

	$wp_customize->add_setting( 'digital_marketer_primary_color',
		array(
		'default'           => '#6754e9',
		'capability'        => 'edit_theme_options',
		'sanitize_callback' => 'sanitize_hex_color',
		)
	);
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'digital_marketer_primary_color',
		array(
			'label'      => esc_html__( 'Primary Color', 'digital-marketer' ),
			'section'    => 'digital_marketer_global_color_section',
			'settings'   => 'digital_marketer_primary_color',
		) ) 
	);

	/*Typography Options*/
	$wp_customize->add_section( 'digital_marketer_typography_section', array(
		'panel'       => 'digital_marketer_panel',
        'title'    => __( 'Typography Options', 'digital-marketer' ),
        'priority' => 2,
    ) );

    $wp_customize->add_setting( 'digital_marketer_font_family', array(
		'default'           => 'default',
		'sanitize_callback' => 'digital_marketer_sanitize_font_family',
	) );
	
	$wp_customize->add_control( 'digital_marketer_font_family', array(
		'label'    => __( 'Global Font Family', 'digital-marketer' ),
		'section'  => 'digital_marketer_typography_section',
		'type'     => 'select',
		'choices'  => array(
			'default'          => __( 'Default (Theme Font)', 'digital-marketer' ),
			'bad_script'       => 'Bad Script',
			'roboto'           => 'Roboto',
			'playfair_display' => 'Playfair Display',
			'open_sans'        => 'Open Sans',
			'lobster'          => 'Lobster',
			'merriweather'     => 'Merriweather',
			'oswald'           => 'Oswald',
			'raleway'          => 'Raleway',
		),
	) );

	/*
	* Customizer top header section
	*/

	$wp_customize->add_setting(
		'digital_marketer_site_title_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_site_title_text',
		array(
			'label'       => __('Enable Title', 'digital-marketer'),
			'description' => __('Enable or Disable Title from the site', 'digital-marketer'),
			'section'     => 'title_tagline',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting(
		'digital_marketer_site_tagline_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_site_tagline_text',
		array(
			'label'       => __('Enable Tagline', 'digital-marketer'),
			'description' => __('Enable or Disable Tagline from the site', 'digital-marketer'),
			'section'     => 'title_tagline',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting(
		'digital_marketer_logo_width',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '150',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_logo_width',
		array(
			'label'       => __('Logo Width in PX', 'digital-marketer'),
			'section'     => 'title_tagline',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 100,
	             'max' => 300,
	             'step' => 1,
	         ),
		)
	);

	/* WooCommerce custom settings */

	$wp_customize->add_section('woocommerce_custom_settings', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('WooCommerce Custom Settings', 'digital-marketer'),
		'panel'       => 'woocommerce',
	));

	$wp_customize->add_setting(
		'digital_marketer_per_columns',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '3',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_per_columns',
		array(
			'label'       => __('Product Per Single Row', 'digital-marketer'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 4,
	             'step' => 1,
	         ),
		)
	);

	$wp_customize->add_setting(
		'digital_marketer_product_per_page',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '6',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_product_per_page',
		array(
			'label'       => __('Product Per One Page', 'digital-marketer'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 12,
	             'step' => 1,
	         ),
		)
	);

	/*Related Products Enable Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_related_product',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_related_product',
		array(
			'label'       => __('Enable Related Product', 'digital-marketer'),
			'description' => __('Checked to show Related Product', 'digital-marketer'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting(
		'custom_related_products_number',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '3',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'custom_related_products_number',
		array(
			'label'       => __('Related Product Count', 'digital-marketer'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 20,
	             'step' => 1,
	         ),
		)
	);

	$wp_customize->add_setting(
		'custom_related_products_number_per_row',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '3',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'custom_related_products_number_per_row',
		array(
			'label'       => __('Related Product Per Row', 'digital-marketer'),
			'section'     => 'woocommerce_custom_settings',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 4,
	             'step' => 1,
	         ),
		)
	);

	/*Archive Product layout*/
	$wp_customize->add_setting('digital_marketer_archive_product_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'digital_marketer_sanitize_choices'
	));
	$wp_customize->add_control('digital_marketer_archive_product_layout',array(
        'type' => 'select',
        'label' => esc_html__('Archive Product Layout','digital-marketer'),
        'section' => 'woocommerce_custom_settings',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','digital-marketer'),
            'layout-2' => esc_html__('Sidebar On Left','digital-marketer'),
			'layout-3' => esc_html__('Full Width Layout','digital-marketer')
        ),
	) );

	/*Single Product layout*/
	$wp_customize->add_setting('digital_marketer_single_product_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'digital_marketer_sanitize_choices'
	));
	$wp_customize->add_control('digital_marketer_single_product_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Product Layout','digital-marketer'),
        'section' => 'woocommerce_custom_settings',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','digital-marketer'),
            'layout-2' => esc_html__('Sidebar On Left','digital-marketer'),
			'layout-3' => esc_html__('Full Width Layout','digital-marketer')
        ),
	) );

	$wp_customize->add_setting('digital_marketer_woocommerce_product_sale',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
        'default'           => 'Right',
        'sanitize_callback' => 'digital_marketer_sanitize_choices'
    ));
    $wp_customize->add_control('digital_marketer_woocommerce_product_sale',array(
        'label'       => esc_html__( 'Woocommerce Product Sale Positions','digital-marketer' ),
        'type' => 'select',
        'section' => 'woocommerce_custom_settings',
        'choices' => array(
            'Right' => __('Right','digital-marketer'),
            'Left' => __('Left','digital-marketer'),
            'Center' => __('Center','digital-marketer')
        ),
    ) );

	/*Additional Options*/
	$wp_customize->add_section('digital_marketer_additional_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Additional Options', 'digital-marketer'),
		'panel'       => 'digital_marketer_panel',
	));

	/*Main Slider Enable Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_sticky_header',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => false,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_sticky_header',
		array(
			'label'       => __('Enable Sticky Header', 'digital-marketer'),
			'description' => __('Checked to enable sticky header', 'digital-marketer'),
			'section'     => 'digital_marketer_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Main Slider Enable Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_preloader',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 0,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_preloader',
		array(
			'label'       => __('Enable Preloader', 'digital-marketer'),
			'description' => __('Checked to show preloader', 'digital-marketer'),
			'section'     => 'digital_marketer_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Breadcrumbs Enable Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_breadcrumbs',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_breadcrumbs',
		array(
			'label'       => __('Enable Breadcrumbs', 'digital-marketer'),
			'description' => __('Checked to show Breadcrumbs', 'digital-marketer'),
			'section'     => 'digital_marketer_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Pagination Enable Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_pagination',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_pagination',
		array(
			'label'       => __('Enable Pagination', 'digital-marketer'),
			'description' => __('Checked to show Pagination', 'digital-marketer'),
			'section'     => 'digital_marketer_additional_section',
			'type'        => 'checkbox',
		)
	);

	/*Pagination Select Type Option*/
	$wp_customize->add_setting('digital_marketer_pagination_type',array(
        'default' => 'type-1',
        'sanitize_callback' => 'digital_marketer_sanitize_choices'
	));
	$wp_customize->add_control('digital_marketer_pagination_type',array(
        'type' => 'select',
        'label' => esc_html__('Select Pagination Type','digital-marketer'),
        'section' => 'digital_marketer_additional_section',
        'choices' => array(
            'type-1' => esc_html__('Type 1','digital-marketer'),
            'type-2' => esc_html__('Type 2','digital-marketer'),
        ),
	) );

	/*Post layout*/
	$wp_customize->add_setting('digital_marketer_archive_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'digital_marketer_sanitize_choices'
	));
	$wp_customize->add_control('digital_marketer_archive_layout',array(
        'type' => 'select',
        'label' => esc_html__('Posts Layout','digital-marketer'),
        'section' => 'digital_marketer_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','digital-marketer'),
            'layout-2' => esc_html__('Sidebar On Left','digital-marketer'),
			'layout-3' => esc_html__('Full Width Layout','digital-marketer')
        ),
	) );

	/*single post layout*/
	$wp_customize->add_setting('digital_marketer_post_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'digital_marketer_sanitize_choices'
	));
	$wp_customize->add_control('digital_marketer_post_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Post Layout','digital-marketer'),
        'section' => 'digital_marketer_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','digital-marketer'),
            'layout-2' => esc_html__('Sidebar On Left','digital-marketer'),
			'layout-3' => esc_html__('Full Width Layout','digital-marketer')
        ),
	) );

	/*single page layout*/
	$wp_customize->add_setting('digital_marketer_page_layout',array(
        'default' => 'layout-1',
        'sanitize_callback' => 'digital_marketer_sanitize_choices'
	));
	$wp_customize->add_control('digital_marketer_page_layout',array(
        'type' => 'select',
        'label' => esc_html__('Single Page Layout','digital-marketer'),
        'section' => 'digital_marketer_additional_section',
        'choices' => array(
            'layout-1' => esc_html__('Sidebar On Right','digital-marketer'),
            'layout-2' => esc_html__('Sidebar On Left','digital-marketer'),
			'layout-3' => esc_html__('Full Width Layout','digital-marketer')
        ),
	) );

	/*Archive Post Options*/
	$wp_customize->add_section('digital_marketer_blog_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Blog Page Options', 'digital-marketer'),
		'panel'       => 'digital_marketer_panel',
	));

	$wp_customize->add_setting('digital_marketer_enable_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_blog_post_title',array(
		'label'       => __('Enable Blog Post Title', 'digital-marketer'),
		'description' => __('Checked To Show Blog Post Title', 'digital-marketer'),
		'section'     => 'digital_marketer_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('digital_marketer_enable_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_blog_post_meta',array(
		'label'       => __('Enable Blog Post Meta', 'digital-marketer'),
		'description' => __('Checked To Show Blog Post Meta Feilds', 'digital-marketer'),
		'section'     => 'digital_marketer_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('digital_marketer_enable_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_blog_post_tags',array(
		'label'       => __('Enable Blog Post Tags', 'digital-marketer'),
		'description' => __('Checked To Show Blog Post Tags', 'digital-marketer'),
		'section'     => 'digital_marketer_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('digital_marketer_enable_blog_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_blog_post_image',array(
		'label'       => __('Enable Blog Post Image', 'digital-marketer'),
		'description' => __('Checked To Show Blog Post Image', 'digital-marketer'),
		'section'     => 'digital_marketer_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('digital_marketer_enable_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_blog_post_content',array(
		'label'       => __('Enable Blog Post Content', 'digital-marketer'),
		'description' => __('Checked To Show Blog Post Content', 'digital-marketer'),
		'section'     => 'digital_marketer_blog_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('digital_marketer_enable_blog_post_button',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_blog_post_button',array(
		'label'       => __('Enable Blog Post Read More Button', 'digital-marketer'),
		'description' => __('Checked To Show Blog Post Read More Button', 'digital-marketer'),
		'section'     => 'digital_marketer_blog_post_section',
		'type'        => 'checkbox',
	));

	/*Blog post Content layout*/
	$wp_customize->add_setting('digital_marketer_blog_Post_content_layout',array(
        'default' => 'Left',
        'sanitize_callback' => 'digital_marketer_sanitize_choices'
	));
	$wp_customize->add_control('digital_marketer_blog_Post_content_layout',array(
        'type' => 'select',
        'label' => esc_html__('Blog Post Content Layout','digital-marketer'),
        'section' => 'digital_marketer_blog_post_section',
        'choices' => array(
            'Left' => esc_html__('Left','digital-marketer'),
            'Center' => esc_html__('Center','digital-marketer'),
            'Right' => esc_html__('Right','digital-marketer')
        ),
	) );

	/*Excerpt*/
    $wp_customize->add_setting(
		'digital_marketer_excerpt_limit',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '25',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_excerpt_limit',
		array(
			'label'       => __('Excerpt Limit', 'digital-marketer'),
			'section'     => 'digital_marketer_blog_post_section',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 2,
	             'max' => 50,
	             'step' => 2,
	         ),
		)
	);

	/*Archive Button Text*/
	$wp_customize->add_setting(
		'digital_marketer_read_more_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Continue Reading....',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_read_more_text',
		array(
			'label'       => __('Edit Button Text ', 'digital-marketer'),
			'section'     => 'digital_marketer_blog_post_section',
			'type'        => 'text',
		)
	);

	/*Single Post Options*/
	$wp_customize->add_section('digital_marketer_single_post_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Single Post Options', 'digital-marketer'),
		'panel'       => 'digital_marketer_panel',
	));

	$wp_customize->add_setting('digital_marketer_enable_single_blog_post_title',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_single_blog_post_title',array(
		'label'       => __('Enable Single Post Title', 'digital-marketer'),
		'description' => __('Checked To Show Single Blog Post Title', 'digital-marketer'),
		'section'     => 'digital_marketer_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('digital_marketer_enable_single_blog_post_meta',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_single_blog_post_meta',array(
		'label'       => __('Enable Single Post Meta', 'digital-marketer'),
		'description' => __('Checked To Show Single Blog Post Meta Feilds', 'digital-marketer'),
		'section'     => 'digital_marketer_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('digital_marketer_enable_single_blog_post_tags',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_single_blog_post_tags',array(
		'label'       => __('Enable Single Post Tags', 'digital-marketer'),
		'description' => __('Checked To Show Single Blog Post Tags', 'digital-marketer'),
		'section'     => 'digital_marketer_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('digital_marketer_enable_single_post_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_single_post_image',array(
		'label'       => __('Enable Single Post Image', 'digital-marketer'),
		'description' => __('Checked To Show Single Post Image', 'digital-marketer'),
		'section'     => 'digital_marketer_single_post_section',
		'type'        => 'checkbox',
	));

	$wp_customize->add_setting('digital_marketer_enable_single_blog_post_content',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 1,
		'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
	));
	$wp_customize->add_control('digital_marketer_enable_single_blog_post_content',array(
		'label'       => __('Enable Single Post Content', 'digital-marketer'),
		'description' => __('Checked To Show Single Blog Post Content', 'digital-marketer'),
		'section'     => 'digital_marketer_single_post_section',
		'type'        => 'checkbox',
	));

	/*Related Post Enable Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_related_post',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_related_post',
		array(
			'label'       => __('Enable Related Post', 'digital-marketer'),
			'description' => __('Checked to show Related Post', 'digital-marketer'),
			'section'     => 'digital_marketer_single_post_section',
			'type'        => 'checkbox',
		)
	);

	/*Related post Edit Text*/
	$wp_customize->add_setting(
		'digital_marketer_related_post_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Related Post',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_related_post_text',
		array(
			'label'       => __('Edit Related Post Text ', 'digital-marketer'),
			'section'     => 'digital_marketer_single_post_section',
			'type'        => 'text',
		)
	);	

	/*Related Post Per Page*/
	$wp_customize->add_setting(
		'digital_marketer_related_post_count',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '3',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_related_post_count',
		array(
			'label'       => __('Related Post Count', 'digital-marketer'),
			'section'     => 'digital_marketer_single_post_section',
			'type'        => 'number',
			'input_attrs' => array(
	            'min' => 1,
	             'max' => 9,
	             'step' => 1,
	         ),
		)
	);
	
	/*Top Header Options*/
	$wp_customize->add_section('digital_marketer_header_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Top Header Options', 'digital-marketer'),
		'panel'       => 'digital_marketer_panel',
	));

	/*Top header section enable*/
	$wp_customize->add_setting(
		'digital_marketer_enable_top_header',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_top_header',
		array(
			'label'       => __('Enable Top Header', 'digital-marketer'),
			'description' => __('Checked to show the top header section.', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'checkbox',
		)
	);

	/*Text 1*/
	$wp_customize->add_setting(
		'digital_marketer_header_text1_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Help',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_header_text1_option',
		array(
			'label'       => __('Edit Topheader Text #1', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'text',
		)
	);

	/*Link 1*/
	$wp_customize->add_setting(
		'digital_marketer_header_link1_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_header_link1_option',
		array(
			'label'       => __('Edit Topheader Link #1', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'url',
		)
	);

	/*Text 2*/
	$wp_customize->add_setting(
		'digital_marketer_header_text2_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'What We DO',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_header_text2_option',
		array(
			'label'       => __('Edit Topheader Text #2', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'text',
		)
	);

	/*Link 2*/
	$wp_customize->add_setting(
		'digital_marketer_header_link2_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_header_link2_option',
		array(
			'label'       => __('Edit Topheader Link #2', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'url',
		)
	);

	/*Text 3*/
	$wp_customize->add_setting(
		'digital_marketer_header_text3_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'FAQs',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_header_text3_option',
		array(
			'label'       => __('Edit Topheader Text #3', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'text',
		)
	);

	/*Link 3*/
	$wp_customize->add_setting(
		'digital_marketer_header_link3_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_header_link3_option',
		array(
			'label'       => __('Edit Topheader Link #3', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'url',
		)
	);

	$wp_customize->add_setting(
		'digital_marketer_header_search',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_header_search',
		array(
			'label'       => __('Enable Disable Search', 'digital-marketer'),
			'description' => __('Enable or Disable header Search', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'checkbox',
		)
	);


	/*Location*/
	$wp_customize->add_setting(
		'digital_marketer_location_text_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '351 Montreal Ave, Staten Isiand, NY 10306',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_location_text_option',
		array(
			'label'       => __('Edit Location Text', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting('digital_marketer_header_info_address_icon',array(
		'default'	=> 'fas fa-map-marker-alt',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Digital_Marketer_Icon_Changer(
        $wp_customize,'digital_marketer_header_info_address_icon',array(
		'label'	=> __('Location Icon','digital-marketer'),
		'transport' => 'refresh',
		'section'	=> 'digital_marketer_header_section',
		'type'		=> 'icon'
	)));

	/*Phone Number*/
	$wp_customize->add_setting(
		'digital_marketer_phone_text_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '9876543210. 1234567890',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_phone_text_option',
		array(
			'label'       => __('Edit Phone Number', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting('digital_marketer_header_info_phone_icon',array(
		'default'	=> 'fas fa-phone',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Digital_Marketer_Icon_Changer(
        $wp_customize,'digital_marketer_header_info_phone_icon',array(
		'label'	=> __('Phone Icon','digital-marketer'),
		'transport' => 'refresh',
		'section'	=> 'digital_marketer_header_section',
		'type'		=> 'icon'
	)));

	/*Email*/
	$wp_customize->add_setting(
		'digital_marketer_email_text_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 'Expample@gmail.com 12345@gmail.com',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_email_text_option',
		array(
			'label'       => __('Edit Email Address', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'text',
		)
	);

	$wp_customize->add_setting('digital_marketer_header_info_mail_icon',array(
		'default'	=> 'fas fa-envelope',
		'sanitize_callback'	=> 'sanitize_text_field'
	));
	$wp_customize->add_control(new Digital_Marketer_Icon_Changer(
        $wp_customize,'digital_marketer_header_info_mail_icon',array(
		'label'	=> __('Email Icon','digital-marketer'),
		'transport' => 'refresh',
		'section'	=> 'digital_marketer_header_section',
		'type'		=> 'icon'
	)));

	/*Request Quote Link*/
	$wp_customize->add_setting(
		'digital_marketer_quote_link_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '#',
			'sanitize_callback' => 'esc_url_raw',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_quote_link_option',
		array(
			'label'       => __('Edit Request Quote Link', 'digital-marketer'),
			'section'     => 'digital_marketer_header_section',
			'type'        => 'url',
		)
	);

	/*
	* Customizer main slider section
	*/
	/*Main Slider Options*/
	$wp_customize->add_section('digital_marketer_slider_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Main Slider Options', 'digital-marketer'),
		'panel'       => 'digital_marketer_panel',
	));

	/*Main Slider Enable Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_slider',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 0,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_slider',
		array(
			'label'       => __('Enable Main Slider', 'digital-marketer'),
			'description' => __('Checked to show the main slider', 'digital-marketer'),
			'section'     => 'digital_marketer_slider_section',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting(
		'digital_marketer_slide_number',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_slide_number',
		array(
			'label'       => __('Number of slide to show', 'digital-marketer'),
			'section'     => 'digital_marketer_slider_section',
			'type'        => 'number',
			'input_attrs' => array(
				'min' => 1,     
				'max' => 3,   
			)
		)
	);

	$digital_marketer_slide_count = (int)get_theme_mod('digital_marketer_slide_number');

	for ($m=1; $m <= $digital_marketer_slide_count; $m++) {

		/*Main Slider Image*/
		$wp_customize->add_setting(
			'digital_marketer_slider_image'.$m,
			array(
				'capability'    => 'edit_theme_options',
		        'default'       => '',
		        'transport'     => 'postMessage',
		        'sanitize_callback' => 'esc_url_raw',
	    	)
	    );

		$wp_customize->add_control( 
			new WP_Customize_Image_Control( $wp_customize, 
				'digital_marketer_slider_image'.$m, 
				array(
			        'label' => __('Edit Slider Image ', 'digital-marketer') .$m,
			        'description' => __('Edit the slider image.', 'digital-marketer'),
			        'section' => 'digital_marketer_slider_section',
				)
			)
		);

		/*Main Slider Heading*/
		$wp_customize->add_setting(
			'digital_marketer_slider_heading'.$m,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'digital_marketer_slider_heading'.$m,
			array(
				'label'       => __('Edit Heading Text ', 'digital-marketer') .$m,
				'description' => __('Edit the slider heading text.', 'digital-marketer'),
				'section'     => 'digital_marketer_slider_section',
				'type'        => 'text',
			)
		);

		/*Main Slider Content*/
		$wp_customize->add_setting(
			'digital_marketer_slider_text'.$m,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'digital_marketer_slider_text'.$m,
			array(
				'label'       => __('Edit Content Text ', 'digital-marketer') .$m,
				'description' => __('Edit the slider content text.', 'digital-marketer'),
				'section'     => 'digital_marketer_slider_section',
				'type'        => 'text',
			)
		);

		/*Main Slider Button1 Text*/
		$wp_customize->add_setting(
			'digital_marketer_slider_button1_text'.$m,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'digital_marketer_slider_button1_text'.$m,
			array(
				'label'       => __('Edit Button #1 Text ', 'digital-marketer') .$m,
				'description' => __('Edit the slider button text.', 'digital-marketer'),
				'section'     => 'digital_marketer_slider_section',
				'type'        => 'text',
			)
		);

		/*Main Slider Button1 URL*/
		$wp_customize->add_setting(
			'digital_marketer_slider_button1_link'.$m,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'esc_url_raw',
			)
		);

		$wp_customize->add_control(
			'digital_marketer_slider_button1_link'.$m,
			array(
				'label'       => __('Edit Button #1 URL ', 'digital-marketer') .$m,
				'description' => __('Edit the slider button url.', 'digital-marketer'),
				'section'     => 'digital_marketer_slider_section',
				'type'        => 'url',
			)
		);
	}

	/*
	* Customizer Portfolio section
	*/
	/*Portfolio Options*/
	$wp_customize->add_section('digital_marketer_events_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Portfolio Option', 'digital-marketer'),
		'panel'       => 'digital_marketer_panel',
	));

	/*Portfolio Enable Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_event',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 0,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_event',
		array(
			'label'       => __('Enable Portfolio Section', 'digital-marketer'),
			'description' => __('Checked to show the category', 'digital-marketer'),
			'section'     => 'digital_marketer_events_section',
			'type'        => 'checkbox',
		)
	);

	/*Portfolio Heading*/
	$wp_customize->add_setting(
		'digital_marketer_event_heading',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_event_heading',
		array(
			'label'       => __('Edit Section Heading', 'digital-marketer'),
			'description' => __('Edit event section heading', 'digital-marketer'),
			'section'     => 'digital_marketer_events_section',
			'type'        => 'text',
		)
	);

	/*Portfolio Text*/
	$wp_customize->add_setting(
		'digital_marketer_event_text',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_event_text',
		array(
			'label'       => __('Edit Section Text', 'digital-marketer'),
			'description' => __('Edit portfolio section text', 'digital-marketer'),
			'section'     => 'digital_marketer_events_section',
			'type'        => 'text',
		)
	);

	for ($i=1; $i <= 6; $i++) { 

		/*Portfolio Image*/
		$wp_customize->add_setting(
			'digital_marketer_category_image'.$i,
			array(
				'capability'    => 'edit_theme_options',
		        'default'       => '',
		        'transport'     => 'postMessage',
		        'sanitize_callback' => 'esc_url_raw',
	    	)
	    );

		$wp_customize->add_control( 
			new WP_Customize_Image_Control( $wp_customize, 
				'digital_marketer_category_image'.$i, 
				array(
			        'label' => __('Edit Portfolio Image ', 'digital-marketer') .$i,
			        'description' => __('Edit the category image.', 'digital-marketer'),
			        'section' => 'digital_marketer_events_section',
				)
			)
		);

		/*Portfolio Heading*/
		$wp_customize->add_setting(
			'digital_marketer_category_heading'.$i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'digital_marketer_category_heading'.$i,
			array(
				'label'       => __('Edit Heading', 'digital-marketer') .$i,
				'description' => __('Edit portfolio heading text.', 'digital-marketer'),
				'section'     => 'digital_marketer_events_section',
				'type'        => 'text',
			)
		);

		/*Portfolio Content*/
		$wp_customize->add_setting(
			'digital_marketer_category_text'.$i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'digital_marketer_category_text'.$i,
			array(
				'label'       => __('Edit Content', 'digital-marketer') .$i,
				'description' => __('Edit portfolio content text.', 'digital-marketer'),
				'section'     => 'digital_marketer_events_section',
				'type'        => 'text',
			)
		);

		/*Portfolio Button*/
		$wp_customize->add_setting(
			'digital_marketer_category_button1_text'.$i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'sanitize_text_field',
			)
		);

		$wp_customize->add_control(
			'digital_marketer_category_button1_text'.$i,
			array(
				'label'       => __('Edit Button Text', 'digital-marketer') .$i,
				'description' => __('Edit portfolio button text.', 'digital-marketer'),
				'section'     => 'digital_marketer_events_section',
				'type'        => 'text',
			)
		);

		/*Portfolio Button Link*/
		$wp_customize->add_setting(
			'digital_marketer_category_button1_link'.$i,
			array(
				'capability'        => 'edit_theme_options',
				'transport'         => 'refresh',
				'default'           => '',
				'sanitize_callback' => 'esc_url_raw',
			)
		);

		$wp_customize->add_control(
			'digital_marketer_category_button1_link'.$i,
			array(
				'label'       => __('Edit Button Link ', 'digital-marketer') .$i,
				'description' => __('Edit portfolio button link.', 'digital-marketer'),
				'section'     => 'digital_marketer_events_section',
				'type'        => 'url',
			)
		);
	}

	/*
	* Customizer Footer Section
	*/
	/*Footer Options*/
	$wp_customize->add_section('digital_marketer_footer_section', array(
		'priority'       => 5,
		'capability'     => 'edit_theme_options',
		'theme_supports' => '',
		'title'          => __('Footer Options', 'digital-marketer'),
		'panel'       => 'digital_marketer_panel',
	));

	/*Footer Enable Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_footer',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_footer',
		array(
			'label'       => __('Enable Footer', 'digital-marketer'),
			'description' => __('Checked to show Footer', 'digital-marketer'),
			'section'     => 'digital_marketer_footer_section',
			'type'        => 'checkbox',
		)
	);

	/*Footer bg image Option*/
	$wp_customize->add_setting('digital_marketer_footer_bg_image',array(
		'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
        'default'           => '',
        'sanitize_callback' => 'esc_url_raw',
    ));
    $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'digital_marketer_footer_bg_image',array(
        'label' => __('Footer Background Image','digital-marketer'),
        'section' => 'digital_marketer_footer_section',
        'priority' => 1,
    )));

	/*Footer Social Menu Option*/
	$wp_customize->add_setting(
		'digital_marketer_footer_social_menu',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_footer_social_menu',
		array(
			'label'       => __('Enable Footer Social Menu', 'digital-marketer'),
			'description' => __('Checked to show the footer social menu. Go to Dashboard >> Appearance >> Menus >> Create New Menu >> Add Custom Link >> Add Social Menu >> Checked Social Menu >> Save Menu.', 'digital-marketer'),
			'section'     => 'digital_marketer_footer_section',
			'type'        => 'checkbox',
		)
	);	

	/*Go To Top Option*/
	$wp_customize->add_setting(
		'digital_marketer_enable_go_to_top_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => 1,
			'sanitize_callback' => 'digital_marketer_sanitize_checkbox',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_enable_go_to_top_option',
		array(
			'label'       => __('Enable Go To Top', 'digital-marketer'),
			'description' => __('Checked to enable Go To Top option.', 'digital-marketer'),
			'section'     => 'digital_marketer_footer_section',
			'type'        => 'checkbox',
		)
	);

	$wp_customize->add_setting('digital_marketer_go_to_top_position',array(
        'capability'        => 'edit_theme_options',
		'transport'         => 'refresh',
		'default'           => 'Right',
        'sanitize_callback' => 'digital_marketer_sanitize_choices'
    ));
    $wp_customize->add_control('digital_marketer_go_to_top_position',array(
        'type' => 'select',
        'section' => 'digital_marketer_footer_section',
        'label' => esc_html__('Go To Top Positions','digital-marketer'),
        'choices' => array(
            'Right' => __('Right','digital-marketer'),
            'Left' => __('Left','digital-marketer'),
            'Center' => __('Center','digital-marketer')
        ),
    ) );


	/*Footer Copyright Text Enable*/
	$wp_customize->add_setting(
		'digital_marketer_copyright_option',
		array(
			'capability'        => 'edit_theme_options',
			'transport'         => 'refresh',
			'default'           => '',
			'sanitize_callback' => 'sanitize_text_field',
		)
	);

	$wp_customize->add_control(
		'digital_marketer_copyright_option',
		array(
			'label'       => __('Edit Copyright Text', 'digital-marketer'),
			'description' => __('Edit the Footer Copyright Section.', 'digital-marketer'),
			'section'     => 'digital_marketer_footer_section',
			'type'        => 'text',
		)
	);
}
add_action( 'customize_register', 'digital_marketer_customize_register' );

/**
 * Render the site title for the selective refresh partial.
 *
 * @return void
 */
function digital_marketer_customize_partial_blogname() {
	bloginfo( 'name' );
}

/**
 * Render the site tagline for the selective refresh partial.
 *
 * @return void
 */
function digital_marketer_customize_partial_blogdescription() {
	bloginfo( 'description' );
}

/**
 * Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
 */
function digital_marketer_customize_preview_js() {
	wp_enqueue_script( 'digital-marketer-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), DIGITAL_MARKETER_VERSION, true );
}
add_action( 'customize_preview_init', 'digital_marketer_customize_preview_js' );

/**
 * Singleton class for handling the theme's customizer integration.
 *
 * @since  1.0.0
 * @access public
 */
final class Digital_Marketer_Customize {

	/**
	 * Returns the instance.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return object
	 */
	public static function get_instance() {

		static $digital_marketer_instance = null;

		if ( is_null( $digital_marketer_instance ) ) {
			$digital_marketer_instance = new self;
			$digital_marketer_instance->setup_actions();
		}

		return $digital_marketer_instance;
	}

	/**
	 * Constructor method.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function __construct() {}

	/**
	 * Sets up initial actions.
	 *
	 * @since  1.0.0
	 * @access private
	 * @return void
	 */
	private function setup_actions() {

		// Register panels, sections, settings, controls, and partials.
		add_action( 'customize_register', array( $this, 'sections' ) );

		// Register scripts and styles for the controls.
		add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
	}

	/**
	 * Sets up the customizer sections.
	 *
	 * @since  1.0.0
	 * @access public
	 * @param  object  $digital_marketer_manager
	 * @return void
	*/
	public function sections( $digital_marketer_manager ) {

		// Load custom sections.
		load_template( trailingslashit( get_template_directory() ) . '/revolution/inc/section-pro.php' );

		// Register custom section types.
		$digital_marketer_manager->register_section_type( 'Digital_Marketer_Customize_Section_Pro' );

		// Register sections.
		$digital_marketer_manager->add_section( new Digital_Marketer_Customize_Section_Pro( $digital_marketer_manager,'digital_marketer_go_pro', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Digital Marketer', 'digital-marketer' ),
			'pro_text' => esc_html__( 'Buy Pro', 'digital-marketer' ),
			'pro_url'    => esc_url( DIGITAL_MARKETER_BUY_NOW ),
		) )	);

		// Register sections.
		$digital_marketer_manager->add_section( new Digital_Marketer_Customize_Section_Pro( $digital_marketer_manager,'digital_marketer_lite_documentation', array(
			'priority'   => 1,
			'title'    => esc_html__( 'Lite Documentation', 'digital-marketer' ),
			'pro_text' => esc_html__( 'Instruction', 'digital-marketer' ),
			'pro_url'    => esc_url( DIGITAL_MARKETER_LITE_DOC ),
		) )	);
		
		$digital_marketer_manager->add_section( new Digital_Marketer_Customize_Section_Pro( $digital_marketer_manager, 'digital_marketer_live_demo', array(
			'priority'   => 1,
			'title'      => esc_html__( 'Pro Theme Demo', 'digital-marketer' ),
			'pro_text'   => esc_html__( 'Live Preview', 'digital-marketer' ),
			'pro_url'    => esc_url( DIGITAL_MARKETER_LIVE_DEMO ),
		) ) );		
	}

	/**
	 * Loads theme customizer CSS.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return void
	 */
	public function enqueue_control_scripts() {

		wp_enqueue_script( 'digital-marketer-customize-controls', trailingslashit( get_template_directory_uri() ) . '/revolution/assets/js/customize-controls.js', array( 'customize-controls' ) );

		wp_enqueue_style( 'digital-marketer-customize-controls', trailingslashit( get_template_directory_uri() ) . '/revolution/assets/css/customize-controls.css' );
	}
}

// Doing this customizer thang!
Digital_Marketer_Customize::get_instance();