<?php

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

			$wp_customize->add_control(
				new wrockmetro_Customizer_Heading_Control(
					$wp_customize,
					'wrockmetro_header_heading',
					array(
						'label'    => esc_html__( 'Choose Author Style', 'wrock-metro' ),
						'section'  => 'wrockmetro_author_profile',
						'priority' => 15,
					)));
			$wp_customize->add_setting(
			'wrockmetro_authorprofile_style',
			array(
				'default'           => 'styleone',
				'type'              => 'theme_mod',
				'sanitize_callback' => 'wrockmetro_customize_sanitize_select',
				'capability'        => 'edit_theme_options',
			)
		);

		$wp_customize->add_control(
			new wrockmetro_Image_Radio_Control(
				$wp_customize,
				'wrockmetro_authorprofile_style',
				array(
					'label'       => __( 'Profile Style', 'wrock-metro' ),
					'description' => __( 'Choose Author Profile Style. After Choosing & Publish You need to REFRESH Website', 'wrock-metro' ),
					'section'     => 'wrockmetro_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( 'wrockmetro_authorprofile_style_priority', 20 ),
				)
			));
			
			$wp_customize->add_setting(
				'wrockmetro_author_headingset',
				array(
					'sanitize_callback' => 'wp_kses',
				));

			$wp_customize->add_control(
				new wrockmetro_Customizer_Heading_Control(
					$wp_customize,
					'wrockmetro_author_headingset',
					array(
						'label'    => esc_html__( 'Author Settings', 'wrock-metro' ),
						'section'  => 'wrockmetro_author_profile',
						'priority' => 25,
					)));
			
			$wp_customize->add_setting('wrockmetro_authorpro_on',	
			array(
				'default'			=> 'enable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'wrockmetro_customize_sanitize_select'
			));
		$wp_customize->add_control('wrockmetro_authorpro_on',
			 array (                             
				'type' => 'radio',
				'label' => __('Enable or Disable Profile','wrock-metro'),
				'settings'   => 'wrockmetro_authorpro_on',
				'section' => 'wrockmetro_author_profile',
				'choices' => array(
					'enable' => __('Enable','wrock-metro'),
					'disable' => __('Disable','wrock-metro'),
				 ),
				 'priority'    => apply_filters( 'wrockmetro_authorpro_on_priority', 30 ),
			 ));
			$wp_customize->add_setting('wrockmetro_authorpro_mail',	
			array(
				'default'			=> 'disable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'wrockmetro_customize_sanitize_select'
			));
		$wp_customize->add_control('wrockmetro_authorpro_mail',
			 array (                             
				'type' => 'radio',
				'label' => __('Show or Hide Author Email','wrock-metro'),
				'settings'   => 'wrockmetro_authorpro_mail',
				'section' => 'wrockmetro_author_profile',
				'choices' => array(
					'enable' => __('Show','wrock-metro'),
					'disable' => __('Hide','wrock-metro'),
				 ),
				'priority'    => apply_filters( 'wrockmetro_authorpro_mail_priority', 40 ), 
			 ));
			$wp_customize->add_setting('wrockmetro_authorpro_website',	
			array(
				'default'			=> 'disable',
				'type'				=> 'theme_mod',
				'capability'		=> 'edit_theme_options',
				'sanitize_callback'	=> 'wrockmetro_customize_sanitize_select'
			));
		$wp_customize->add_control('wrockmetro_authorpro_website',
			 array (                             
				'type' => 'radio',
				'label' => __('Show or Hide Author Website','wrock-metro'),
				'settings'   => 'wrockmetro_authorpro_website',
				'section' => 'wrockmetro_author_profile',
				'choices' => array(
					'enable' => __('Show','wrock-metro'),
					'disable' => __('Hide','wrock-metro'),
				 ),
				'priority'    => apply_filters( 'wrockmetro_authorpro_website_priority', 50 ),
			 ));
	