add_panel( $panel_id, array( 'priority' => 35, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => 'WooCommerce', ) ); // Woocommerce General. $section_id = 'woocommerce_general'; $wp_customize->add_section( $section_id, array( 'title' => __( 'General', 'ayyash' ), 'priority' => 9, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_enable_product_flying_cart'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Enable Product Flying Cart', 'ayyash' ), 'description' => __( 'Enable product zoom feature at single product page', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Enable Product Zoom. $setting_id = $section_id . '_enable_product_zoom'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Enable Product Zoom', 'ayyash' ), 'description' => __( 'Enable product zoom feature at single product page', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Enable Product Lightbox. $setting_id = $section_id . '_enable_product_lightbox'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Enable Product Lightbox', 'ayyash' ), 'description' => __( 'Enable product lightbox feature at single product page', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Enable Product Gallery Slider. $setting_id = $section_id . '_enable_product_gallery_slider'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Enable Product Gallery Slider', 'ayyash' ), 'description' => __( 'Enable product gallery slider feature at single product page', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Woocommerce Shop & Archive. $section_id = 'woocommerce_shop_archive'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Shop And Archive', 'ayyash' ), 'priority' => 9, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); // Shop page Title Bar. $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Shop & Archive Title. $setting_id = $section_id . '_title'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Shop Title', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Shop & Archive Post Per page. $setting_id = $section_id . '_per_page'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Shop Posts Per Page', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); // Shop Layout. $setting_id = $section_id . '_layout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Shop Layout. $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Shop Sidebar', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Shop Column. $setting_id = $section_id . '_column'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Shop Column', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Shop & Archive Shop Result Count. $setting_id = $section_id . '_sort'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Shop Sort', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // Shop & Archive Shop Result Count. $setting_id = $section_id . '_result_count'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Shop Result Count', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'checkbox', ) ) ); // phpcs:disable Squiz.PHP.CommentedOutCode.Found // @TODO Check with Niamul Vai. /* $setting_id = $section_id . '_product_archive_layout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Choose Product Archive Layout', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) );*/ // phpcs:enable // Product Catalogue. $section_id = 'woocommerce_product_catalog'; $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_layout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Shop Single Layout. $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Single Product Sidebar', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Woocommerce Single. $section_id = 'woocommerce_single'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Single', 'ayyash' ), 'priority' => 13, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); // Shop Single Layout. $setting_id = $section_id . '_layout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Shop Single Layout. $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Single Product Sidebar', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Shop Single Up-Sells Count. $setting_id = $section_id . '_upsells_count'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'esc_attr', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Up-Sells Count', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); // Shop Single Related Item Count. $setting_id = $section_id . '_related_item_count'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Related Item Count', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); // Shop Single Related Item Column. $setting_id = $section_id . '_related_product_column'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Related Products Column', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Woocommerce Cart. $section_id = 'woocommerce_cart'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Cart', 'ayyash' ), 'priority' => 15, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Cart Layout Settings. $setting_id = $section_id . '_sidebar_layout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Cart Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Shop Single Layout. $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Cart Sidebar', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Cart Up-Sells Count. $setting_id = $section_id . '_cross_sell_count'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Cross Sell Count', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, ) ) ); // Cart Up-Sells Column. $setting_id = $section_id . '_cross_sell_column'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Cross Sell Column', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // Woocommerce Checkout. $section_id = 'woocommerce_checkout'; $wp_customize->add_section( $section_id, array( 'title' => __( 'Checkout', 'ayyash' ), 'priority' => 16, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_sidebar_layout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Cart Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Checkout Sidebar', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); // My Account Page Settings. $section_id = 'woocommerce_myaccount'; $wp_customize->add_section( $section_id, array( 'title' => __( 'My Account', 'ayyash' ), 'priority' => 16, 'capability' => 'edit_theme_options', 'panel' => $panel_id, ) ); $setting_id = $section_id . '_title-bar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Show Title Bar ?', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_sidebar_layout'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Cart Sidebar Position', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); $setting_id = $section_id . '_sidebar'; $wp_customize->add_setting( $setting_id, array( 'default' => themeoo_get_default( $setting_id ), 'type' => 'theme_mod', 'sanitize_callback' => 'themeoo_sanitize_choice', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $setting_id, array( 'label' => __( 'Checkout Sidebar', 'ayyash' ), 'section' => $section_id, 'settings' => $setting_id, 'type' => 'select', 'choices' => themeoo_get_choices( $setting_id ), ) ) ); } }