add_panel( 'billow_home_page', array( 'priority' => 30, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Home Page', 'billow' ), ) ); //-- LAYOUT $wp_customize->add_section( 'billow_home_page_layout' , array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Layout', 'billow'), 'panel' => 'billow_home_page', ) ); //-- billow_home_page_bc_image_visibility $wp_customize->add_setting( 'billow_home_page_bc_image_visibility', array( 'default' => 1, 'sanitize_callback' => 'billow_text_sanitization', ) ); $wp_customize->add_control( 'billow_home_page_bc_image_visibility', array( 'label' => __( 'Background Block Visibility', 'billow' ), 'section' => 'billow_home_page_layout', 'type' => 'checkbox', ) ); //-- billow_home_page_horizontal_align $wp_customize->add_setting( 'billow_home_page_horizontal_align', array( 'default' => 'center', 'sanitize_callback' => 'billow_text_sanitization', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new Billow_Text_Radio_Button_Custom_Control( $wp_customize, 'billow_home_page_horizontal_align', array( 'label' => __( 'Horizontal Alignment', 'billow' ), 'section' => 'billow_home_page_layout', 'choices' => array( 'left' => __( 'Left', 'billow' ), 'center' => __( 'Center', 'billow' ), 'right' => __( 'Right', 'billow' ) ) ) ) ); //-- billow_home_page_vertical_align $wp_customize->add_setting( 'billow_home_page_vertical_align', array( 'default' => 'space-evenly', 'sanitize_callback' => 'billow_sanitize_css_unit', 'sanitize_js_callback' => 'billow_sanitize_js_css_unit', 'transport' => 'postMessage', ) ); $wp_customize->add_control( 'billow_home_page_vertical_align', array( 'label' => __( 'Vertical Alignment', 'billow' ), 'section' => 'billow_home_page_layout', 'type' => 'select', 'choices' => array( 'center' => 'center', 'flex-start' => 'top', 'flex-end' => 'bottom', 'space-around' => 'space around', 'space-between' => 'space between', 'space-evenly' => 'space evenly', ) ) ); //-- padding billow_customizer_add_padding( $wp_customize, 'billow_home_page_layout_padding', 'billow_home_page_layout' ); //-- COLORS/BACKGROUND $wp_customize->add_section( 'billow_home_page_colbc' , array( 'priority' => 20, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Colors/Background', 'billow'), 'panel' => 'billow_home_page', ) ); //-- billow_home_page_bar_bc $wp_customize->add_setting( 'billow_home_page_bar_bc', array( 'default' => '', 'sanitize_callback' => 'billow_sanitize_alpha', 'sanitize_js_callback' => 'billow_sanitize_js_alpha', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new Billow_Customize_Alpha_Color_Control( $wp_customize, 'billow_home_page_bar_bc', array( 'label' => __( 'Header Bar Background Color', 'billow' ), 'show_opacity' => true, 'section' => 'billow_home_page_colbc', ) ) ); //-- billow_home_page_bc_image $wp_customize->add_setting( 'billow_home_page_bc_image', array( 'sanitize_callback' => 'billow_text_sanitization', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'billow_home_page_bc_image', array( 'label' => __( 'Background Image', 'billow' ), 'section' => 'billow_home_page_colbc', ) ) ); //-- billow_home_page_bc_overlay_color $wp_customize->add_setting( 'billow_home_page_bc_overlay_color', array( 'default' => 'rgba(0, 0, 0, 0.36)', 'sanitize_callback' => 'billow_sanitize_alpha', 'sanitize_js_callback' => 'billow_sanitize_js_alpha', 'transport' => 'refresh', ) ); $wp_customize->add_control( new Billow_Customize_Alpha_Color_Control( $wp_customize, 'billow_home_page_bc_overlay_color', array( 'label' => __( 'Background Overlay Color', 'billow' ), 'section' => 'billow_home_page_colbc', ) ) ); //-- billow_home_page_title_font_color $wp_customize->add_setting( 'billow_home_page_title_font_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_home_page_title_font_color', array( 'label' => __( 'Title Font Color', 'billow' ), 'section' => 'billow_home_page_colbc', ) ) ); //-- billow_home_page_button_font_color $wp_customize->add_setting( 'billow_home_page_button_font_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_home_page_button_font_color', array( 'label' => __( 'Button Font Color', 'billow' ), 'section' => 'billow_home_page_colbc', ) ) ); //-- billow_home_page_button_bc_color $wp_customize->add_setting( 'billow_home_page_button_bc_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_home_page_button_bc_color', array( 'label' => __( 'Button Background Color', 'billow' ), 'section' => 'billow_home_page_colbc', ) ) ); //-- billow_home_page_button_hover_font_color $wp_customize->add_setting( 'billow_home_page_button_hover_font_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_home_page_button_hover_font_color', array( 'label' => __( 'Button Hover Font Color', 'billow' ), 'section' => 'billow_home_page_colbc', ) ) ); //-- billow_home_page_button_hover_bc_color $wp_customize->add_setting( 'billow_home_page_button_hover_bc_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_home_page_button_hover_bc_color', array( 'label' => __( 'Button Hover Background Color', 'billow' ), 'section' => 'billow_home_page_colbc', ) ) ); //-- TITLE $wp_customize->add_section( 'billow_home_page_title' , array( 'priority' => 30, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Title', 'billow'), 'panel' => 'billow_home_page', ) ); //-- billow_home_page_title_font billow_customizer_add_typography( $wp_customize, 'billow_home_page_title_font', 'billow_home_page_title', array( 'billow_home_page_title_font' => __( 'Font Family', 'billow'), ) ); //-- BUTTON $wp_customize->add_section( 'billow_home_page_button' , array( 'priority' => 40, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Button', 'billow'), 'panel' => 'billow_home_page', ) ); //-- billow_home_page_button_text $wp_customize->add_setting( 'billow_home_page_button_text', array( 'default' => __( 'Get Started', 'billow' ), 'sanitize_callback' => 'esc_textarea' ) ); $wp_customize->add_control( 'billow_home_page_button_text', array( 'label' => __( 'Button text', 'billow' ), 'section' => 'billow_home_page_button', 'type' => 'textarea' ) ); //-- billow_home_page_button_font billow_customizer_add_typography( $wp_customize, 'billow_home_page_button_font', 'billow_home_page_button', array( 'billow_home_page_button_font' => __( 'Font Family', 'billow'), ) ); //-- billow_home_page_button_border billow_customizer_add_border( $wp_customize, 'billow_home_page_button_border', 'billow_home_page_button', array( 'billow_home_page_button_border' => __( 'Border Width', 'billow'), 'billow_home_page_button_border_style' => __( 'Border Style', 'billow'), 'billow_home_page_button_border_color' => __( 'Border Color', 'billow'), ) ); //-- billow_home_page_button_hover_border billow_customizer_add_border( $wp_customize, 'billow_home_page_button_hover_border', 'billow_home_page_button', array( 'billow_home_page_button_hover_border' => __( 'Hover Border Width', 'billow'), 'billow_home_page_button_hover_border_style' => __( 'Hover Border Style', 'billow'), 'billow_home_page_button_hover_border_color' => __( 'Hover Border Color', 'billow'), ) ); //-- billow_home_page_button_border_radius billow_customizer_add_radius( $wp_customize, 'billow_home_page_button_border_radius', 'billow_home_page_button' ); //-- billow_home_page_button_hover_border_radius billow_customizer_add_radius( $wp_customize, 'billow_home_page_button_hover_border_radius', 'billow_home_page_button', array( 'billow_home_page_button_hover_border_radius' => __( 'Hover Radius', 'billow'), ) );