<?php

/**
 * Viral Times Theme Customizer
 *
 * @package Viral Times
 */
$wp_customize->get_section('colors')->title = esc_html__('Color Settings', 'viral-times');
$wp_customize->get_section('colors')->priority = 10;

//COLOR SETTINGS
$wp_customize->add_setting('viral_times_template_color', array(
    'default' => '#ea3546',
    'sanitize_callback' => 'sanitize_hex_color',
    'priority' => 1
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'viral_times_template_color', array(
    'section' => 'colors',
    'label' => esc_html__('Theme Primary Color', 'viral-times')
)));

$wp_customize->add_setting('viral_times_color_section_seperator1', array(
    'sanitize_callback' => 'viral_times_sanitize_text'
));

$wp_customize->add_control(new Viral_Times_Separator_Control($wp_customize, 'viral_times_color_section_seperator1', array(
    'section' => 'colors'
)));

$wp_customize->add_setting('viral_times_color_content_info', array(
    'sanitize_callback' => 'viral_times_sanitize_text'
));

$wp_customize->add_control(new Viral_Times_Text_Info_Control($wp_customize, 'viral_times_color_content_info', array(
    'section' => 'colors',
    'label' => esc_html__('Content Colors', 'viral-times'),
    'description' => esc_html__('This settings apply only in the single posts (ie page and post detail pages only)', 'viral-times')
)));

$wp_customize->add_setting('viral_times_content_header_color', array(
    'default' => '#000000',
    'sanitize_callback' => 'sanitize_hex_color',
    'transport' => 'postMessage'
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'viral_times_content_header_color', array(
    'section' => 'colors',
    'label' => esc_html__('Content Header Color(H1, H2, H3, H4, H5, H6)', 'viral-times')
)));

$wp_customize->add_setting('viral_times_content_text_color', array(
    'default' => '#333333',
    'sanitize_callback' => 'sanitize_hex_color',
    'transport' => 'postMessage'
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'viral_times_content_text_color', array(
    'section' => 'colors',
    'label' => esc_html__('Content Text Color', 'viral-times')
)));

$wp_customize->add_setting('viral_times_content_link_color', array(
    'default' => '#000000',
    'sanitize_callback' => 'sanitize_hex_color',
    'transport' => 'postMessage'
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'viral_times_content_link_color', array(
    'section' => 'colors',
    'label' => esc_html__('Content Link Color', 'viral-times')
)));

$wp_customize->add_setting('viral_times_content_link_hov_color', array(
    'default' => '#ea3546',
    'sanitize_callback' => 'sanitize_hex_color',
    'transport' => 'postMessage'
));

$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'viral_times_content_link_hov_color', array(
    'section' => 'colors',
    'label' => esc_html__('Content Link Hover Color', 'viral-times'),
)));

$wp_customize->add_setting('viral_times_color_section_seperator2', array(
    'sanitize_callback' => 'viral_times_sanitize_text'
));

$wp_customize->add_control(new Viral_Times_Separator_Control($wp_customize, 'viral_times_color_section_seperator2', array(
    'section' => 'colors'
)));

$wp_customize->add_setting('viral_times_color_upgrade_text', array(
    'sanitize_callback' => 'viral_times_sanitize_text'
));

$wp_customize->add_control(new Viral_Times_Upgrade_Info_Control($wp_customize, 'viral_times_color_upgrade_text', array(
    'section' => 'colors',
    'label' => esc_html__('For more options,', 'viral-times'),
    'choices' => array(
        esc_html__('Color Tag for each category', 'viral-times'),
    ),
    'priority' => 100,
    'upgrade_text' => esc_html__('Unlock in Viral Pro', 'viral-times'),
    'upgrade_url' => viral_times_upgrade_url('colors', 'viral-times-customizer'),
    'active_callback' => 'viral_times_is_upgrade_notice_active'
)));