<?php
/**
 * Footer Options
 *
 * @package Cosmic Blog
 */

$wp_customize->add_section(
	'cosmic_blog_footer_options',
	array(
		'panel' => 'cosmic_blog_theme_options',
		'title' => esc_html__( 'Footer Options', 'cosmic-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', 'cosmic-blog' ), '[the-year]', '[site-link]' );
$wp_customize->add_setting(
	'cosmic_blog_footer_copyright_text',
	array(
		'default'           => $copyright_default,
		'sanitize_callback' => 'wp_kses_post',
	)
);

$wp_customize->add_control(
	'cosmic_blog_footer_copyright_text',
	array(
		'label'    => esc_html__( 'Copyright Text', 'cosmic-blog' ),
		'section'  => 'cosmic_blog_footer_options',
		'settings' => 'cosmic_blog_footer_copyright_text',
		'type'     => 'textarea',
	)
);

// Categories Section - Section Title.
$wp_customize->add_setting(
	'cosmic_blog_scroll_top_text_label',
	array(
		'default'           => __( 'Scroll to top', 'cosmic-blog' ),
		'sanitize_callback' => 'sanitize_text_field',
	)
);

$wp_customize->add_control(
	'cosmic_blog_scroll_top_text_label',
	array(
		'label'    => esc_html__( 'Scroll to top text label', 'cosmic-blog' ),
		'section'  => 'cosmic_blog_footer_options',
		'settings' => 'cosmic_blog_scroll_top_text_label',
		'type'     => 'text',
	)
);
