default ); } $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; wp_enqueue_style('bicycle-repair-shop-customize-controls', trailingslashit(esc_url(get_template_directory_uri())).'/css/customize-controls.css'); //Logo $wp_customize->add_setting('bicycle_repair_shop_logo_width',array( 'default'=> '', 'transport' => 'refresh', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_integer' )); $wp_customize->add_control(new Bicycle_Repair_Shop_Slider_Custom_Control( $wp_customize, 'bicycle_repair_shop_logo_width',array( 'label' => esc_html__('Logo Width','bicycle-repair-shop'), 'section'=> 'title_tagline', 'settings'=>'bicycle_repair_shop_logo_width', 'input_attrs' => array( 'step' => 1, 'min' => 0, 'max' => 100, ), ))); // color site title $wp_customize->add_setting('bicycle_repair_shop_sitetitle_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_sitetitle_color', array( 'settings' => 'bicycle_repair_shop_sitetitle_color', 'section' => 'title_tagline', 'label' => __('Site Title Color', 'bicycle-repair-shop'), 'type' => 'color' )); $wp_customize->add_setting('bicycle_repair_shop_title_enable',array( 'default' => true, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox', )); $wp_customize->add_control( 'bicycle_repair_shop_title_enable', array( 'settings' => 'bicycle_repair_shop_title_enable', 'section' => 'title_tagline', 'label' => __('Enable Site Title','bicycle-repair-shop'), 'type' => 'checkbox' )); // color site tagline $wp_customize->add_setting('bicycle_repair_shop_sitetagline_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_sitetagline_color', array( 'settings' => 'bicycle_repair_shop_sitetagline_color', 'section' => 'title_tagline', 'label' => __('Site Tagline Color', 'bicycle-repair-shop'), 'type' => 'color' )); $wp_customize->add_setting('bicycle_repair_shop_tagline_enable',array( 'default' => false, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox', )); $wp_customize->add_control( 'bicycle_repair_shop_tagline_enable', array( 'settings' => 'bicycle_repair_shop_tagline_enable', 'section' => 'title_tagline', 'label' => __('Enable Site Tagline','bicycle-repair-shop'), 'type' => 'checkbox' )); //Theme Options $wp_customize->add_panel( 'bicycle_repair_shop_panel_area', array( 'priority' => 10, 'capability' => 'edit_theme_options', 'title' => __( 'Theme Options Panel', 'bicycle-repair-shop' ), ) ); // Header Section $wp_customize->add_section('bicycle_repair_shop_header_section', array( 'title' => __('Manage Top Header Section', 'bicycle-repair-shop'), 'description' => __('
Manage Header Section
','bicycle-repair-shop'), 'priority' => null, 'panel' => 'bicycle_repair_shop_panel_area', )); $wp_customize->add_setting('bicycle_repair_shop_topbar',array( 'default' => false, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox', )); $wp_customize->add_control( 'bicycle_repair_shop_topbar', array( 'section' => 'bicycle_repair_shop_header_section', 'label' => __('Check to show topbar','bicycle-repair-shop'), 'type' => 'checkbox' )); $wp_customize->add_setting('bicycle_repair_shop_stickyheader',array( 'default' => false, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox', )); $wp_customize->add_control( 'bicycle_repair_shop_stickyheader', array( 'section' => 'bicycle_repair_shop_header_section', 'label' => __('Check To Show Sticky Header','bicycle-repair-shop'), 'type' => 'checkbox' )); $wp_customize->add_setting('bicycle_repair_shop_preloader',array( 'default' => true, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox', )); $wp_customize->add_control( 'bicycle_repair_shop_preloader', array( 'section' => 'bicycle_repair_shop_header_section', 'label' => __('Check to Show preloader','bicycle-repair-shop'), 'type' => 'checkbox' )); $wp_customize->add_setting('bicycle_repair_shop_email_address',array( 'default' => '', 'sanitize_callback' => 'sanitize_email', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_email_address', array( 'settings' => 'bicycle_repair_shop_email_address', 'section' => 'bicycle_repair_shop_header_section', 'label' => __('Add Email Address', 'bicycle-repair-shop'), 'type' => 'text' )); $wp_customize->add_setting('bicycle_repair_shop_product_discount_text',array( 'default'=> '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bicycle_repair_shop_product_discount_text',array( 'label' => esc_html__('Add Product Discount Text','bicycle-repair-shop'), 'section'=> 'bicycle_repair_shop_header_section', 'type'=> 'text' )); $wp_customize->add_setting('bicycle_repair_shop_headerbutton_txt',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_headerbutton_txt', array( 'settings' => 'bicycle_repair_shop_headerbutton_txt', 'section' => 'bicycle_repair_shop_header_section', 'label' => __('Shop Button Text', 'bicycle-repair-shop'), 'type' => 'text' )); // header btn link $wp_customize->add_setting('bicycle_repair_shop_headerbutton_link',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_headerbutton_link', array( 'settings' => 'bicycle_repair_shop_headerbutton_link', 'section' => 'bicycle_repair_shop_header_section', 'label' => __('Shop Button Link', 'bicycle-repair-shop'), 'type' => 'text' )); // header menu $wp_customize->add_setting('bicycle_repair_shop_menu_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_menu_color', array( 'settings' => 'bicycle_repair_shop_menu_color', 'section' => 'bicycle_repair_shop_header_section', 'label' => __('Menu Color', 'bicycle-repair-shop'), 'type' => 'color' )); // header menu hover color $wp_customize->add_setting('bicycle_repair_shop_menuhrv_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_menuhrv_color', array( 'settings' => 'bicycle_repair_shop_menuhrv_color', 'section' => 'bicycle_repair_shop_header_section', 'label' => __('Menu Hover Color', 'bicycle-repair-shop'), 'type' => 'color' )); // header sub menu color $wp_customize->add_setting('bicycle_repair_shop_submenu_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_submenu_color', array( 'settings' => 'bicycle_repair_shop_submenu_color', 'section' => 'bicycle_repair_shop_header_section', 'label' => __('SubMenu Color', 'bicycle-repair-shop'), 'type' => 'color' )); // header sub menu hover color $wp_customize->add_setting('bicycle_repair_shop_submenuhrv_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_submenuhrv_color', array( 'settings' => 'bicycle_repair_shop_submenuhrv_color', 'section' => 'bicycle_repair_shop_header_section', 'label' => __('SubMenu Hover Color', 'bicycle-repair-shop'), 'type' => 'color' )); // Home Category Dropdown Section $wp_customize->add_section('bicycle_repair_shop_one_cols_section',array( 'title' => __('Manage Slider Section','bicycle-repair-shop'), 'description' => __('Manage Slider Section
Select Category from the Dropdowns for slider, Also use the given image dimension (1200 x 600).','bicycle-repair-shop'), 'priority' => null, 'panel' => 'bicycle_repair_shop_panel_area' )); // Add a category dropdown Slider Coloumn $wp_customize->add_setting( 'bicycle_repair_shop_slidersection', array( 'default' => '0', 'sanitize_callback' => 'absint' ) ); $wp_customize->add_control( new Bicycle_Repair_Shop_Category_Dropdown_Custom_Control( $wp_customize, 'bicycle_repair_shop_slidersection', array( 'section' => 'bicycle_repair_shop_one_cols_section', 'settings' => 'bicycle_repair_shop_slidersection', ) ) ); //Hide Section $wp_customize->add_setting('bicycle_repair_shop_hide_categorysec',array( 'default' => false, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_hide_categorysec', array( 'settings' => 'bicycle_repair_shop_hide_categorysec', 'section' => 'bicycle_repair_shop_one_cols_section', 'label' => __('Check To Enable This Section','bicycle-repair-shop'), 'type' => 'checkbox' )); $wp_customize->add_setting('bicycle_repair_shop_button_text',array( 'default' => 'SHOP NOW', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_button_text', array( 'settings' => 'bicycle_repair_shop_button_text', 'section' => 'bicycle_repair_shop_one_cols_section', 'label' => __('Add Button Text', 'bicycle-repair-shop'), 'type' => 'text' )); $wp_customize->add_setting('bicycle_repair_shop_button_link_slider',array( 'default'=> '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('bicycle_repair_shop_button_link_slider',array( 'label' => esc_html__('Add Button Link','bicycle-repair-shop'), 'section'=> 'bicycle_repair_shop_one_cols_section', 'type'=> 'url' )); // color slider title $wp_customize->add_setting('bicycle_repair_shop_slidertitle_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_slidertitle_color', array( 'settings' => 'bicycle_repair_shop_slidertitle_color', 'section' => 'bicycle_repair_shop_one_cols_section', 'label' => __('Title Color', 'bicycle-repair-shop'), 'type' => 'color' )); $wp_customize->add_setting('bicycle_repair_shop_sliderpara_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_sliderpara_color', array( 'settings' => 'bicycle_repair_shop_sliderpara_color', 'section' => 'bicycle_repair_shop_one_cols_section', 'label' => __('Content Color', 'bicycle-repair-shop'), 'type' => 'color' )); // color slider button1 text $wp_customize->add_setting('bicycle_repair_shop_sliderbutton1text_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_sliderbutton1text_color', array( 'settings' => 'bicycle_repair_shop_sliderbutton1text_color', 'section' => 'bicycle_repair_shop_one_cols_section', 'label' => __('Button Text Color', 'bicycle-repair-shop'), 'type' => 'color' )); // color slider button1 $wp_customize->add_setting('bicycle_repair_shop_sliderbutton1_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_sliderbutton1_color', array( 'settings' => 'bicycle_repair_shop_sliderbutton1_color', 'section' => 'bicycle_repair_shop_one_cols_section', 'label' => __('Button Background Color', 'bicycle-repair-shop'), 'type' => 'color' )); // Hot Products Category Section $wp_customize->add_section('bicycle_repair_shop_two_cols_section',array( 'title' => __('Manage Best Selling Products Section','bicycle-repair-shop'), 'description' => __('Manage Products Section
','bicycle-repair-shop'), 'priority' => null, 'panel' => 'bicycle_repair_shop_panel_area' )); //Hide Section $wp_customize->add_setting('bicycle_repair_shop_product_selling',array( 'default' => false, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_product_selling', array( 'settings' => 'bicycle_repair_shop_product_selling', 'section' => 'bicycle_repair_shop_two_cols_section', 'label' => __('Check To Enable This Section','bicycle-repair-shop'), 'type' => 'checkbox' )); $wp_customize->add_setting('bicycle_repair_shop_product_title',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_product_title', array( 'settings' => 'bicycle_repair_shop_product_title', 'section' => 'bicycle_repair_shop_two_cols_section', 'label' => __('Add Section Title', 'bicycle-repair-shop'), 'type' => 'text' )); $wp_customize->add_setting('bicycle_repair_shop_product_text',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_product_text', array( 'settings' => 'bicycle_repair_shop_product_text', 'section' => 'bicycle_repair_shop_two_cols_section', 'label' => __('Add Section Text', 'bicycle-repair-shop'), 'type' => 'text' )); $args = array( 'type' => 'product', 'child_of' => 0, 'parent' => '', 'orderby' => 'term_group', 'order' => 'ASC', 'hide_empty' => false, 'hierarchical' => 1, 'number' => '', 'taxonomy' => 'product_cat', 'pad_counts' => false ); $categories = get_categories($args); $cat_posts = array(); $m = 0; $cat_posts[]='Select'; foreach($categories as $category){ if($m==0){ $default = $category->slug; $m++; } $cat_posts[$category->slug] = $category->name; } $wp_customize->add_setting('bicycle_repair_shop_hot_products_cat',array( 'default' => 'select', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_select', )); $wp_customize->add_control('bicycle_repair_shop_hot_products_cat',array( 'type' => 'select', 'choices' => $cat_posts, 'label' => __('Select category to display products ','bicycle-repair-shop'), 'section' => 'bicycle_repair_shop_two_cols_section', )); // product color $wp_customize->add_setting('bicycle_repair_shop_product_title_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_product_title_color', array( 'settings' => 'bicycle_repair_shop_product_title_color', 'section' => 'bicycle_repair_shop_two_cols_section', 'label' => __('Product Section Title Color', 'bicycle-repair-shop'), 'type' => 'color' )); $wp_customize->add_setting('bicycle_repair_shop_product_para_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_product_para_color', array( 'settings' => 'bicycle_repair_shop_product_para_color', 'section' => 'bicycle_repair_shop_two_cols_section', 'label' => __('Product Section Text Color', 'bicycle-repair-shop'), 'type' => 'color' )); $wp_customize->add_setting('bicycle_repair_shop_main_product_title_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_main_product_title_color', array( 'settings' => 'bicycle_repair_shop_main_product_title_color', 'section' => 'bicycle_repair_shop_two_cols_section', 'label' => __('Product Text Color', 'bicycle-repair-shop'), 'type' => 'color' )); $wp_customize->add_setting('bicycle_repair_shop_main_product_price_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_main_product_price_color', array( 'settings' => 'bicycle_repair_shop_main_product_price_color', 'section' => 'bicycle_repair_shop_two_cols_section', 'label' => __('Product Price Color', 'bicycle-repair-shop'), 'type' => 'color' )); //Blog post $wp_customize->add_section('bicycle_repair_shop_blog_post_settings',array( 'title' => __('Manage Post Section', 'bicycle-repair-shop'), 'priority' => null, 'panel' => 'bicycle_repair_shop_panel_area' ) ); // Add Settings and Controls for Post Layout $wp_customize->add_setting('bicycle_repair_shop_sidebar_post_layout',array( 'default' => 'right', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_choices' )); $wp_customize->add_control('bicycle_repair_shop_sidebar_post_layout',array( 'type' => 'radio', 'label' => __('Theme Post Sidebar Position', 'bicycle-repair-shop'), 'description' => __('This option work for blog page, archive page and search page.', 'bicycle-repair-shop'), 'section' => 'bicycle_repair_shop_blog_post_settings', 'choices' => array( 'full' => __('Full','bicycle-repair-shop'), 'left' => __('Left','bicycle-repair-shop'), 'right' => __('Right','bicycle-repair-shop'), 'three-column' => __('Three Columns','bicycle-repair-shop'), 'four-column' => __('Four Columns','bicycle-repair-shop'), 'grid' => __('Grid Layout','bicycle-repair-shop') ), ) ); $wp_customize->add_setting('bicycle_repair_shop_blog_post_description_option',array( 'default' => 'Excerpt Content', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_choices' )); $wp_customize->add_control('bicycle_repair_shop_blog_post_description_option',array( 'type' => 'radio', 'label' => __('Post Description Length','bicycle-repair-shop'), 'section' => 'bicycle_repair_shop_blog_post_settings', 'choices' => array( 'No Content' => __('No Content','bicycle-repair-shop'), 'Excerpt Content' => __('Excerpt Content','bicycle-repair-shop'), 'Full Content' => __('Full Content','bicycle-repair-shop'), ), ) ); // Footer Section $wp_customize->add_section('bicycle_repair_shop_footer', array( 'title' => __('Manage Footer Section','bicycle-repair-shop'), 'description' => __('Manage Footer Section
','bicycle-repair-shop'), 'priority' => null, 'panel' => 'bicycle_repair_shop_panel_area', )); $wp_customize->add_setting('bicycle_repair_shop_footer_widget', array( 'default' => false, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox', )); $wp_customize->add_control('bicycle_repair_shop_footer_widget', array( 'settings' => 'bicycle_repair_shop_footer_widget', // Corrected setting name 'section' => 'bicycle_repair_shop_footer', 'label' => __('Check to Enable Footer Widget', 'bicycle-repair-shop'), 'type' => 'checkbox', )); $wp_customize->add_setting('bicycle_repair_shop_copyright_line',array( 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'bicycle_repair_shop_copyright_line', array( 'section' => 'bicycle_repair_shop_footer', 'label' => __('Copyright Line','bicycle-repair-shop'), 'type' => 'text', 'priority' => null, )); $wp_customize->add_setting('bicycle_repair_shop_copyright_link',array( 'default' => 'https://www.theclassictemplates.com/wp-themes/free-bicycle-wordpress-theme/', 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control( 'bicycle_repair_shop_copyright_link', array( 'section' => 'bicycle_repair_shop_footer', 'label' => __('Link','bicycle-repair-shop'), 'type' => 'text', 'priority' => null, )); // footer coypright color $wp_customize->add_setting('bicycle_repair_shop_footercoypright_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_footercoypright_color', array( 'settings' => 'bicycle_repair_shop_footercoypright_color', 'section' => 'bicycle_repair_shop_footer', 'label' => __('Coypright Color', 'bicycle-repair-shop'), 'type' => 'color' )); // footer bg color $wp_customize->add_setting('bicycle_repair_shop_footerbg_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_footerbg_color', array( 'settings' => 'bicycle_repair_shop_footerbg_color', 'section' => 'bicycle_repair_shop_footer', 'label' => __('BG Color', 'bicycle-repair-shop'), 'type' => 'color' )); // footer title color $wp_customize->add_setting('bicycle_repair_shop_footertitle_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_footertitle_color', array( 'settings' => 'bicycle_repair_shop_footertitle_color', 'section' => 'bicycle_repair_shop_footer', 'label' => __('Title Color', 'bicycle-repair-shop'), 'type' => 'color' )); // footer description color $wp_customize->add_setting('bicycle_repair_shop_footerdescription_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_footerdescription_color', array( 'settings' => 'bicycle_repair_shop_footerdescription_color', 'section' => 'bicycle_repair_shop_footer', 'label' => __('Description Color', 'bicycle-repair-shop'), 'type' => 'color' )); // footer list color $wp_customize->add_setting('bicycle_repair_shop_footerlist_color',array( 'default' => '', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_hex_color', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bicycle_repair_shop_footerlist_color', array( 'settings' => 'bicycle_repair_shop_footerlist_color', 'section' => 'bicycle_repair_shop_footer', 'label' => __('List Color', 'bicycle-repair-shop'), 'type' => 'color' )); $wp_customize->add_setting('bicycle_repair_shop_scroll_hide', array( 'default' => false, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'bicycle_repair_shop_scroll_hide',array( 'label' => __( 'Check To Show Scroll To Top', 'bicycle-repair-shop' ), 'section' => 'bicycle_repair_shop_footer', 'settings' => 'bicycle_repair_shop_scroll_hide', 'type' => 'checkbox', ))); // woocommerce section $wp_customize->add_section('bicycle_repair_shop_woocommerce_page_settings', array( 'title' => __('WooCommerce Page Settings', 'bicycle-repair-shop'), 'priority' => null, 'panel' => 'woocommerce', )); $wp_customize->add_setting('bicycle_repair_shop_shop_page_sidebar',array( 'default' => true, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox' )); $wp_customize->add_control('bicycle_repair_shop_shop_page_sidebar',array( 'type' => 'checkbox', 'label' => __('Enable Shop Page Sidebar','bicycle-repair-shop'), 'section' => 'bicycle_repair_shop_woocommerce_page_settings' )); $wp_customize->add_setting('bicycle_repair_shop_single_product_sidebar',array( 'default' => true, 'sanitize_callback' => 'bicycle_repair_shop_sanitize_checkbox' )); $wp_customize->add_control('bicycle_repair_shop_single_product_sidebar',array( 'type' => 'checkbox', 'label' => __('Enable Single Product Page Sidebar','bicycle-repair-shop'), 'section' => 'bicycle_repair_shop_woocommerce_page_settings' )); // shop page sidebar alignment $wp_customize->add_setting('bicycle_repair_shop_shop_page_sidebar_position', array( 'default' => 'Right Sidebar', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_choices', )); $wp_customize->add_control('bicycle_repair_shop_shop_page_sidebar_position',array( 'type' => 'radio', 'label' => __('Shop Page Sidebar', 'bicycle-repair-shop'), 'section' => 'bicycle_repair_shop_woocommerce_page_settings', 'choices' => array( 'Left Sidebar' => __('Left Sidebar', 'bicycle-repair-shop'), 'Right Sidebar' => __('Right Sidebar', 'bicycle-repair-shop'), ), )); // Single product Page sidebar alignment $wp_customize->add_setting('bicycle_repair_shop_single_product_page_layout', array( 'default' => 'Right Sidebar', 'sanitize_callback' => 'bicycle_repair_shop_sanitize_choices', )); $wp_customize->add_control('bicycle_repair_shop_single_product_page_layout',array( 'type' => 'radio', 'label' => __('Single Shop Page Sidebar', 'bicycle-repair-shop'), 'section' => 'bicycle_repair_shop_woocommerce_page_settings', 'choices' => array( 'Left Sidebar' => __('Left Sidebar', 'bicycle-repair-shop'), 'Right Sidebar' => __('Right Sidebar', 'bicycle-repair-shop'), ), )); } add_action( 'customize_register', 'bicycle_repair_shop_customize_register' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function bicycle_repair_shop_customize_preview_js() { wp_enqueue_script( 'bicycle_repair_shop_customizer', esc_url(get_template_directory_uri()) . '/js/customize-preview.js', array( 'customize-preview' ), '20161510', true ); } add_action( 'customize_preview_init', 'bicycle_repair_shop_customize_preview_js' );