<?php
/**
 * Excerpt
 *
 * @package Frontier News
 */

$wp_customize->add_section(
	'frontier_news_excerpt_options',
	array(
		'panel' => 'frontier_news_theme_options',
		'title' => esc_html__( 'Excerpt', 'frontier-news' ),
	)
);

// Excerpt - Excerpt Length.
$wp_customize->add_setting(
	'frontier_news_excerpt_length',
	array(
		'default'           => 20,
		'sanitize_callback' => 'frontier_news_sanitize_number_range',
	)
);

$wp_customize->add_control(
	'frontier_news_excerpt_length',
	array(
		'label'       => esc_html__( 'Excerpt Length (no. of words)', 'frontier-news' ),
		'section'     => 'frontier_news_excerpt_options',
		'settings'    => 'frontier_news_excerpt_length',
		'type'        => 'number',
		'input_attrs' => array(
			'min'  => 1,
			'max'  => 200,
			'step' => 1,
		),
	)
);
