<?php
/**
 * Recent Posts Customizer options.
 *
 * @package Rubik News
 */

// Add Recent Posts section.
$wp_customize->add_section(
	'rubik_news_recent_posts_section',
	array(
		'title'    => __( 'Recent Posts', 'rubik-news' ),
		'panel'    => 'rubik_news_homepage_sections_panel',
		'priority' => 100,
	)
);

// Disable Recent Posts.
$wp_customize->add_setting(
	'disable_recent_posts',
	array(
		'default'           => false,
		'sanitize_callback' => 'rubik_news_sanitize_checkbox',
	)
);

$wp_customize->add_control(
	'disable_recent_posts',
	array(
		'label'       => __( 'Disable Recent Posts', 'rubik-news' ),
		'description' => __(
			'Hide the default recent posts and pagination from the homepage.',
			'rubik-news'
		),
		'section'     => 'rubik_news_recent_posts_section',
		'type'        => 'checkbox',
	)
);