<?php 
/**
 * Fields For blog
 * @since 1.0
 * @package RoyalNews
 */

function royalnews_customizer_blog( $section ){
	$section[ 'blog_options' ] = array(
		'title'  => esc_html__( 'Blog Options', 'royalnews' ),
		'fields' => array(
			'excerpt_length' => array(
				'type'        => 'number',
				'label'       => esc_html__( 'Excerpt Length', 'royalnews' ),
				'default'     => 30,
			),
			'read_more_text' => array(
				'type'        => 'text',
				'label'       => esc_html__( 'Read More Text', 'royalnews' ),
				'default'     => esc_html__( 'Explore more', 'royalnews' )
			),
			'post_per_row' => array(
				'type' => 'radio-buttonset',
				'label' => esc_html__( 'Post Per Row', 'royalnews' ),
				'default' => '2',
				'priority' => 10,
				'choices'     => array(
					'1' => esc_html__( '1', 'royalnews' ),
					'2' => esc_html__( '2', 'royalnews' ),
					'3' => esc_html__( '3', 'royalnews' )					
				)
			)
		)
	);
	return $section;
}

add_filter( 'royalnews_customizer_theme_option_panel', 'royalnews_customizer_blog' );