<?php
/**
 * Excerpt
 *
 * @package events_and_celebrations
 */

$wp_customize->add_section(
	'events_and_celebrations_excerpt_options',
	array(
		'panel' => 'events_and_celebrations_theme_options',
		'title' => esc_html__( 'Excerpt', 'events-and-celebrations' ),
	)
);

// Excerpt - Excerpt Length.
$wp_customize->add_setting(
	'events_and_celebrations_excerpt_length',
	array(
		'default'           => 50,
		'sanitize_callback' => 'absint',
		'transport'         => 'refresh',
	)
);

$wp_customize->add_control(
	'events_and_celebrations_excerpt_length',
	array(
		'label'       => esc_html__( 'Excerpt Length (no. of words)', 'events-and-celebrations' ),
		'section'     => 'events_and_celebrations_excerpt_options',
		'settings'    => 'events_and_celebrations_excerpt_length',
		'type'        => 'number',
		'input_attrs' => array(
			'min'  => 10,
			'max'  => 200,
			'step' => 1,
		),
	)
);