<?php 

function helium_customize_register( $wp_customize ) {

	// Typography setting ////////////////////////////////////////////////////////////////////////////////////////////////////////
	$wp_customize->add_section( 'typography_section' , array(
	    'title'      => esc_html__( 'Typography setting', 'helium' ),
	    'priority'   => 29,
	) );
	$wp_customize->add_setting( 'body_font', array(
	  'type' => 'theme_mod', // or 'option'
	  'capability' => 'edit_theme_options',
	  'theme_supports' => '', // Rarely needed.
	  'default' => 'Lato',
	  'transport' => 'refresh', // or postMessage
	  'sanitize_callback' => 'helium_fun_sanitize_callback' // Get function name 
	) );

	$wp_customize->add_control( 
		new Google_Font_Dropdown_Custom_Control( 
		$wp_customize, 
		'body_font', 
		array(
			'label'          => esc_html__('Body font','helium'),
            'section'        => 'typography_section',
            'settings'       => 'body_font',
		) ) 
	);

	$wp_customize->add_setting( 'heading_font', array(
	  'type' => 'theme_mod', // or 'option'
	  'capability' => 'edit_theme_options',
	  'theme_supports' => '', // Rarely needed.
	  'default' => 'Poppins',
	  'transport' => 'refresh', // or postMessage
	  'sanitize_callback' => 'helium_fun_sanitize_callback' // Get function name 
	  
	));
	
	$wp_customize->add_control(
		new Google_Font_Dropdown_Custom_Control( 
		$wp_customize, 
		'heading_font', 
		array(
			'label'          => esc_html__('Heading font','helium'),
            'section'        => 'typography_section',
            'settings'       => 'heading_font',
		) ) 
	);

	$wp_customize->add_setting( 'main_color', array(
	  'type' => 'theme_mod', // or 'option'
	  'capability' => 'edit_theme_options',
	  'theme_supports' => '', // Rarely needed.
	  'default' => '#1dc6bc',
	  'transport' => 'refresh', // or postMessage
	  'sanitize_callback' => 'helium_fun_sanitize_callback' // Get function name 
	  
	));
	$wp_customize->add_control( 
		new WP_Customize_Color_Control( 
		$wp_customize, 
		'main_color', 
		array(
			'label'          => esc_html__("Main color",'helium'),
            'section'        => 'typography_section',
            'settings'       => 'main_color',
		) ) 
	);

		$wp_customize->add_setting( 'logo_setting', array(
	  'type' => 'theme_mod', // or 'option'
	  'capability' => 'edit_theme_options',
	  'theme_supports' => '', // Rarely needed.
	  'default'=>OVA_THEME_URI.'/img/logo/logo.png',
	  'transport' => 'refresh', // or postMessage
	  'sanitize_callback' => 'helium_fun_sanitize_callback' // Get function name 
	  
	));
	$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo_setting', array(
	    'label'    => __( 'Logo image', 'helium' ),
	    'section'  => 'typography_section',
	    'settings' => 'logo_setting',
	)));


	
	// /Blog setting ////////////////////////////////////////////////////////////////////////////////////////////////////////
	
	/* blog extra */
	$wp_customize->add_section( 'blog_section' , array(
	    'title'      => esc_html__( 'Blog setting header', 'helium' ),
	    'priority'   => 29,
	) );

	// config image cover
	$wp_customize->add_setting( 'blog_cover', array(
	  'type' => 'theme_mod', // or 'option'
	  'capability' => 'edit_theme_options',
	  'theme_supports' => '', // Rarely needed.
	  'transport' => 'refresh', // or postMessage
	  'sanitize_callback' => 'helium_fun_sanitize_callback' // Get function name 
	  
	));


	$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'blog_cover', array(
	    'label'    => __( 'Image cover', 'helium' ),
	    'section'  => 'blog_section',
	    'settings' => 'blog_cover',
	)));

	// config show hide breadscrumb
	$wp_customize->add_setting( 'show_breadcrumb', array(
	  'type' => 'theme_mod', // or 'option'
	  'capability' => 'edit_theme_options',
	  'theme_supports' => '', // Rarely needed.
	  'default' => 'yes',
	  'transport' => 'refresh', // or postMessage
	  'sanitize_callback' => 'helium_fun_sanitize_callback' // Get function name 
	));
	
	$wp_customize->add_control('show_breadcrumb', array(
		'label' => esc_html__('Show breadcrumb','helium'),
		'section' => 'blog_section',
		'settings' => 'show_breadcrumb',
		'type' =>'select',
		'choices' => array(
			'yes' => esc_html__( 'Yes', 'helium' ),
            'no'   => esc_html__('No', 'helium')
			)
	));


	// config image cover
	$wp_customize->add_setting( 'blog_heading_text', array(
	  'type' => 'theme_mod', // or 'option'
	  'capability' => 'edit_theme_options',
	  'theme_supports' => '', // Rarely needed.
	  'transport' => 'refresh', // or postMessage
	  'default'	=> esc_html__('Blog','helium'),
	  'sanitize_callback' => 'helium_fun_sanitize_callback' // Get function name 
	  
	));

	$wp_customize->add_control('blog_heading_text', array(
		'label' => esc_html__('Blog heading text','helium'),
		'section' => 'blog_section',
		'settings' => 'blog_heading_text',
		'type' =>'text'
	));


}
add_action( 'customize_register', 'helium_customize_register' );	

