<?php
global $moment_panels;
global $moment_sections;
global $moment_settings_controls;
global $moment_repeated_settings_controls;
global $moment_customizer_defaults;

/*defaults values feature photo options*/
$moment_customizer_defaults['moment-home-popular-photo-main-title'] = __('Latest Photo Blog','moment');
$moment_customizer_defaults['moment-home-popular-photo-sub-title'] = __('These are the most viewd photos','moment');
$moment_customizer_defaults['moment-home-popular-photo-number'] = 5;
$moment_customizer_defaults['moment-home-popular-photo-category'] = 0;

/* Popular photos settings*/
$moment_sections['moment-home-popular-photo-main-section'] =
    array(
        'priority'       => 50,
        'title'          => __( 'Settings Options', 'moment' ),
        'panel'          => 'moment-popular-photo-panel',

    );


/*Popular photo Title control*/
$moment_settings_controls['moment-home-popular-photo-main-title'] =
array(
    'setting' =>     array(
        'default'              => $moment_customizer_defaults['moment-home-popular-photo-main-title']
    ),
    'control' => array(
        'label'                 =>  __( 'Main Title', 'moment' ),
        'section'               => 'moment-home-popular-photo-main-section',
        'type'                  => 'text',
        'priority'              => 20,
        'active_callback'       => ''
    )
);

/*Popular photo Sub Title control*/
$moment_settings_controls['moment-home-popular-photo-sub-title'] =
array(
    'setting' =>     array(
        'default'              => $moment_customizer_defaults['moment-home-popular-photo-sub-title']
    ),
    'control' => array(
        'label'                 =>  __( 'Sub Title', 'moment' ),
        'section'               => 'moment-home-popular-photo-main-section',
        'type'                  => 'text',
        'priority'              => 30,
        'active_callback'       => ''
    )
);

/*popular photos number selection control*/
// $moment_settings_controls['moment-home-popular-photo-number'] =
//     array(
//         'setting' =>     array(
//             'default'              => $moment_customizer_defaults['moment-home-popular-photo-number']
//         ),
//         'control' => array(
//             'label'                 =>  __( 'Number Of Blog Post', 'moment' ),
//             'description'           =>  __( 'If feature post is enabled it will ocupy the space of 2 post so choose wisely', 'moment' ),
//             'section'               => 'moment-home-popular-photo-main-section',
//             'type'                  => 'select',
//             'choices'               => array(
//                 1 => __( '1', 'moment' ),
//                 2 => __( '2', 'moment' ),
//                 3 => __( '3', 'moment' ),
//                 4 => __( '4', 'moment' ),
//                 5 => __( '5', 'moment' )
//             ),
//             'priority'              => 40,
//             'active_callback'       => ''
//         )
//     );


/*creating setting control for popular photo Category start*/
$moment_settings_controls['moment-home-popular-photo-category'] =
    array(
        'setting' =>     array(
            'default'              => $moment_customizer_defaults['moment-home-popular-photo-category']
        ),
        'control' => array(
            'label'                 =>  __( 'Select Category For Blog Section', 'moment' ),
            'section'               => 'moment-home-popular-photo-main-section',
            'type'                  => 'category_dropdown',
            'priority'              => 60,
            'active_callback'       => ''

        )
    );
