setup_actions(); } return $instance; } /** * Constructor method. * * @since 1.0.0 * @access private * @return void */ private function __construct() {} /** * Sets up initial actions. * * @since 1.0.0 * @access private * @return void */ private function setup_actions() { // Register panels, sections, settings, controls, and partials. add_action( 'customize_register', array( $this, 'sections' ) ); // Register scripts and styles for the controls. add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 ); } /** * Sets up the customizer sections. * * @since 1.0.0 * @access public * @param object $manager * @return void */ public function sections( $manager ) { // Load custom sections. load_template( trailingslashit( get_template_directory() ) . '/inc/section-pro.php' ); // Register custom section types. $manager->register_section_type( 'Cafe_Alley_Customize_Section_Pro' ); // Register sections. $manager->add_section( new Cafe_Alley_Customize_Section_Pro( $manager, 'example_1', array( 'priority' => 9, 'title' => esc_html__( 'Cafe Alley Pro', 'cafe-alley' ), 'description' => __( 'Buy now and enjoy exclusive discounts!', 'cafe-alley' ), 'pro_text' => esc_html__( 'Go Pro', 'cafe-alley' ), 'pro_url' => esc_url( 'https://www.logicalthemes.com/products/premium-cafe-wordpress-template/' ), ) ) ); } /** * Loads theme customizer CSS. * * @since 1.0.0 * @access public * @return void */ public function enqueue_control_scripts() { wp_enqueue_script( 'cafe-alley-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/js/customize-controls.js', array( 'customize-controls' ) ); wp_enqueue_style( 'cafe-alley-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/assets/css/customize-controls.css' ); } } // Doing this customizer thang! Cafe_Alley_Customize::get_instance(); function cafe_alley_customize_register( $wp_customize ) { //add home page setting pannel $wp_customize->add_panel( 'cafe_alley_panel_id', array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__( 'LT Settings', 'cafe-alley' ), ) ); //Layout Setting $wp_customize->add_section( 'cafe_alley_left_right' , array( 'title' => esc_html__( 'General Settings', 'cafe-alley' ), 'priority' => null, 'panel' => 'cafe_alley_panel_id' ) ); //Select width layout $wp_customize->add_setting('cafe_alley_width_options',array( 'default' => 'Full Width', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control('cafe_alley_width_options',array( 'type' => 'radio', 'label' => __('Select Width Layout','cafe-alley'), 'section' => 'cafe_alley_left_right', 'choices' => array( 'Full Width' => esc_html__('Full Width','cafe-alley'), 'Contained Width' => esc_html__('Contained Width','cafe-alley'), 'Boxed Width' => esc_html__('Boxed Width','cafe-alley'), ), ) ); $wp_customize->add_setting('cafe_alley_theme_options',array( 'default' => 'One Column', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control('cafe_alley_theme_options',array( 'type' => 'radio', 'description' => __( 'Choose sidebar between different options', 'cafe-alley' ), 'label' => esc_html__( 'Post Sidebar Layout.', 'cafe-alley' ), 'section' => 'cafe_alley_left_right', 'choices' => array( 'One Column' => esc_html__('One Column ','cafe-alley'), 'Three Columns' => esc_html__('Three Columns','cafe-alley'), 'Four Columns' => esc_html__('Four Columns','cafe-alley'), 'Right Sidebar' => esc_html__('Right Sidebar','cafe-alley'), 'Left Sidebar' => esc_html__('Left Sidebar','cafe-alley'), 'Grid Layout' => esc_html__('Grid Layout','cafe-alley') ), )); $wp_customize->add_setting('cafe_alley_dropdown_anim',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control('cafe_alley_dropdown_anim', array( 'section' => 'cafe_alley_left_right', 'label' => __( 'Submenu Dropdown Effect','cafe-alley'), 'type' => 'select', 'choices' => array( 'bounceInUp' => __('bounceInUp', 'cafe-alley'), 'zoomIn' => __('zoomIn', 'cafe-alley'), 'flip-up' => __('flip-up', 'cafe-alley'), 'none' => __('none', 'cafe-alley') ) )); $cafe_alley_font_array = array( '' =>'No Fonts', 'Abril Fatface' => 'Abril Fatface', 'Acme' =>'Acme', 'Anton' => 'Anton', 'Architects Daughter' =>'Architects Daughter', 'Arimo' => 'Arimo', 'Arsenal' =>'Arsenal', 'Arvo' =>'Arvo', 'Alegreya' =>'Alegreya', 'Alfa Slab One' =>'Alfa Slab One', 'Averia Serif Libre' =>'Averia Serif Libre', 'Bangers' =>'Bangers', 'Boogaloo' =>'Boogaloo', 'Bad Script' =>'Bad Script', 'Bitter' =>'Bitter', 'Bree Serif' =>'Bree Serif', 'BenchNine' =>'BenchNine', 'Cabin' =>'Cabin', 'Cardo' =>'Cardo', 'Courgette' =>'Courgette', 'Cherry Swash' =>'Cherry Swash', 'Cormorant Garamond' =>'Cormorant Garamond', 'Crimson Text' =>'Crimson Text', 'Cuprum' =>'Cuprum', 'Cookie' =>'Cookie', 'Chewy' =>'Chewy', 'Days One' =>'Days One', 'Dosis' =>'Dosis', 'Droid Sans' =>'Droid Sans', 'Economica' =>'Economica', 'Fredoka One' =>'Fredoka One', 'Fjalla One' =>'Fjalla One', 'Francois One' =>'Francois One', 'Frank Ruhl Libre' => 'Frank Ruhl Libre', 'Gloria Hallelujah' =>'Gloria Hallelujah', 'Great Vibes' =>'Great Vibes', 'Handlee' =>'Handlee', 'Hammersmith One' =>'Hammersmith One', 'Inconsolata' =>'Inconsolata', 'Indie Flower' =>'Indie Flower', 'IM Fell English SC' =>'IM Fell English SC', 'Julius Sans One' =>'Julius Sans One', 'Josefin Slab' =>'Josefin Slab', 'Josefin Sans' =>'Josefin Sans', 'Kanit' =>'Kanit', 'Lobster' =>'Lobster', 'Lato' => 'Lato', 'Lora' =>'Lora', 'Libre Baskerville' =>'Libre Baskerville', 'Lobster Two' => 'Lobster Two', 'Merriweather' =>'Merriweather', 'Monda' =>'Monda', 'Montserrat' =>'Montserrat', 'Muli' =>'Muli', 'Marck Script' =>'Marck Script', 'Noto Serif' =>'Noto Serif', 'Open Sans' =>'Open Sans', 'Overpass' => 'Overpass', 'Overpass Mono' =>'Overpass Mono', 'Oxygen' =>'Oxygen', 'Orbitron' =>'Orbitron', 'Patua One' =>'Patua One', 'Pacifico' =>'Pacifico', 'Padauk' =>'Padauk', 'Playball' =>'Playball', 'Playfair Display' =>'Playfair Display', 'PT Sans' =>'PT Sans', 'Philosopher' =>'Philosopher', 'Permanent Marker' =>'Permanent Marker', 'Poiret One' =>'Poiret One', 'Quicksand' =>'Quicksand', 'Quattrocento Sans' =>'Quattrocento Sans', 'Raleway' =>'Raleway', 'Rubik' =>'Rubik', 'Rokkitt' =>'Rokkitt', 'Russo One' => 'Russo One', 'Righteous' =>'Righteous', 'Slabo' =>'Slabo', 'Source Sans Pro' =>'Source Sans Pro', 'Shadows Into Light Two' =>'Shadows Into Light Two', 'Shadows Into Light' => 'Shadows Into Light', 'Sacramento' =>'Sacramento', 'Shrikhand' =>'Shrikhand', 'Tangerine' => 'Tangerine', 'Ubuntu' =>'Ubuntu', 'VT323' =>'VT323', 'Varela Round' =>'Varela Round', 'Vampiro One' =>'Vampiro One', 'Vollkorn' => 'Vollkorn', 'Volkhov' =>'Volkhov', 'Yanone Kaffeesatz' =>'Yanone Kaffeesatz' ); //Typography $wp_customize->add_section( 'cafe_alley_typography', array( 'title' => __( 'Typography', 'cafe-alley' ), 'priority' => null, 'panel' => 'cafe_alley_panel_id' ) ); // This is Paragraph Color picker setting $wp_customize->add_setting( 'cafe_alley_paragraph_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_paragraph_color', array( 'label' => __('Paragraph Color', 'cafe-alley'), 'section' => 'cafe_alley_typography', 'settings' => 'cafe_alley_paragraph_color', ))); //This is Paragraph FontFamily picker setting $wp_customize->add_setting('cafe_alley_paragraph_font_family',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control( 'cafe_alley_paragraph_font_family', array( 'section' => 'cafe_alley_typography', 'label' => __( 'Paragraph Fonts','cafe-alley'), 'type' => 'select', 'choices' => $cafe_alley_font_array, )); $wp_customize->add_setting('cafe_alley_paragraph_font_size',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_paragraph_font_size',array( 'label' => __('Paragraph Font Size','cafe-alley'), 'section' => 'cafe_alley_typography', 'setting' => 'cafe_alley_paragraph_font_size', 'type' => 'text' )); // This is "a" Tag Color picker setting $wp_customize->add_setting( 'cafe_alley_atag_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_atag_color', array( 'label' => __('"a" Tag Color', 'cafe-alley'), 'section' => 'cafe_alley_typography', 'settings' => 'cafe_alley_atag_color', ))); //This is "a" Tag FontFamily picker setting $wp_customize->add_setting('cafe_alley_atag_font_family',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control( 'cafe_alley_atag_font_family', array( 'section' => 'cafe_alley_typography', 'label' => __( '"a" Tag Fonts','cafe-alley'), 'type' => 'select', 'choices' => $cafe_alley_font_array, )); // This is "a" Tag Color picker setting $wp_customize->add_setting( 'cafe_alley_li_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_li_color', array( 'label' => __('"li" Tag Color', 'cafe-alley'), 'section' => 'cafe_alley_typography', 'settings' => 'cafe_alley_li_color', ))); //This is "li" Tag FontFamily picker setting $wp_customize->add_setting('cafe_alley_li_font_family',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control( 'cafe_alley_li_font_family', array( 'section' => 'cafe_alley_typography', 'label' => __( '"li" Tag Fonts','cafe-alley'), 'type' => 'select', 'choices' => $cafe_alley_font_array, )); // This is H1 Color picker setting $wp_customize->add_setting( 'cafe_alley_h1_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_h1_color', array( 'label' => __('H1 Color', 'cafe-alley'), 'section' => 'cafe_alley_typography', 'settings' => 'cafe_alley_h1_color', ))); //This is H1 FontFamily picker setting $wp_customize->add_setting('cafe_alley_h1_font_family',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control( 'cafe_alley_h1_font_family', array( 'section' => 'cafe_alley_typography', 'label' => __( 'H1 Fonts','cafe-alley'), 'type' => 'select', 'choices' => $cafe_alley_font_array, )); //This is H1 FontSize setting $wp_customize->add_setting('cafe_alley_h1_font_size',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_h1_font_size',array( 'label' => __('H1 Font Size','cafe-alley'), 'section' => 'cafe_alley_typography', 'setting' => 'cafe_alley_h1_font_size', 'type' => 'text' )); // This is H2 Color picker setting $wp_customize->add_setting( 'cafe_alley_h2_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_h2_color', array( 'label' => __('H2 Color', 'cafe-alley'), 'section' => 'cafe_alley_typography', 'settings' => 'cafe_alley_h2_color', ))); //This is H2 FontFamily picker setting $wp_customize->add_setting('cafe_alley_h2_font_family',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control( 'cafe_alley_h2_font_family', array( 'section' => 'cafe_alley_typography', 'label' => __( 'H2 Fonts','cafe-alley'), 'type' => 'select', 'choices' => $cafe_alley_font_array, )); //This is H2 FontSize setting $wp_customize->add_setting('cafe_alley_h2_font_size',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_h2_font_size',array( 'label' => __('H2 Font Size','cafe-alley'), 'section' => 'cafe_alley_typography', 'setting' => 'cafe_alley_h2_font_size', 'type' => 'text' )); // This is H3 Color picker setting $wp_customize->add_setting( 'cafe_alley_h3_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_h3_color', array( 'label' => __('H3 Color', 'cafe-alley'), 'section' => 'cafe_alley_typography', 'settings' => 'cafe_alley_h3_color', ))); //This is H3 FontFamily picker setting $wp_customize->add_setting('cafe_alley_h3_font_family',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control( 'cafe_alley_h3_font_family', array( 'section' => 'cafe_alley_typography', 'label' => __( 'H3 Fonts','cafe-alley'), 'type' => 'select', 'choices' => $cafe_alley_font_array, )); //This is H3 FontSize setting $wp_customize->add_setting('cafe_alley_h3_font_size',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_h3_font_size',array( 'label' => __('H3 Font Size','cafe-alley'), 'section' => 'cafe_alley_typography', 'setting' => 'cafe_alley_h3_font_size', 'type' => 'text' )); // This is H4 Color picker setting $wp_customize->add_setting( 'cafe_alley_h4_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_h4_color', array( 'label' => __('H4 Color', 'cafe-alley'), 'section' => 'cafe_alley_typography', 'settings' => 'cafe_alley_h4_color', ))); //This is H4 FontFamily picker setting $wp_customize->add_setting('cafe_alley_h4_font_family',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control( 'cafe_alley_h4_font_family', array( 'section' => 'cafe_alley_typography', 'label' => __( 'H4 Fonts','cafe-alley'), 'type' => 'select', 'choices' => $cafe_alley_font_array, )); //This is H4 FontSize setting $wp_customize->add_setting('cafe_alley_h4_font_size',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_h4_font_size',array( 'label' => __('H4 Font Size','cafe-alley'), 'section' => 'cafe_alley_typography', 'setting' => 'cafe_alley_h4_font_size', 'type' => 'text' )); // This is H5 Color picker setting $wp_customize->add_setting( 'cafe_alley_h5_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_h5_color', array( 'label' => __('H5 Color', 'cafe-alley'), 'section' => 'cafe_alley_typography', 'settings' => 'cafe_alley_h5_color', ))); //This is H5 FontFamily picker setting $wp_customize->add_setting('cafe_alley_h5_font_family',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control( 'cafe_alley_h5_font_family', array( 'section' => 'cafe_alley_typography', 'label' => __( 'H5 Fonts','cafe-alley'), 'type' => 'select', 'choices' => $cafe_alley_font_array, )); //This is H5 FontSize setting $wp_customize->add_setting('cafe_alley_h5_font_size',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_h5_font_size',array( 'label' => __('H5 Font Size','cafe-alley'), 'section' => 'cafe_alley_typography', 'setting' => 'cafe_alley_h5_font_size', 'type' => 'text' )); // This is H6 Color picker setting $wp_customize->add_setting( 'cafe_alley_h6_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_h6_color', array( 'label' => __('H6 Color', 'cafe-alley'), 'section' => 'cafe_alley_typography', 'settings' => 'cafe_alley_h6_color', ))); //This is H6 FontFamily picker setting $wp_customize->add_setting('cafe_alley_h6_font_family',array( 'default' => '', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'cafe_alley_sanitize_choices' )); $wp_customize->add_control( 'cafe_alley_h6_font_family', array( 'section' => 'cafe_alley_typography', 'label' => __( 'H6 Fonts','cafe-alley'), 'type' => 'select', 'choices' => $cafe_alley_font_array, )); //This is H6 FontSize setting $wp_customize->add_setting('cafe_alley_h6_font_size',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_h6_font_size',array( 'label' => __('H6 Font Size','cafe-alley'), 'section' => 'cafe_alley_typography', 'setting' => 'cafe_alley_h6_font_size', 'type' => 'text' )); //Topbar section $wp_customize->add_section('cafe_alley_topbar',array( 'title' => esc_html__('Topbar','cafe-alley'), 'priority' => null, 'panel' => 'cafe_alley_panel_id', )); $wp_customize->add_setting( 'cafe_alley_sticky_header',array( 'default' => false, 'sanitize_callback' => 'cafe_alley_sanitize_checkbox' ) ); $wp_customize->add_control('cafe_alley_sticky_header',array( 'type' => 'checkbox', 'description' => __( 'Click on the checkbox to enable sticky header.', 'cafe-alley' ), 'label' => __( 'Sticky Header','cafe-alley' ), 'section' => 'cafe_alley_topbar' )); $wp_customize->add_setting( 'cafe_alley_headermenu_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_headermenu_color', array( 'label' => __('Menu Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_headermenu_color', ))); $wp_customize->add_setting( 'cafe_alley_headeractivemenuhover_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_headeractivemenuhover_color', array( 'label' => __('Active Menu & Hover Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_headeractivemenuhover_color', ))); $wp_customize->add_setting( 'cafe_alley_headeractivemenuhoverbg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_headeractivemenuhoverbg_color', array( 'label' => __('Active Menu & Hover BG Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_headeractivemenuhoverbg_color', ))); $wp_customize->add_setting( 'cafe_alley_headersubmenuicon_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_headersubmenuicon_color', array( 'label' => __('Submenu Icon Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_headersubmenuicon_color', ))); $wp_customize->add_setting( 'cafe_alley_headersubmenu_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_headersubmenu_color', array( 'label' => __('Submenu Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_headersubmenu_color', ))); $wp_customize->add_setting( 'cafe_alley_headersubmenuhover_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_headersubmenuhover_color', array( 'label' => __('Submenu Hover Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_headersubmenuhover_color', ))); $wp_customize->add_setting( 'cafe_alley_headersubmenubg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_headersubmenubg_color', array( 'label' => __('Submenu BG Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_headersubmenubg_color', ))); $wp_customize->add_setting( 'cafe_alley_headersubmenubghover_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_headersubmenubghover_color', array( 'label' => __('Submenu BG Hover Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_headersubmenubghover_color', ))); $wp_customize->add_setting( 'cafe_alley_header_searchbg1', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_header_searchbg1', array( 'label' => __('Search BG 1 Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_header_searchbg1', ))); $wp_customize->add_setting( 'cafe_alley_header_searchbg2', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_header_searchbg2', array( 'label' => __('Search BG 2 Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_header_searchbg2', ))); $wp_customize->add_setting( 'cafe_alley_header_searchicon', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_header_searchicon', array( 'label' => __('Search Icon Color', 'cafe-alley'), 'section' => 'cafe_alley_topbar', 'settings' => 'cafe_alley_header_searchicon', ))); //home page slider $wp_customize->add_section( 'cafe_alley_slidersettings' , array( 'title' => esc_html__( 'Slider Settings', 'cafe-alley' ), 'priority' => null, 'panel' => 'cafe_alley_panel_id' ) ); $wp_customize->add_setting('cafe_alley_slider_hide_show',array( 'default' => false, 'sanitize_callback' => 'cafe_alley_sanitize_checkbox' )); $wp_customize->add_control('cafe_alley_slider_hide_show',array( 'type' => 'checkbox', 'description' => __( 'Click on the checkbox to enable slider.', 'cafe-alley' ), 'label' => esc_html__('Show / Hide slider','cafe-alley'), 'section' => 'cafe_alley_slidersettings', )); for ( $count = 1; $count <= 4; $count++ ) { $wp_customize->add_setting( 'cafe_alley_slider_page' . $count, array( 'default' => '', 'sanitize_callback' => 'cafe_alley_sanitize_dropdown_pages' ) ); $wp_customize->add_control( 'cafe_alley_slider_page' . $count, array( 'label' => esc_html__( 'Select Slider Page', 'cafe-alley' ), 'section' => 'cafe_alley_slidersettings', 'type' => 'dropdown-pages' ) ); } $wp_customize->add_setting( 'cafe_alleyslider_title_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyslider_title_color', array( 'label' => __('Title Color', 'cafe-alley'), 'section' => 'cafe_alley_slidersettings', 'settings' => 'cafe_alleyslider_title_color', ))); $wp_customize->add_setting( 'cafe_alleyslider_description_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyslider_description_color', array( 'label' => __('Description Color', 'cafe-alley'), 'section' => 'cafe_alley_slidersettings', 'settings' => 'cafe_alleyslider_description_color', ))); $wp_customize->add_setting( 'cafe_alleyslider_btntext_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyslider_btntext_color', array( 'label' => __('Button Text Color', 'cafe-alley'), 'section' => 'cafe_alley_slidersettings', 'settings' => 'cafe_alleyslider_btntext_color', ))); $wp_customize->add_setting( 'cafe_alleyslider_btnbg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyslider_btnbg_color', array( 'label' => __('Button BG Color', 'cafe-alley'), 'section' => 'cafe_alley_slidersettings', 'settings' => 'cafe_alleyslider_btnbg_color', ))); $wp_customize->add_setting( 'cafe_alleyslider_btntexthrv_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyslider_btntexthrv_color', array( 'label' => __('Button Text Hover Color', 'cafe-alley'), 'section' => 'cafe_alley_slidersettings', 'settings' => 'cafe_alleyslider_btntexthrv_color', ))); // Services Settings $wp_customize->add_section('cafe_alley_services_section',array( 'title' => __('Services Settings','cafe-alley'), 'panel' => 'cafe_alley_panel_id', )); $wp_customize->add_setting('cafe_alley_btn_serviceheading',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_btn_serviceheading',array( 'label' => __('Heading','cafe-alley'), 'section' => 'cafe_alley_services_section', 'type' => 'text' )); // Service Page 1 $wp_customize->add_setting('cafe_alley_service_page_1', array( 'default' => '', 'sanitize_callback' => 'absint', )); $wp_customize->add_control('cafe_alley_service_page_1', array( 'label' => __('Select Service Page 1', 'cafe-alley'), 'section' => 'cafe_alley_services_section', 'type' => 'dropdown-pages', )); // Service Page 2 $wp_customize->add_setting('cafe_alley_service_page_2', array( 'default' => '', 'sanitize_callback' => 'absint', )); $wp_customize->add_control('cafe_alley_service_page_2', array( 'label' => __('Select Service Page 2', 'cafe-alley'), 'section' => 'cafe_alley_services_section', 'type' => 'dropdown-pages', )); // Service Page 3 $wp_customize->add_setting('cafe_alley_service_page_3', array( 'default' => '', 'sanitize_callback' => 'absint', )); $wp_customize->add_control('cafe_alley_service_page_3', array( 'label' => __('Select Service Page 3', 'cafe-alley'), 'section' => 'cafe_alley_services_section', 'type' => 'dropdown-pages', )); $wp_customize->add_setting( 'cafe_alleyservices_heading_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyservices_heading_color', array( 'label' => __('Heading Color', 'cafe-alley'), 'section' => 'cafe_alley_services_section', 'settings' => 'cafe_alleyservices_heading_color', ))); $wp_customize->add_setting( 'cafe_alleyservices_boxtitle_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyservices_boxtitle_color', array( 'label' => __('Box Title Color', 'cafe-alley'), 'section' => 'cafe_alley_services_section', 'settings' => 'cafe_alleyservices_boxtitle_color', ))); $wp_customize->add_setting( 'cafe_alleyservices_boxdescription_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyservices_boxdescription_color', array( 'label' => __('Box Description Color', 'cafe-alley'), 'section' => 'cafe_alley_services_section', 'settings' => 'cafe_alleyservices_boxdescription_color', ))); $wp_customize->add_setting( 'cafe_alleyservices_boxbtntext_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyservices_boxbtntext_color', array( 'label' => __('Box Button Text Color', 'cafe-alley'), 'section' => 'cafe_alley_services_section', 'settings' => 'cafe_alleyservices_boxbtntext_color', ))); $wp_customize->add_setting( 'cafe_alleyservices_boxbtnbg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyservices_boxbtnbg_color', array( 'label' => __('Box Button BG Color', 'cafe-alley'), 'section' => 'cafe_alley_services_section', 'settings' => 'cafe_alleyservices_boxbtnbg_color', ))); // aboutus Section $wp_customize->add_section('cafe_alley_aboutus_section',array( 'title' => __('AboutUs Settings','cafe-alley'), 'panel' => 'cafe_alley_panel_id', )); $wp_customize->add_setting('cafe_alley_aboutustitle',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_aboutustitle',array( 'label' => __('Title','cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'type' => 'text' )); $wp_customize->add_setting('cafe_alley_aboutusdescription',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_aboutusdescription',array( 'label' => __('Description','cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'type' => 'text' )); $wp_customize->add_setting('cafe_alley_aboutuslist1',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_aboutuslist1',array( 'label' => __('List 1','cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'type' => 'text' )); $wp_customize->add_setting('cafe_alley_aboutuslist2',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_aboutuslist2',array( 'label' => __('List 2','cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'type' => 'text' )); $wp_customize->add_setting('cafe_alley_aboutuslist3',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_aboutuslist3',array( 'label' => __('List 3','cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'type' => 'text' )); $wp_customize->add_setting('cafe_alley_aboutusbtnlink', array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', // ✅ Correct sanitizer for URLs )); $wp_customize->add_control('cafe_alley_aboutusbtnlink', array( 'label' => __('Button Link', 'cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'type' => 'url', // ✅ Use 'url' type for better UI in Customizer )); $wp_customize->add_setting( 'cafe_alley_aboutus_image1', array( 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'cafe_alley_aboutus_image1', array( 'label' => __('Image 1','cafe-alley'), 'description' => __('Image size 745*523','cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'settings' => 'cafe_alley_aboutus_image1', ) ) ); $wp_customize->add_setting( 'cafe_alleyaboutus_title_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyaboutus_title_color', array( 'label' => __('Title Color', 'cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'settings' => 'cafe_alleyaboutus_title_color', ))); $wp_customize->add_setting( 'cafe_alleyaboutus_description_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyaboutus_description_color', array( 'label' => __('Description Color', 'cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'settings' => 'cafe_alleyaboutus_description_color', ))); $wp_customize->add_setting( 'cafe_alleyaboutus_lists_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyaboutus_lists_color', array( 'label' => __('Lists Color', 'cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'settings' => 'cafe_alleyaboutus_lists_color', ))); $wp_customize->add_setting( 'cafe_alleyaboutus_btntext_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyaboutus_btntext_color', array( 'label' => __('Button Text Color', 'cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'settings' => 'cafe_alleyaboutus_btntext_color', ))); $wp_customize->add_setting( 'cafe_alleyaboutus_btnbg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyaboutus_btnbg_color', array( 'label' => __('Button BG Color', 'cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'settings' => 'cafe_alleyaboutus_btnbg_color', ))); $wp_customize->add_setting( 'cafe_alleyaboutus_btntexthrv_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyaboutus_btntexthrv_color', array( 'label' => __('Button Text Hover Color', 'cafe-alley'), 'section' => 'cafe_alley_aboutus_section', 'settings' => 'cafe_alleyaboutus_btntexthrv_color', ))); //footer $wp_customize->add_section('cafe_alley_footer_section',array( 'title' => esc_html__('Footer Settings','cafe-alley'), 'panel' => 'cafe_alley_panel_id' )); $wp_customize->add_setting('cafe_alley_footer_copy',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_footer_copy',array( 'label' => esc_html__('Copyright Text','cafe-alley'), 'section' => 'cafe_alley_footer_section', 'type' => 'text' )); $wp_customize->add_setting('cafe_alley_footer_copy_font_size',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('cafe_alley_footer_copy_font_size',array( 'label' => __('Copyright Font Size','cafe-alley'), 'section' => 'cafe_alley_footer_section', 'type' => 'number' )); $wp_customize->add_setting( 'cafe_alleyfooter_copyrighttext_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyfooter_copyrighttext_color', array( 'label' => __('Copyright Text Color', 'cafe-alley'), 'section' => 'cafe_alley_footer_section', 'settings' => 'cafe_alleyfooter_copyrighttext_color', ))); $wp_customize->add_setting( 'cafe_alleyfooter_copyrightbg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyfooter_copyrightbg_color', array( 'label' => __('Copyright BG Color', 'cafe-alley'), 'section' => 'cafe_alley_footer_section', 'settings' => 'cafe_alleyfooter_copyrightbg_color', ))); $wp_customize->add_setting( 'cafe_alleyfooter_bg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alleyfooter_bg_color', array( 'label' => __('BG Color', 'cafe-alley'), 'section' => 'cafe_alley_footer_section', 'settings' => 'cafe_alleyfooter_bg_color', ))); $wp_customize->add_setting( 'cafe_alley_wedgets_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_wedgets_color', array( 'label' => __('Wedgets Title Color', 'cafe-alley'), 'section' => 'cafe_alley_footer_section', 'settings' => 'cafe_alley_wedgets_color', ))); $wp_customize->add_setting( 'cafe_alley_wedgets_menus_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_wedgets_menus_color', array( 'label' => __('Wedgets Menus Color', 'cafe-alley'), 'section' => 'cafe_alley_footer_section', 'settings' => 'cafe_alley_wedgets_menus_color', ))); //Wocommerce Shop Page $wp_customize->add_section('cafe_alley_woocommerce_shop_page',array( 'title' => __('Woocommerce Shop Page','cafe-alley'), 'panel' => 'cafe_alley_panel_id' )); $wp_customize->add_setting( 'cafe_alley_products_per_column' , array( 'default' => 3, 'transport' => 'refresh', 'sanitize_callback' => 'cafe_alley_sanitize_choices', ) ); $wp_customize->add_control( 'cafe_alley_products_per_column', array( 'label' => __( 'Product Per Columns', 'cafe-alley' ), 'description' => __('How many products should be shown per Column?','cafe-alley'), 'section' => 'cafe_alley_woocommerce_shop_page', 'type' => 'select', 'choices' => array( '2' => '2', '3' => '3', '4' => '4', '5' => '5', ), ) ); $wp_customize->add_setting('cafe_alley_products_per_page',array( 'default' => 9, 'sanitize_callback' => 'cafe_alley_sanitize_float', )); $wp_customize->add_control('cafe_alley_products_per_page',array( 'label' => __('Product Per Page','cafe-alley'), 'description' => __('How many products should be shown per page?','cafe-alley'), 'section' => 'cafe_alley_woocommerce_shop_page', 'type' => 'number' )); $wp_customize->add_setting( 'cafe_alley_product_btn_bg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_product_btn_bg_color', array( 'label' => __('Button Background Color', 'cafe-alley'), 'section' => 'cafe_alley_woocommerce_shop_page', 'settings' => 'cafe_alley_product_btn_bg_color', ))); $wp_customize->add_setting( 'cafe_alley_product_btn_hover_bg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_product_btn_hover_bg_color', array( 'label' => __('Button Hover Background Color', 'cafe-alley'), 'section' => 'cafe_alley_woocommerce_shop_page', 'settings' => 'cafe_alley_product_btn_hover_bg_color', ))); $wp_customize->add_setting( 'cafe_alley_product_sale_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_product_sale_color', array( 'label' => __('Sale Badge Color', 'cafe-alley'), 'section' => 'cafe_alley_woocommerce_shop_page', 'settings' => 'cafe_alley_product_sale_color', ))); // site logo size $wp_customize->add_setting('cafe_alley_logo_size',array( 'default' => '', 'sanitize_callback' => 'cafe_alley_sanitize_float' )); $wp_customize->add_control('cafe_alley_logo_size',array( 'type' => 'range', 'label' => __('Logo Size','cafe-alley'), 'section' => 'title_tagline' )); // logo site title $wp_customize->add_setting('cafe_alley_site_title_tagline',array( 'default' => true, 'sanitize_callback' => 'cafe_alley_sanitize_checkbox' )); $wp_customize->add_control('cafe_alley_site_title_tagline',array( 'type' => 'checkbox', 'label' => __('Display Site Title and Tagline in Header','cafe-alley'), 'section' => 'title_tagline' )); $wp_customize->add_setting( 'cafe_alley_site_title_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_site_title_color', array( 'label' => __('Site Title Color', 'cafe-alley'), 'section' => 'title_tagline', 'settings' => 'cafe_alley_site_title_color', ))); $wp_customize->add_setting( 'cafe_alley_site_tagline_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'cafe_alley_site_tagline_color', array( 'label' => __('Site Tagline Color', 'cafe-alley'), 'section' => 'title_tagline', 'settings' => 'cafe_alley_site_tagline_color', ))); } add_action( 'customize_register', 'cafe_alley_customize_register' );