add_section('bLab_container', array( 'title' => __('Container', 'beauty-lab'), 'panel' => 'global_panel', 'priority' => 4, )); //----Container layout style----- $wp_customize->add_setting( 'bLab_container_layout', array( 'default' => 'container', 'transport' => 'refresh', 'sanitize_callback' => 'themecon_sanitize_select', )); $wp_customize->add_control( 'bLab_container_layout_control', array( 'label' => __( 'Container Layout', 'beauty-lab' ), 'section' => 'bLab_container', 'settings' => 'bLab_container_layout', 'type' => 'radio', 'choices' => array( 'container' => __('Boxed Container','beauty-lab'), 'container-fluid' => __('Fullwidth Container','beauty-lab'), ), ) ); //----Container style----- $wp_customize->add_setting('bLab_container_width', array( 'default' => 1140, 'transport' => 'refresh', 'sanitize_callback' => 'themecon_intval', )); $wp_customize->add_control('bLab_container_width_control', array( 'label' => __('Container Width', 'beauty-lab'), 'description' => __('Its recommend to take container 1140px. If you change this container then it only works on 1300px to Upper width device.', 'beauty-lab'), 'section' => 'bLab_container', 'settings' => 'bLab_container_width', 'type' => 'number', 'active_callback' => 'bLab_enable_container_field', ) ); } add_action( 'customize_register', 'beauty_lab_customize_container' ); function bLab_enable_container_field(){ if( get_theme_mod( 'bLab_container_layout' ) == 'container' ){ return true; }else{ return false; } } ?>