<?php
/**
 * Copyright Customizer controls.
 *
 * @package ttsunsolar
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Register copyright settings.
 *
 * @param WP_Customize_Manager $wp_customize Customizer.
 */
function ttsunsolar_customizer_copyright( $wp_customize ) {
	$wp_customize->add_section(
		'ttsunsolar_copyright',
		array(
			'title'    => esc_html__( 'Copyright', 'ttsunsolar' ),
			'panel'    => 'ttsunsolar_panel',
			'priority' => 50,
		)
	);

	$wp_customize->add_setting(
		'ttsunsolar_copyright',
		array(
			'default'           => '',
			'sanitize_callback' => 'sanitize_textarea_field',
		)
	);
	$wp_customize->add_control(
		'ttsunsolar_copyright',
		array(
			'label'   => esc_html__( 'Copyright Text', 'ttsunsolar' ),
			'section' => 'ttsunsolar_copyright',
			'type'    => 'textarea',
		)
	);

	$wp_customize->add_setting(
		'ttsunsolar_credit_text',
		array(
			'default'           => __( 'Theme by ThemesTulip', 'ttsunsolar' ),
			'sanitize_callback' => 'sanitize_text_field',
		)
	);
	$wp_customize->add_control(
		'ttsunsolar_credit_text',
		array(
			'label'   => esc_html__( 'Credit Link Text', 'ttsunsolar' ),
			'section' => 'ttsunsolar_copyright',
			'type'    => 'text',
		)
	);

	$wp_customize->add_setting(
		'ttsunsolar_credit_url',
		array(
			'default'           => TTSUNSOLAR_VENDOR_URL,
			'sanitize_callback' => 'esc_url_raw',
		)
	);
	$wp_customize->add_control(
		'ttsunsolar_credit_url',
		array(
			'label'   => esc_html__( 'Credit Link URL', 'ttsunsolar' ),
			'section' => 'ttsunsolar_copyright',
			'type'    => 'url',
		)
	);
}
