<?php 

/**
 * Customiser section for featured
 **/
// Featured Section
$wp_customize->add_section(
    'lz_fitness_featured_section',
    array(
        'title'         => __( 'Services Section', 'lz-fitness-premium' ),
        'panel'   => 'lz_fitness_premium_home_panel',
    )
);
// ENABLE/DISABLE TEAM SECTION
$wp_customize->add_setting(
    'lz_fitness_featured_section_disable',
    array(
        'sanitize_callback' => 'lz_fitness_sanitize_text',
        'default' => 'off'
    )
);
$wp_customize->add_control(
    new lz_fitness_Switch_Control(
        $wp_customize,
        'lz_fitness_featured_section_disable',
        array(
            'settings'      => 'lz_fitness_featured_section_disable',
            'section'       => 'lz_fitness_featured_section',
            'label'         => __( 'Disable Section', 'lz-fitness-premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'lz-fitness-premium' ),
                'off' => __( 'No', 'lz-fitness-premium' )
            )   
        )
    )
);

//backgroundManager($wp_customize, 'featured', 'lz_fitness_featured_section', $color='#f4f4f4', get_template_directory_uri().'/images/default-gray.png', 'img');

   
$wp_customize->add_setting('lz_fitness_featured_npp_heading',array('sanitize_callback' => 'lz_fitness_sanitize_text'));
$wp_customize->add_control(
    new lz_fitness_Customize_Heading(
        $wp_customize,
        'lz_fitness_featured_npp_heading',
        array(
            'settings'      => 'lz_fitness_featured_npp_heading',
            'section'       => 'lz_fitness_featured_section',
            'label'         => __( 'Number Of services to show', 'lz-fitness-premium' ),
        )
    )
);    
$wp_customize->add_setting('lz_fitness_featured_npp_count',array('sanitize_callback' => 'lz_fitness_sanitize_text','default' => 3));
$wp_customize->add_control(
    'lz_fitness_featured_npp_count',
    array(
        'settings'      => 'lz_fitness_featured_npp_count',
        'section'       => 'lz_fitness_featured_section',
        'type'          => 'select',
        'label'         => __( 'Number of services to show', 'lz-fitness-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8)
    )
);

// TEAM PAGES
for( $i = 1; $i <= 8; $i++ ){
    $wp_customize->add_setting(
        'lz_fitness_featured_heading'.$i,
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_featured_heading'.$i,
            array(
                'settings'      => 'lz_fitness_featured_heading'.$i,
                'section'       => 'lz_fitness_featured_section',
                'label'         => __( 'Services ', 'lz-fitness-premium' ).$i,
            )
        )
    );
    $wp_customize->add_setting(
        'lz_fitness_feature_page_icon'.$i,
        array(
            'default'           => 'fa fa-birthday-cake',
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );        
    $wp_customize->add_control(
        new lz_fitness_Fontawesome_Icon_Chooser(
            $wp_customize,
            'lz_fitness_feature_page_icon'.$i,
            array(
                'settings'      => 'lz_fitness_feature_page_icon'.$i,
                'section'       => 'lz_fitness_featured_section',
                'type'          => 'icon',
                'label'         => __( 'FontAwesome Icon', 'gurukul' ),
            )
        )
    );

lzAddElement($wp_customize, 'lz_fitness_feature_page_title_'.$i, 'lz_fitness_featured_section', $type = 'text', $label="Title", $callback ='lz_fitness_sanitize_text', $default='Experience Chefs');
lzAddElement($wp_customize, 'lz_fitness_feature_page_description_'.$i, 'lz_fitness_featured_section', $type = 'textarea', $label="Description", $callback ='lz_fitness_sanitize_text', $default='There are many variations passages Lorem Ipsum available, but majority have suffered alteration in some form.');

lzAddElement($wp_customize, 'lz_fitness_feature_page_url_'.$i, 'lz_fitness_featured_section', $type = 'text', $label="Button Link", $callback ='esc_url', $default='Add link here');

}

// icon color
addColorPalatOption($wp_customize, 'lz_featuredicon_Color', 'lz_fitness_featured_section', 'Icon color', '#fff');

// icon hover color
addColorPalatOption($wp_customize, 'lz_featurediconhover_Color', 'lz_fitness_featured_section', 'Icon hover color', '#01beff');

// title color
addColorPalatOption($wp_customize, 'lz_featuredtitle_Color', 'lz_fitness_featured_section', 'Title color', '#fff');

// title hover color
addColorPalatOption($wp_customize, 'lz_featuredtitlehover_Color', 'lz_fitness_featured_section', 'Title hover color', '#000');

// border color
addColorPalatOption($wp_customize, 'lz_featuredtitleborder_Color', 'lz_fitness_featured_section', 'Title border color', '#fff');

// border hover color
addColorPalatOption($wp_customize, 'lz_featuredtitleborderhover_Color', 'lz_fitness_featured_section', 'Title border hover color', '#000');

// text color
addColorPalatOption($wp_customize, 'lz_featuredtext_Color', 'lz_fitness_featured_section', 'Text color', '#fff');

// box bg color
addColorPalatOption($wp_customize, 'lz_featuredboxbg_Color', 'lz_fitness_featured_section', 'Box background color', '#ff6796');

// text color
addColorPalatOption($wp_customize, 'lz_featuredboxborder_Color', 'lz_fitness_featured_section', 'Box border color', '#fff');


 $wp_customize->add_setting(
        'lz_fitness_feature_image_heading',
        array(
            'sanitize_callback' => 'lz_fitness_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new lz_fitness_Customize_Heading(
            $wp_customize,
            'lz_fitness_feature_image_heading',
            array(
                'settings'      => 'lz_fitness_feature_image_heading',
                'section'       => 'lz_fitness_featured_section',
                'label'         => __( 'Right Image', 'lz-fitness-premium' ),
            )
        )
    );

      $wp_customize->add_setting(
        'lz_fitness_feature_image',
        array(
            'sanitize_callback' => 'esc_url_raw'
        )
    );
    $wp_customize->add_control(
        new WP_Customize_Image_Control(
            $wp_customize,
            'lz_fitness_feature_image',
            array(
                'section' => 'lz_fitness_featured_section',
                'settings' => 'lz_fitness_feature_image',
                'description' => __('Recommended Image Size: 500X600px', 'lz-fitness-premium')
            )
        ) 
    );



