add_section('bLab_footer_option', array( 'title' => __('Footer Option', 'beauty-lab'), 'priority' => 125, )); //----enable footer widget----- $wp_customize->add_setting( 'bLab_enable_footer_widget', array( 'default' => true, 'transport' => 'refresh', 'sanitize_callback' => 'themecon_sanitize_checkbox', )); $wp_customize->add_control( 'bLab_enable_footer_widget_control', array( 'label' => __( 'Enable Footer Widget', 'beauty-lab' ), 'section' => 'bLab_footer_option', 'settings' => 'bLab_enable_footer_widget', 'type' => 'checkbox', ) ); //----enable footer content------ $wp_customize->add_setting( 'bLab_enable_footer', array( 'default' => true, 'transport' => 'refresh', 'sanitize_callback' => 'themecon_sanitize_checkbox', )); $wp_customize->add_control( 'bLab_enable_footer_control', array( 'label' => __( 'Enable Footer', 'beauty-lab' ), 'section' => 'bLab_footer_option', 'settings' => 'bLab_enable_footer', 'type' => 'checkbox', ) ); //---footer widget separator--- $wp_customize->add_setting( 'bLab_footer_widget_separator', array( 'default' => __('Footer Widget', 'beauty-lab'), 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Beauty_Lab_Separator_Control( $wp_customize, 'bLab_footer_widget_separator_control', array( 'section' => 'bLab_footer_option', 'settings' => 'bLab_footer_widget_separator', 'active_callback' => 'bLab_enable_widget_field', ) ) ); //---footer widget background color---- $wp_customize->add_setting('bLab_footer_widget_bg_color', array( 'default' => '#151618', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control('bLab_footer_widget_bg_color_control', array( 'label' => __('Background Color', 'beauty-lab'), 'section' => 'bLab_footer_option', 'settings' => 'bLab_footer_widget_bg_color', 'type' => 'color', 'active_callback' => 'bLab_enable_widget_field', ) ); //---footer widget content color---- $wp_customize->add_setting('bLab_footer_widget_txt_color', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control('bLab_footer_widget_txt_color_control', array( 'label' => __('Content Color', 'beauty-lab'), 'section' => 'bLab_footer_option', 'settings' => 'bLab_footer_widget_txt_color', 'type' => 'color', 'active_callback' => 'bLab_enable_widget_field', ) ); //---footer widget column option---- $wp_customize->add_setting('bLab_footer_widget_column', array( 'default' => 3, 'transport' => 'refresh', 'sanitize_callback' => 'themecon_sanitize_select', )); $wp_customize->add_control('bLab_footer_widget_column_control', array( 'label' => __('Select Widget Column', 'beauty-lab'), 'section' => 'bLab_footer_option', 'settings' => 'bLab_footer_widget_column', 'type' => 'radio', 'choices' => array( '1' => __('One Column','beauty-lab'), '2' => __('Two Column','beauty-lab'), '3' => __('Three Column','beauty-lab'), ), 'active_callback' => 'bLab_enable_widget_field', ) ); //---footer content separator--- $wp_customize->add_setting( 'bLab_footer_content_separator', array( 'default' => __('Footer Content', 'beauty-lab'), 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Beauty_Lab_Separator_Control( $wp_customize, 'bLab_footer_content_separator_control', array( 'section' => 'bLab_footer_option', 'settings' => 'bLab_footer_content_separator', 'active_callback' => 'bLab_enable_footer_field', ) ) ); //---footer background color---- $wp_customize->add_setting('bLab_footer_bg_color', array( 'default' => '#232428', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control('bLab_footer_bg_color_control', array( 'label' => __('Background Color', 'beauty-lab'), 'section' => 'bLab_footer_option', 'settings' => 'bLab_footer_bg_color', 'type' => 'color', 'active_callback' => 'bLab_enable_footer_field', ) ); //---footer content color---- $wp_customize->add_setting('bLab_footer_txt_color', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control('bLab_footer_txt_color_control', array( 'label' => __('Content Color', 'beauty-lab'), 'section' => 'bLab_footer_option', 'settings' => 'bLab_footer_txt_color', 'type' => 'color', 'active_callback' => 'bLab_enable_footer_field', ) ); //----footer content text----- $wp_customize->add_setting('bLab_footer_text', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'wp_kses_post', )); $wp_customize->add_control('bLab_footer_text_control', array( 'label' => __('Footer Text', 'beauty-lab'), 'section' => 'bLab_footer_option', 'settings' => 'bLab_footer_text', 'type' => 'textarea', 'active_callback' => 'bLab_enable_footer_field', ) ); } add_action( 'customize_register', 'beauty_lab_customize_footer_option' ); function bLab_enable_widget_field(){ if( get_theme_mod( 'bLab_enable_footer_widget' ) == 1 ){ return true; }else{ return false; } } function bLab_enable_footer_field(){ if( get_theme_mod( 'bLab_enable_footer' ) == 1 ){ return true; }else{ return false; } } ?>