<?php

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

			$wp_customize->add_control(
				new magazinestyle_Customizer_Heading_Control(
					$wp_customize,
					'magazinestyle_header_heading',
					array(
						'label'    => esc_html__( 'Choose Author Style', 'magazine-style' ),
						'section'  => 'magazinestyle_author_profile',
						'priority' => 15,
					)));
			$wp_customize->add_setting(
			'magazinestyle_authorprofile_style',
			array(
				'default'           => 'styleone',
				'type'              => 'theme_mod',
				'sanitize_callback' => 'magazinestyle_customize_sanitize_select',
				'capability'        => 'edit_theme_options',
			)
		);

		$wp_customize->add_control(
			new magazinestyle_Image_Radio_Control(
				$wp_customize,
				'magazinestyle_authorprofile_style',
				array(
					'label'       => __( 'Profile Style', 'magazine-style' ),
					'description' => __( 'Choose Author Profile Style. After Choosing & Publish You need to REFRESH Website', 'magazine-style' ),
					'section'     => 'magazinestyle_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( 'magazinestyle_authorprofile_style_priority', 20 ),
				)
			));
			
			$wp_customize->add_setting(
				'magazinestyle_author_headingset',
				array(
					'sanitize_callback' => 'wp_kses',
				));

			$wp_customize->add_control(
				new magazinestyle_Customizer_Heading_Control(
					$wp_customize,
					'magazinestyle_author_headingset',
					array(
						'label'    => esc_html__( 'Author Settings', 'magazine-style' ),
						'section'  => 'magazinestyle_author_profile',
						'priority' => 25,
					)));
			
			$wp_customize->add_setting('magazinestyle_authorpro_on',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'magazinestyle_customize_sanitize_select'
			));
		$wp_customize->add_control('magazinestyle_authorpro_on',
			 array (                             
				'type' => 'radio',
				'label' => __('Enable or Disable Profile','magazine-style'),
				'settings'   => 'magazinestyle_authorpro_on',
				'section' => 'magazinestyle_author_profile',
				'choices' => array(
					'enable' => __('Enable','magazine-style'),
					'disable' => __('Disable','magazine-style'),
				 ),
				 'priority'    => apply_filters( 'magazinestyle_authorpro_on_priority', 30 ),
			 ));
			$wp_customize->add_setting('magazinestyle_authorpro_mail',	
			array(
				'default'			=> 'disable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'magazinestyle_customize_sanitize_select'
			));
		$wp_customize->add_control('magazinestyle_authorpro_mail',
			 array (                             
				'type' => 'radio',
				'label' => __('Show or Hide Author Email','magazine-style'),
				'settings'   => 'magazinestyle_authorpro_mail',
				'section' => 'magazinestyle_author_profile',
				'choices' => array(
					'enable' => __('Show','magazine-style'),
					'disable' => __('Hide','magazine-style'),
				 ),
				'priority'    => apply_filters( 'magazinestyle_authorpro_mail_priority', 40 ), 
			 ));
			$wp_customize->add_setting('magazinestyle_authorpro_website',	
			array(
				'default'			=> 'disable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'magazinestyle_customize_sanitize_select'
			));
		$wp_customize->add_control('magazinestyle_authorpro_website',
			 array (                             
				'type' => 'radio',
				'label' => __('Show or Hide Author Website','magazine-style'),
				'settings'   => 'magazinestyle_authorpro_website',
				'section' => 'magazinestyle_author_profile',
				'choices' => array(
					'enable' => __('Show','magazine-style'),
					'disable' => __('Hide','magazine-style'),
				 ),
				'priority'    => apply_filters( 'magazinestyle_authorpro_website_priority', 50 ),
			 ));
	