add_section('bigmart_general_settings', array(
'title' => esc_html__('General Settings', 'bigmart'),
'priority' => 1
));
//$wp_customize->remove_section('background_image');
$wp_customize->get_control('background_color')->section = 'bigmart_general_settings';
$wp_customize->get_control('background_image')->section = 'bigmart_general_settings';
$wp_customize->get_control('background_preset')->section = 'bigmart_general_settings';
$wp_customize->get_control('background_position')->section = 'bigmart_general_settings';
$wp_customize->get_control('background_size')->section = 'bigmart_general_settings';
$wp_customize->get_control('background_repeat')->section = 'bigmart_general_settings';
$wp_customize->get_control('background_attachment')->section = 'bigmart_general_settings';
$wp_customize->get_control('background_color')->priority = 20;
$wp_customize->get_control('background_image')->priority = 20;
$wp_customize->get_control('background_preset')->priority = 20;
$wp_customize->get_control('background_position')->priority = 20;
$wp_customize->get_control('background_size')->priority = 20;
$wp_customize->get_control('background_repeat')->priority = 20;
$wp_customize->get_control('background_attachment')->priority = 20;
if (class_exists('woocommerce')) {
$wp_customize->remove_control('woocommerce_thumbnail_image_width');
$wp_customize->remove_control('woocommerce_thumbnail_cropping');
}
$wp_customize->add_setting('bigmart_website_layout', array(
'default' => 'wide',
'sanitize_callback' => 'bigmart_sanitize_choices',
));
$wp_customize->add_control('bigmart_website_layout', array(
'section' => 'bigmart_general_settings',
'type' => 'radio',
'label' => esc_html__('Website Layout', 'bigmart'),
'choices' => array(
'wide' => esc_html__('Wide', 'bigmart'),
'boxed' => esc_html__('Boxed', 'bigmart')
)
));
$wp_customize->add_setting('bigmart_website_width', array(
'sanitize_callback' => 'bigmart_sanitize_number_absint',
'default' => 1170,
));
$wp_customize->add_control(new Bigmart_Range_Slider($wp_customize, 'bigmart_website_width', array(
'section' => 'bigmart_general_settings',
'label' => esc_html__('Website Container Width', 'bigmart'),
'input_attrs' => array(
'min' => 900,
'max' => 1800,
'step' => 10
)
)));
$wp_customize->add_setting('bigmart_sidebar_width', array(
'sanitize_callback' => 'bigmart_sanitize_number_absint',
'default' => 30,
));
$wp_customize->add_control(new Bigmart_Range_Slider($wp_customize, 'bigmart_sidebar_width', array(
'section' => 'bigmart_general_settings',
'label' => esc_html__('Sidebar Width (%)', 'bigmart'),
'input_attrs' => array(
'min' => 20,
'max' => 50,
'step' => 1
)
)));
$wp_customize->add_setting('bigmart_scroll_animation_seperator', array(
'sanitize_callback' => 'bigmart_sanitize_text'
));
$wp_customize->add_control(new Bigmart_Separator($wp_customize, 'bigmart_scroll_animation_seperator', array(
'section' => 'bigmart_general_settings'
)));
$wp_customize->add_setting('bigmart_show_title', array(
'sanitize_callback' => 'bigmart_sanitize_checkbox',
'default' => true
));
$wp_customize->add_setting('bigmart_enable_preloader', array(
'sanitize_callback' => 'bigmart_sanitize_boolean',
'default' => true
));
$wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_enable_preloader', array(
'section' => 'bigmart_general_settings',
'label' => esc_html__('Enable Preloader', 'bigmart'),
'description' => esc_html__('Is a simple logo animations to keep visitors entertained while site is loading.', 'bigmart')
)));
$wp_customize->add_setting('bigmart_preloader_info', array(
'sanitize_callback' => 'bigmart_sanitize_text',
'transport' => 'refresh'
));
$wp_customize->add_control(new Bigmart_Text_Info($wp_customize, 'bigmart_preloader_info', array(
'section' => 'bigmart_general_settings',
'description' => esc_html__('- 15 Predesigned Preloaders', 'bigmart') . '
' . esc_html__('- Custom Preloader Upload', 'bigmart') . '
' . esc_html__('- Preloader and Background Color Customization', 'bigmart'),
'input_attrs' => array(
'upgrade' => 'yes'
)
)));
$wp_customize->add_setting('bigmart_backtotop', array(
'sanitize_callback' => 'bigmart_sanitize_boolean',
'default' => true
));
$wp_customize->add_control(new Bigmart_Toggle($wp_customize, 'bigmart_backtotop', array(
'section' => 'bigmart_general_settings',
'label' => esc_html__('Back to Top Button', 'bigmart'),
'description' => esc_html__('A button on click scrolls to the top of the page.', 'bigmart')
)));
$wp_customize->add_setting('bigmart_backtop_info', array(
'sanitize_callback' => 'bigmart_sanitize_text',
'transport' => 'refresh'
));
$wp_customize->add_control(new Bigmart_Text_Info($wp_customize, 'bigmart_backtop_info', array(
'section' => 'bigmart_general_settings',
'description' => esc_html__('- Customization for button colors, type, size, position & many more', 'bigmart'),
'input_attrs' => array(
'upgrade' => 'yes'
)
)));