add_panel( 'theme_option_panel', array( 'title' => __( 'Theme Options', 'boutique-shop' ), 'priority' => 30, 'capability' => 'edit_theme_options', ) ); // Single Post Setting Title $wp_customize->add_section('section_single_post_setting', array( 'title' => __('Single Post Setting', 'boutique-shop'), 'panel' => 'theme_option_panel' ) ); //Author Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_post_author_setting]', array( 'default' => $default['boutique_shop_post_author_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_post_author_setting]', array( 'label' => __( 'Show Author', 'boutique-shop' ), 'section' => 'section_single_post_setting', 'type' => 'checkbox', ) ); //Date Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_post_date_setting]', array( 'default' => $default['boutique_shop_post_date_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_post_date_setting]', array( 'label' => __( 'Show Date', 'boutique-shop' ), 'section' => 'section_single_post_setting', 'type' => 'checkbox', ) ); //Categories Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_post_categories_setting]', array( 'default' => $default['boutique_shop_post_categories_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_post_categories_setting]', array( 'label' => __( 'Show Categories', 'boutique-shop' ), 'section' => 'section_single_post_setting', 'type' => 'checkbox', ) ); //Comments Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_post_comment_setting]', array( 'default' => $default['boutique_shop_post_comment_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_post_comment_setting]', array( 'label' => __( 'Show Comments', 'boutique-shop' ), 'section' => 'section_single_post_setting', 'type' => 'checkbox', ) ); //Post Pagination Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_single_page_pagination_setting]', array( 'default' => $default['boutique_shop_single_page_pagination_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_single_page_pagination_setting]', array( 'label' => __( 'Show Post Pagination', 'boutique-shop' ), 'section' => 'section_single_post_setting', 'type' => 'checkbox', ) ); //Post Content Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_single_page_content_setting]', array( 'default' => $default['boutique_shop_single_page_content_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_single_page_content_setting]', array( 'label' => __( 'Show Post Content', 'boutique-shop' ), 'section' => 'section_single_post_setting', 'type' => 'checkbox', ) ); //Tags Content Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_single_tags_setting]', array( 'default' => $default['boutique_shop_single_tags_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_single_tags_setting]', array( 'label' => __( 'Show Tags', 'boutique-shop' ), 'section' => 'section_single_post_setting', 'type' => 'checkbox', ) ); //Post Setting $wp_customize->add_section('section_post_setting', array( 'title' => __('Post Setting', 'boutique-shop'), 'panel' => 'theme_option_panel' ) ); //Title Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_post_title_setting]', array( 'default' => $default['boutique_shop_post_title_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_post_title_setting]', array( 'label' => __( 'Show Title', 'boutique-shop' ), 'section' => 'section_post_setting', 'type' => 'checkbox', ) ); //meta Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_post_meta_setting]', array( 'default' => $default['boutique_shop_post_meta_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_post_meta_setting]', array( 'label' => __( 'Show Meta', 'boutique-shop' ), 'section' => 'section_post_setting', 'type' => 'checkbox', ) ); //Content Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_post_content_setting]', array( 'default' => $default['boutique_shop_post_content_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_post_content_setting]', array( 'label' => __( 'Show Content', 'boutique-shop' ), 'section' => 'section_post_setting', 'type' => 'checkbox', ) ); //Button Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_post_button_setting]', array( 'default' => $default['boutique_shop_post_button_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_post_button_setting]', array( 'label' => __( 'Show Button', 'boutique-shop' ), 'section' => 'section_post_setting', 'type' => 'checkbox', ) ); //Featured Image Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_post_feature_image_setting]', array( 'default' => $default['boutique_shop_post_feature_image_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_post_feature_image_setting]', array( 'label' => __( 'Show Featured Image', 'boutique-shop' ), 'section' => 'section_post_setting', 'type' => 'checkbox', ) ); // Page Title $wp_customize->add_section('section_page_title', array( 'title' => __('Page Title', 'boutique-shop'), 'panel' => 'theme_option_panel' ) ); // Show / Hide Page Title $wp_customize->add_setting( 'theme_options[boutique_shop_show_page_title]', array( 'default' => $default['boutique_shop_show_page_title'], 'sanitize_callback' => 'boutique_shop_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_show_page_title]', array( 'label' => esc_html__( 'Display Page Title', 'boutique-shop' ), 'section' => 'section_page_title', 'type' => 'select', 'choices' => array( 'page-title-enable' => 'Yes', 'page-title-disable' => 'No', ), ) ); // Sidebar Layout $wp_customize->add_section('section_sidebar_layout', array( 'title' => __('Sidebar Layout', 'boutique-shop'), 'panel' => 'theme_option_panel' )); // Blog Layout $wp_customize->add_setting('theme_options[boutique_shop_layout_options_blog]', array( 'default' => $default['boutique_shop_layout_options_blog'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'boutique_shop_sanitize_select' ) ); $wp_customize->add_control(new Boutique_Shop_Image_Radio_Control($wp_customize, 'theme_options[boutique_shop_layout_options_blog]', array( 'label' => __('Blog Layout', 'boutique-shop'), 'section' => 'section_sidebar_layout', 'settings' => 'theme_options[boutique_shop_layout_options_blog]', 'type' => 'radio-image', 'choices' => array( 'left-sidebar' => get_template_directory_uri() . '/assets/images/left-sidebar.png', 'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.png', 'no-sidebar' => get_template_directory_uri() . '/assets/images/no-sidebar.png', ), )) ); // Archive Layout $wp_customize->add_setting('theme_options[boutique_shop_layout_options_archive]', array( 'default' => $default['boutique_shop_layout_options_archive'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'boutique_shop_sanitize_select' ) ); $wp_customize->add_control(new Boutique_Shop_Image_Radio_Control($wp_customize, 'theme_options[boutique_shop_layout_options_archive]', array( 'label' => __('Archive Layout', 'boutique-shop'), 'section' => 'section_sidebar_layout', 'settings' => 'theme_options[boutique_shop_layout_options_archive]', 'type' => 'radio-image', 'choices' => array( 'left-sidebar' => get_template_directory_uri() . '/assets/images/left-sidebar.png', 'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.png', 'no-sidebar' => get_template_directory_uri() . '/assets/images/no-sidebar.png', ), )) ); // Page Layout $wp_customize->add_setting('theme_options[boutique_shop_layout_options_page]', array( 'default' => $default['boutique_shop_layout_options_page'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'boutique_shop_sanitize_select' ) ); $wp_customize->add_control(new Boutique_Shop_Image_Radio_Control($wp_customize, 'theme_options[boutique_shop_layout_options_page]', array( 'label' => __('Page Layout', 'boutique-shop'), 'section' => 'section_sidebar_layout', 'settings' => 'theme_options[boutique_shop_layout_options_page]', 'type' => 'radio-image', 'choices' => array( 'left-sidebar' => get_template_directory_uri() . '/assets/images/left-sidebar.png', 'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.png', 'no-sidebar' => get_template_directory_uri() . '/assets/images/no-sidebar.png', ), )) ); // Single Post Layout $wp_customize->add_setting('theme_options[boutique_shop_layout_options_single]', array( 'default' => $default['boutique_shop_layout_options_single'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'boutique_shop_sanitize_select' ) ); $wp_customize->add_control(new Boutique_Shop_Image_Radio_Control($wp_customize, 'theme_options[boutique_shop_layout_options_single]', array( 'label' => __('Single Post Layout', 'boutique-shop'), 'section' => 'section_sidebar_layout', 'settings' => 'theme_options[boutique_shop_layout_options_single]', 'type' => 'radio-image', 'choices' => array( 'left-sidebar' => get_template_directory_uri() . '/assets/images/left-sidebar.png', 'right-sidebar' => get_template_directory_uri() . '/assets/images/right-sidebar.png', 'no-sidebar' => get_template_directory_uri() . '/assets/images/no-sidebar.png', ), )) ); // Excerpt Length $wp_customize->add_section('section_boutique_shop_excerpt_length', array( 'title' => __('Excerpt Length', 'boutique-shop'), 'panel' => 'theme_option_panel' ) ); $wp_customize->add_setting( 'theme_options[boutique_shop_excerpt_length]', array( 'default' => $default['boutique_shop_excerpt_length'], 'sanitize_callback' => 'boutique_shop_sanitize_number_range', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_excerpt_length]', array( 'label' => esc_html__( 'Excerpt Length', 'boutique-shop' ), 'section' => 'section_boutique_shop_excerpt_length', 'type' => 'number', 'input_attrs' => array( 'min' => 1, 'max' => 200, 'style' => 'width: 80px;' ), ) ); // Blog Settings $wp_customize->add_section('section_blog_setting', array( 'title' => __('Blog / Archive Settings', 'boutique-shop'), 'panel' => 'theme_option_panel' ) ); // Blog Title $wp_customize->add_setting( 'theme_options[boutique_shop_your_latest_posts_title]', array( 'default' => $default['boutique_shop_your_latest_posts_title'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'boutique_shop_sanitize_textarea_content', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_your_latest_posts_title]', array( 'label' => __( 'Blog Title', 'boutique-shop' ), 'section' => 'section_blog_setting', 'type' => 'text', ) ); // Blog Button Label $wp_customize->add_setting( 'theme_options[boutique_shop_readmore_text]', array( 'default' => $default['boutique_shop_readmore_text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'boutique_shop_sanitize_textarea_content', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_readmore_text]', array( 'label' => __( 'Button Label', 'boutique-shop' ), 'section' => 'section_blog_setting', 'type' => 'text', ) ); // Footer Setting Section starts $wp_customize->add_section('section_footer', array( 'title' => __('Footer Setting', 'boutique-shop'), 'panel' => 'theme_option_panel' ) ); // Footer Copyright Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_footer_setting]', array( 'default' => $default['boutique_shop_footer_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); //Footer Widgets Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_footer_widgtes_setting]', array( 'default' => $default['boutique_shop_footer_widgtes_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_footer_widgtes_setting]', array( 'label' => __( 'Show Footer Widgets', 'boutique-shop' ), 'section' => 'section_footer', 'type' => 'checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_footer_setting]', array( 'label' => __( 'Show Footer Copyright', 'boutique-shop' ), 'section' => 'section_footer', 'type' => 'checkbox', ) ); // Setting boutique_shop_copyright_text. $wp_customize->add_setting( 'theme_options[boutique_shop_copyright_text]', array( 'default' => $default['boutique_shop_copyright_text'], 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_copyright_text]', array( 'label' => __( 'Copyright Text', 'boutique-shop' ), 'section' => 'section_footer', 'type' => 'text', 'priority' => 100, ) ); // General Setting Section starts $wp_customize->add_section('section_general_setting', array( 'title' => __('General Setting', 'boutique-shop'), 'panel' => 'theme_option_panel' ) ); /** Scroll to top control */ $wp_customize->add_setting( 'theme_options[boutique_shop_header_donate_scroll_to_top]', array( 'default' => $default['boutique_shop_header_donate_scroll_to_top'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_header_donate_scroll_to_top]', array( 'label' => __( 'Show Scroll To Top', 'boutique-shop' ), 'section' => 'section_general_setting', 'type' => 'checkbox', ) ); // Preloader Setting control $wp_customize->add_setting( 'theme_options[boutique_shop_header_donate_preloader_setting]', array( 'default' => $default['boutique_shop_header_donate_preloader_setting'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_header_donate_preloader_setting]', array( 'label' => __( 'Show Preloader', 'boutique-shop' ), 'section' => 'section_general_setting', 'type' => 'checkbox', ) ); /** Sticky Header control */ $wp_customize->add_setting( 'theme_options[boutique_shop_sticky_header]', array( 'default' => $default['boutique_shop_sticky_header'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_sticky_header]', array( 'label' => __( 'Show Sticky Header', 'boutique-shop' ), 'section' => 'section_general_setting', 'type' => 'checkbox', ) ); // Woocommerce Setting $wp_customize->add_section('section_woocommerce_setting', array( 'title' => __('Woocommerce Setting', 'boutique-shop'), 'panel' => 'theme_option_panel' ) ); // Select No Of Columns $wp_customize->add_setting( 'theme_options[boutique_shop_archive_product_per_row]', array( 'default' => $default['boutique_shop_archive_product_per_row'], 'sanitize_callback' => 'boutique_shop_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_archive_product_per_row]', array( 'label' => esc_html__( 'Select No Of Columns', 'boutique-shop' ), 'section' => 'section_woocommerce_setting', 'type' => 'select', 'choices' => array( '1' => '1 Column', '2' => '2 Column', '3' => '3 Column', '4' => '4 Column', ), ) ); $wp_customize->add_setting( 'theme_options[boutique_shop_archive_product_per_page]', array( 'default' => $default['boutique_shop_archive_product_per_page'], 'transport' => 'refresh', 'sanitize_callback' => 'boutique_shop_sanitize_number_absint', 'sanitize_js_callback' => 'absint', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_archive_product_per_page]', array( 'label' => esc_html__( 'Product Per Page','boutique-shop' ), 'section' => 'section_woocommerce_setting', 'type' => 'number', ) ); // Homepage Static setting and control. $wp_customize->add_setting( 'theme_options[boutique_shop_enable_frontpage_content]', array( 'default' => $default['boutique_shop_enable_frontpage_content'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_enable_frontpage_content]', array( 'label' => __( 'Enable Content', 'boutique-shop' ), 'description' => __( 'Click to enable content on static front page only.', 'boutique-shop' ), 'section' => 'static_front_page', 'type' => 'checkbox', ) ); // Show / Hide Frontpage Content $wp_customize->add_setting( 'theme_options[boutique_shop_enable_frontpage_content]', array( 'default' => $default['boutique_shop_enable_frontpage_content'], 'sanitize_callback' => 'boutique_shop_sanitize_checkbox', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_enable_frontpage_content]', array( 'label' => esc_html__( 'Enable Homepage Content', 'boutique-shop' ), 'description' => esc_html__( 'Enable content on A static page.', 'boutique-shop' ), 'section' => 'static_front_page', 'type' => 'checkbox', ) ); // Show / Hide Header Image $wp_customize->add_setting( 'theme_options[boutique_shop_show_header_image]', array( 'default' => $default['boutique_shop_show_header_image'], 'sanitize_callback' => 'boutique_shop_sanitize_select', ) ); $wp_customize->add_control( 'theme_options[boutique_shop_show_header_image]', array( 'label' => esc_html__( 'Display Header Image', 'boutique-shop' ), 'section' => 'header_image', 'type' => 'select', 'choices' => array( 'header-image-enable' => 'Yes', 'header-image-disable' => 'No', ), ) );