add_panel( 'billow_global', array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Global', 'billow'), ) ); //-- LAYOUT $wp_customize->add_section( 'billow_global_layout' , array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Layout', 'billow'), 'panel' => 'billow_global', ) ); //-- billow_site_max_width $wp_customize->add_setting( 'billow_site_max_width', array( 'default' => '1170', 'sanitize_callback' => 'billow_sanitize_css_unit', 'sanitize_js_callback' => 'billow_sanitize_js_css_unit', 'transport' => 'refresh' ) ); $wp_customize->add_control( new Billow_Slider_Custom_Control( $wp_customize, 'billow_site_max_width', array( 'label' => esc_html__( 'Maximum Site Width (px)', 'billow' ), 'section' => 'billow_global_layout', 'input_attrs' => array( 'min' => 700, 'max' => 1900, 'step' => 1, ), ) ) ); //-- billow_site_padding_subtitle $wp_customize->add_control( 'billow_site_padding_subtitle', array( 'label' => __( 'Content Area Spacing', 'billow' ), 'description' => __( 'Controls the padding for the page content. Enter value including valid css unit, ex: 48px or 3rem.', 'billow' ), 'section' => 'billow_global_layout', 'settings' => array(), 'type' => 'hidden' ) ); //-- billow_site_padding $wp_customize->add_setting( 'billow_site_padding', array( 'default' => '2rem', 'sanitize_callback' => 'billow_sanitize_css_unit', 'sanitize_js_callback' => 'billow_sanitize_js_css_unit', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new Billow_Customizer_CSS_Number_With_Units_Control( $wp_customize, 'billow_site_padding', array( 'label' => __( 'Left and Right', 'billow' ), 'section' => 'billow_global_layout', 'type' => 'text' ) ) ); //-- billow_content_padding_top $wp_customize->add_setting( 'billow_content_padding_top', array( 'default' => '2rem', 'sanitize_callback' => 'billow_sanitize_css_unit', 'sanitize_js_callback' => 'billow_sanitize_js_css_unit', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new Billow_Customizer_CSS_Number_With_Units_Control( $wp_customize, 'billow_content_padding_top', array( 'label' => __( 'Top', 'billow' ), 'section' => 'billow_global_layout', 'type' => 'text' ) ) ); //-- billow_content_padding_bottom $wp_customize->add_setting( 'billow_content_padding_bottom', array( 'default' => '', 'sanitize_callback' => 'billow_sanitize_css_unit', 'sanitize_js_callback' => 'billow_sanitize_js_css_unit', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new Billow_Customizer_CSS_Number_With_Units_Control( $wp_customize, 'billow_content_padding_bottom', array( 'label' => __( 'Bottom', 'billow' ), 'section' => 'billow_global_layout', 'type' => 'text' ) ) ); //-- THEMES $wp_customize->add_section( 'billow_themes' , array( 'priority' => 20, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Themes', 'billow'), 'panel' => 'billow_global', ) ); //-- billow_theme_style $wp_customize->add_setting( 'billow_theme_style', array( 'capability' => 'edit_theme_options', 'default' => 'theme-style-default', 'sanitize_callback' => 'billow_sanitize_select', ) ); $wp_customize->add_control( 'billow_theme_style', array( 'type' => 'radio', 'section' => 'billow_themes', // Add a default or your own section 'label' => __( 'Default styles', 'billow' ), 'description' => __( 'Specify a default theme style', 'billow' ), 'choices' => apply_filters( 'billow_theme_style_choices', array( 'theme-style-default' => __( 'Sky', 'billow' ), 'theme-style-green' => __( 'Green', 'billow' ), 'theme-style-violet' => __( 'Violet', 'billow' ), 'theme-style-yellow' => __( 'Yellow', 'billow' ), )), ) ); //-- COLORS $wp_customize->add_section( 'billow_colors' , array( 'priority' => 30, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Colors', 'billow'), 'panel' => 'billow_global', ) ); //-- billow_base_color $wp_customize->add_setting( 'billow_base_color', array( 'default' => '#404040', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_base_color', array( 'label' => __( 'Base Font Color', 'billow' ), 'section' => 'billow_colors', ) ) ); //-- billow_link_color $wp_customize->add_setting( 'billow_link_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_link_color', array( 'label' => __( 'Link Color', 'billow' ), 'section' => 'billow_colors', ) ) ); //-- billow_link_hover_color $wp_customize->add_setting( 'billow_link_hover_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_link_hover_color', array( 'label' => __( 'Link Hover Color', 'billow' ), 'section' => 'billow_colors', ) ) ); //-- billow_heading_color $wp_customize->add_setting( 'billow_heading_color', array( 'default' => '#404040', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_heading_color', array( 'label' => __( 'Heading Color (H1-H6)', 'billow' ), 'section' => 'billow_colors', ) ) ); $wp_customize->get_control( 'background_color' )->label = __( 'Site Background', 'billow' ); $wp_customize->get_control( 'background_color' )->transport = 'postMessage'; $wp_customize->get_control( 'background_color' )->section = 'billow_colors'; //-- BACKGROUND //relocate core background_image to billow_website panel $wp_customize->get_section( 'background_image' )->title = __( 'Background', 'billow' ); $wp_customize->get_control( 'background_image' )->label = __( 'Site Background Image', 'billow' ); $wp_customize->get_section( 'background_image' )->panel = 'billow_global'; $wp_customize->get_section( 'background_image' )->priority = 40; //-- BUTTONS $wp_customize->add_section( 'billow_buttons' , array( 'priority' => 50, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Buttons', 'billow'), 'panel' => 'billow_global', ) ); //-- billow_button_font_color $wp_customize->add_setting( 'billow_button_font_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_button_font_color', array( 'label' => __( 'Font Color', 'billow' ), 'section' => 'billow_buttons', ) ) ); //-- billow_button_bc_color $wp_customize->add_setting( 'billow_button_bc_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_button_bc_color', array( 'label' => __( 'Background Color', 'billow' ), 'section' => 'billow_buttons', ) ) ); //-- billow_button_hover_font_color $wp_customize->add_setting( 'billow_button_hover_font_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_button_hover_font_color', array( 'label' => __( 'Hover Font Color', 'billow' ), 'section' => 'billow_buttons', ) ) ); //-- billow_button_hover_bc_color $wp_customize->add_setting( 'billow_button_hover_bc_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_button_hover_bc_color', array( 'label' => __( 'Hover Background Color', 'billow' ), 'section' => 'billow_buttons', ) ) ); //-- billow_button_border billow_customizer_add_border( $wp_customize, 'billow_button_border', 'billow_buttons', array( 'billow_button_border' => __( 'Border Width', 'billow'), 'billow_button_border_style' => __( 'Border Style', 'billow'), 'billow_button_border_color' => __( 'Border Color', 'billow'), ) ); //-- billow_button_hover_border billow_customizer_add_border( $wp_customize, 'billow_button_hover_border', 'billow_buttons', array( 'billow_button_hover_border' => __( 'Hover Border Width', 'billow'), 'billow_button_hover_border_style' => __( 'Hover Border Style', 'billow'), 'billow_button_hover_border_color' => __( 'Hover Border Color', 'billow'), ) ); //-- billow_button_border_radius billow_customizer_add_radius( $wp_customize, 'billow_button_border_radius', 'billow_buttons' ); //-- billow_button_hover_border_radius billow_customizer_add_radius( $wp_customize, 'billow_button_hover_border_radius', 'billow_buttons', array( 'billow_button_hover_border_radius' => __( 'Hover Radius', 'billow'), ) ); // SCROLL TO TOP $wp_customize->add_section( 'billow_scroll_top' , array( 'priority' => 50, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Scroll to Top', 'billow'), 'panel' => 'billow_global', ) ); //-- billow_scroll_to_top_visibility $wp_customize->add_control( 'billow_scroll_to_top_visibility', array( 'label' => __( 'Element Visibility', 'billow' ), 'section' => 'billow_scroll_top', 'settings' => array(), 'type' => 'hidden' ) ); //-- billow_scroll_top_visibility $wp_customize->add_setting( 'billow_scroll_top_visibility', array( 'default' => 1, 'sanitize_callback' => 'billow_text_sanitization', ) ); $wp_customize->add_control( 'billow_scroll_top_visibility', array( 'label' => __( 'Scroll to Top', 'billow' ), 'section' => 'billow_scroll_top', 'type' => 'checkbox', ) ); //-- billow_scroll_top_align $wp_customize->add_setting( 'billow_scroll_top_align', array( 'default' => 'right', 'sanitize_callback' => 'billow_text_sanitization', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new Billow_Text_Radio_Button_Custom_Control( $wp_customize, 'billow_scroll_top_align', array( 'label' => __( 'Alignment', 'billow' ), 'section' => 'billow_scroll_top', 'choices' => array( 'left' => __( 'Left', 'billow' ), 'center' => __( 'Center', 'billow' ), 'right' => __( 'Right', 'billow' ) ) ) ) ); //-- billow_scroll_top_button_type $wp_customize->add_setting( 'billow_scroll_top_button_type', array( 'default' => 'square', 'sanitize_callback' => 'billow_text_sanitization', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new Billow_Text_Radio_Button_Custom_Control( $wp_customize, 'billow_scroll_top_button_type', array( 'label' => __( 'Button Type', 'billow' ), 'section' => 'billow_scroll_top', 'choices' => array( 'square' => __( 'Square', 'billow' ), 'circle' => __( 'Circle', 'billow' ) ) ) ) ); //-- billow_scroll_top_icon_type $wp_customize->add_setting( 'billow_scroll_top_icon_type', array( 'default' => 'type-1', 'sanitize_callback' => 'billow_text_sanitization', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new Billow_Text_Radio_Button_Custom_Control( $wp_customize, 'billow_scroll_top_icon_type', array( 'label' => __( 'Icon Type', 'billow' ), 'section' => 'billow_scroll_top', 'choices' => array( 'type-1' => __( 'Type 1', 'billow' ), 'type-2' => __( 'Type 2', 'billow' ), 'type-3' => __( 'Type 3', 'billow' ) ) ) ) ); //-- billow_scroll_top_icon_color $wp_customize->add_setting( 'billow_scroll_top_icon_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_scroll_top_icon_color', array( 'label' => __( 'Icon Color', 'billow' ), 'section' => 'billow_scroll_top', ) ) ); //-- billow_scroll_top_icon_hover_color $wp_customize->add_setting( 'billow_scroll_top_icon_hover_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_scroll_top_icon_hover_color', array( 'label' => __( 'Icon Hover Color', 'billow' ), 'section' => 'billow_scroll_top', ) ) ); //-- billow_scroll_top_bc_color $wp_customize->add_setting( 'billow_scroll_top_bc_color', array( 'default' => '', '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_scroll_top_bc_color', array( 'label' => __( 'Background Color', 'billow' ), 'show_opacity' => true, 'section' => 'billow_scroll_top', ) ) ); //-- billow_scroll_top_bc_hover_color $wp_customize->add_setting( 'billow_scroll_top_bc_hover_color', array( 'default' => '', '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_scroll_top_bc_hover_color', array( 'label' => __( 'Background Hover Color', 'billow' ), 'show_opacity' => true, 'section' => 'billow_scroll_top', ) ) );