<?php
/**
 * Createing an Our Pets pannel for customizer
 */

// START ABOUT SECTION 
$wp_customize->add_section(
    'membership_section',
    array(
        'title' => __( 'Membership Section', 'luzuk-premium' ),
        'panel' => 'luzuk_premium_home_panel'
    )
);
    // ENABLE/DISABLE FEATURED SECTION
$wp_customize->add_setting(
    'membership_section_disable',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
    )
);
$wp_customize->add_control(
    new luzuk_Switch_Control(
        $wp_customize,
        'membership_section_disable',
        array(
            'settings'      => 'membership_section_disable',
            'section'       => 'membership_section',
            'label'         => __( 'Disable Section', 'luzuk-premium' ),
            'on_off_label'  => array(
                'on' => __( 'Yes', 'luzuk-premium' ),
                'off' => __( 'No', 'luzuk-premium' )
            ),
        )
    )
);

backgroundManager($wp_customize, 'membership', 'membership_section', $color='#fff', get_template_directory_uri().'/images/default-gray.png', 'img');


lzCustomLable($wp_customize, 'luzuk_membershipsectionpadding', 'membership_section', 'Set Padding For Section:');

$wp_customize->add_setting(
    'sec_membershipTpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'sec_membershipTpadding',
    array(
        'settings'      => 'sec_membershipTpadding',
        'section'       => 'membership_section',
        'type'          => 'text',
        'label'         => __( 'Membership Top Padding', 'luzuk' )
    )
);
$wp_customize->add_setting(
    'sec_membershipBpadding',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '5em', 'luzuk' )
    )
);
$wp_customize->add_control(
    'sec_membershipBpadding',
    array(
        'settings'      => 'sec_membershipBpadding',
        'section'       => 'membership_section',
        'type'          => 'text',
        'label'         => __( 'Membership Bottom Padding', 'luzuk' )
    )
);

$wp_customize->add_setting(
    'membership_heading',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text'
    )
);
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'membership_heading',
        array(
            'settings'      => 'membership_heading',
            'section'       => 'membership_section',
            'label'         => __( 'Section Heading & Sub Heding Text', 'luzuk-premium' ),
        )
    )
);  


$wp_customize->add_setting(
    'membership_title',
    array(
        'sanitize_callback' => 'luzuk_sanitize_text',
        'default'           => __( '<span>Our </span>Membership', 'luzuk-premium' )
    )
);
$wp_customize->add_control(
    'membership_title',
    array(
        'settings'      => 'membership_title',
        'section'       => 'membership_section',
        'type'          => 'text',
        'label'         => __( 'Heading for Section', 'luzuk-premium' )
    )
);

addColorPalatOption($wp_customize, 'member_HeadingColor', 'membership_section', 'Section Heading Color ', '#131313');

addColorPalatOption($wp_customize, 'member_HeadinghgColor', 'membership_section', 'Section Heading Highlight Color ', '#131313');


lzAddElement($wp_customize, 'membership_subtitle', 'membership_section', 'textarea', $label="Section Sub Heading Text", 'luzuk_sanitize_text', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has industry,s');

addColorPalatOption($wp_customize, 'member_subHeatxt', 'membership_section', 'Section Sub Heading Text Color ', '#979797');


$wp_customize->add_setting('luzuk_membershipslb_section_lbl', array('sanitize_callback'=>'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Info_Text( 
        $wp_customize,
        'luzuk_membershipslb_section_lbl',
        array(
            'settings'      => 'luzuk_membershipslb_section_lbl',
            'section'       => 'membership_section',
            'label'         => __( 'Note:', 'Luzuk' ),    
            'description'   => __( 'Changes will not reflect unless you select an image', 'Luzuk' ),
        )
    )
);

$wp_customize->add_setting('luzuk_membership_npp_heading',array('sanitize_callback' => 'luzuk_sanitize_text'));
$wp_customize->add_control(
    new luzuk_Customize_Heading(
        $wp_customize,
        'luzuk_membership_npp_heading',
        array(
            'settings'      => 'luzuk_membership_npp_heading',
            'section'       => 'membership_section',
            'label'         => __( 'Number Of Membership To Show', 'luzuk-premium' ),
        )
    )
);    
$wp_customize->add_setting('luzuk_membership_npp_count',array('sanitize_callback' => 'luzuk_sanitize_text','default' => 2));
$wp_customize->add_control(
    'luzuk_membership_npp_count',
    array(
        'settings'      => 'luzuk_membership_npp_count',
        'section'       => 'membership_section',
        'type'          => 'select',
        'label'         => __( 'Number of Membership to show', 'luzuk-premium' ),
        'choices'=>array(1,2,3,4,5,6,7,8,9,10,11,12)
    )
);

//about PAGES
for( $i = 1; $i <= 12; $i++ ){
    $wp_customize->add_setting(
        'luzuk_membership_header'.$i,
        array(
            'sanitize_callback' => 'luzuk_sanitize_text'
        )
    );
    $wp_customize->add_control(
        new luzuk_Customize_Heading(
            $wp_customize,
            'luzuk_membership_header'.$i,
            array(
                'settings'      => 'luzuk_membership_header'.$i,
                'section'       => 'membership_section',
                'label'         => __( 'Membership Section ', 'luzuk-premium' ).$i
            )
        )
    );

lzAddImageElement($wp_customize, 'luzuk_membership_page_icon'.$i, 'membership_section', $label="Recommended Image Size: 370X360px");

lzAddElement($wp_customize, 'membership_page_title_'.$i, 'membership_section', $type = 'text', $label="Title", $callback ='luzuk_sanitize_text', $default='Business Tour');

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

lzAddElement($wp_customize, 'membership_place_'.$i, 'membership_section', $type = 'text', $label="Place", $callback ='luzuk_sanitize_text', $default='Suzhou-China');

lzAddElement($wp_customize, 'membership_price_'.$i, 'membership_section', $type = 'text', $label="Price", $callback ='luzuk_sanitize_text', $default='From- <b>$199</b>');

}
  
lzCustomLable($wp_customize, 'membershipcolor', 'membership_section', 'Section Colors');

addColorPalatOption($wp_customize, 'membe_pageimhhv', 'membership_section', 'Section Image Overlay Color ', '#ff1944');

addColorPalatOption($wp_customize, 'membe_pagettl', 'membership_section', 'Section Membership Name Color ', '#131313');

addColorPalatOption($wp_customize, 'membe_pagettlhv', 'membership_section', 'Section Membership Name Hover Color ', '#ff1944');

addColorPalatOption($wp_customize, 'membe_pageicn', 'membership_section', 'Section Icon Color', '#ff1944');

addColorPalatOption($wp_customize, 'membe_pagetxt', 'membership_section', 'Section Place Text Color ', '#131313');

addColorPalatOption($wp_customize, 'membe_pageprc', 'membership_section', 'Section Price Color ', '#131313');


