<?php
/**
 * Footer Options
 *
 * @package Fuzion_Blog
 */

$wp_customize->add_section(
	'fuzion_blog_footer_options',
	array(
		'panel' => 'fuzion_blog_theme_options',
		'title' => esc_html__( 'Footer Options', 'fuzion-blog' ),
	)
);

// Footer Options - Copyright Text.
/* translators: 1: Year, 2: Site Title with home URL. */
$copyright_default = sprintf( esc_html_x( 'Copyright &copy; %1$s %2$s', '1: Year, 2: Site Title with home URL', 'fuzion-blog' ), '[the-year]', '[site-link]' );
$wp_customize->add_setting(
	'fuzion_blog_footer_copyright_text',
	array(
		'default'           => $copyright_default,
		'sanitize_callback' => 'wp_kses_post',
	)
);

$wp_customize->add_control(
	'fuzion_blog_footer_copyright_text',
	array(
		'label'    => esc_html__( 'Copyright Text', 'fuzion-blog' ),
		'section'  => 'fuzion_blog_footer_options',
		'settings' => 'fuzion_blog_footer_copyright_text',
		'type'     => 'textarea',
	)
);

// Footer Options - Scroll Top.
$wp_customize->add_setting(
	'fuzion_blog_scroll_top',
	array(
		'sanitize_callback' => 'fuzion_blog_sanitize_switch',
		'default'           => true,
	)
);

$wp_customize->add_control(
	new Fuzion_Blog_Toggle_Switch_Custom_Control(
		$wp_customize,
		'fuzion_blog_scroll_top',
		array(
			'label'   => esc_html__( 'Enable Scroll Top Button', 'fuzion-blog' ),
			'section' => 'fuzion_blog_footer_options',
		)
	)
);
