<?php

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
/*********************
Author Profile
*******************/
		$wp_customize->add_section('digital_author_profile',
			array(
				'title'       => __( 'Author Profile', 'digital' ),
				'description'       => __( 'Author Profile Control on Posts and Archive Pages (Make Sure to fill all detail to show profile in Dashboard > Users > Profile)', 'digital' ),
				'capability'  => 'edit_theme_options',						
				'panel'			=> 'digital_theme_elements',
				'priority'    => apply_filters( 'digital_author_profile_priority', 10 ),
			));
			
		$wp_customize->add_setting(
				'digital_header_heading',
				array(
					'sanitize_callback' => 'wp_kses',
				));

			$wp_customize->add_control(
				new digital_Customizer_Heading_Control(
					$wp_customize,
					'digital_header_heading',
					array(
						'label'    => esc_html__( 'Choose Author Style', 'digital' ),
						'section'  => 'digital_author_profile',
						'priority' => 15,
					)));
			$wp_customize->add_setting(
			'digital_authorprofile_style',
			array(
				'default'           => 'styleone',
				'type'              => 'theme_mod',
				'sanitize_callback' => 'digital_customize_sanitize_select',
				'capability'        => 'edit_theme_options',
			)
		);

		$wp_customize->add_control(
			new digital_Image_Radio_Control(
				$wp_customize,
				'digital_authorprofile_style',
				array(
					'label'       => __( 'Profile Style', 'digital' ),
					'description' => __( 'Choose Author Profile Style. After Choosing & Publish You need to REFRESH Website', 'digital' ),
					'section'     => 'digital_author_profile',
					'choices'     => array(
						'styleone'  => get_template_directory_uri() . '/images/author/authorone.png',
						'styletwo' => get_template_directory_uri() . '/images/author/authortwo.png',
						'stylethree' => get_template_directory_uri() . '/images/author/authorthree.png',
						'stylefour' => get_template_directory_uri() . '/images/author/stylefour.png',
					),
					'priority'    => apply_filters( 'digital_authorprofile_style_priority', 20 ),
				)
			));
			
			$wp_customize->add_setting(
				'digital_author_headingset',
				array(
					'sanitize_callback' => 'wp_kses',
				));

			$wp_customize->add_control(
				new digital_Customizer_Heading_Control(
					$wp_customize,
					'digital_author_headingset',
					array(
						'label'    => esc_html__( 'Author Settings', 'digital' ),
						'section'  => 'digital_author_profile',
						'priority' => 25,
					)));
			
			$wp_customize->add_setting('digital_authorpro_on',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'digital_customize_sanitize_select'
			));
		$wp_customize->add_control('digital_authorpro_on',
			 array (                             
				'type' => 'radio',
				'label' => __('Enable or Disable Profile','digital'),
				'settings'   => 'digital_authorpro_on',
				'section' => 'digital_author_profile',
				'choices' => array(
					'enable' => __('Enable','digital'),
					'disable' => __('Disable','digital'),
				 ),
				 'priority'    => apply_filters( 'digital_authorpro_on_priority', 30 ),
			 ));
			$wp_customize->add_setting('digital_authorpro_mail',	
			array(
				'default'			=> 'disable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'digital_customize_sanitize_select'
			));
		$wp_customize->add_control('digital_authorpro_mail',
			 array (                             
				'type' => 'radio',
				'label' => __('Show or Hide Author Email','digital'),
				'settings'   => 'digital_authorpro_mail',
				'section' => 'digital_author_profile',
				'choices' => array(
					'enable' => __('Show','digital'),
					'disable' => __('Hide','digital'),
				 ),
				'priority'    => apply_filters( 'digital_authorpro_mail_priority', 40 ), 
			 ));
			$wp_customize->add_setting('digital_authorpro_website',	
			array(
				'default'			=> 'disable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'digital_customize_sanitize_select'
			));
		$wp_customize->add_control('digital_authorpro_website',
			 array (                             
				'type' => 'radio',
				'label' => __('Show or Hide Author Website','digital'),
				'settings'   => 'digital_authorpro_website',
				'section' => 'digital_author_profile',
				'choices' => array(
					'enable' => __('Show','digital'),
					'disable' => __('Hide','digital'),
				 ),
				'priority'    => apply_filters( 'digital_authorpro_website_priority', 50 ),
			 ));
	