remove_control( 'blogdescription' ); $wp_customize->remove_control( 'header_textcolor' ); $wp_customize->remove_control( 'display_header_text' ); $wp_customize->add_section( 'bands_options', array( 'title' => __( 'Layout & Display', 'bands' ), 'priority' => 20 ) ); $wp_customize->add_setting( 'bands_layout_width', array( 'default' => '100%', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'layout_width', array( 'label' => esc_html__( 'Layout Width', 'bands' ), 'description' => esc_html__( 'Enter any width by % or px (for example, 100% for full width).', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_layout_width' ) ) ); $wp_customize->add_setting( 'bands_grid_columns', array( 'default' => '1', 'sanitize_callback' => 'absint', 'transport' => 'refresh' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'grid_columns', array( 'label' => esc_html__( 'Blog Grid Count', 'bands' ), 'section' => 'bands_options', 'type' => 'number', 'settings' => 'bands_grid_columns' ) ) ); $wp_customize->add_setting( 'bands_grid_width', array( 'default' => '300px', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'grid_width', array( 'label' => esc_html__( 'Blog Grid Width', 'bands' ), 'description' => esc_html__( 'Enter any width by px only.', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_grid_width' ) ) ); $wp_customize->add_setting( 'bands_grid_gap', array( 'default' => '5%', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'grid_gap', array( 'label' => esc_html__( 'Blog Grid Gap', 'bands' ), 'description' => esc_html__( 'Enter any width by % or px.', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_grid_gap' ) ) ); $wp_customize->add_setting( 'bands_sticky_header', array( 'default' => '1', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'sticky_header', array( 'label' => esc_html__( 'Sticky Header', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_sticky_header', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_center_logo', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'center_logo', array( 'label' => esc_html__( 'Center Logo', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_center_logo', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_left_logo', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'left_logo', array( 'label' => esc_html__( 'Left Logo', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_left_logo', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_display_sidebar', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'display_sidebar', array( 'label' => esc_html__( 'Display Sidebar', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_display_sidebar', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_hide_header', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hide_header', array( 'label' => esc_html__( 'Hide Header', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_hide_header', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_hide_branding', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hide_branding', array( 'label' => esc_html__( 'Hide Logo/Site Title', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_hide_branding', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_hide_menu', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hide_menu', array( 'label' => esc_html__( 'Hide Menu', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_hide_menu', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_hide_search', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hide_search', array( 'label' => esc_html__( 'Hide Search Form', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_hide_search', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_hide_header_image', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hide_header_image', array( 'label' => esc_html__( 'Hide Header Image', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_hide_header_image', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_hide_description', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hide_description', array( 'label' => esc_html__( 'Hide Site Description', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_hide_description', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_hide_breadcrumbs', array( 'default' => '1', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hide_breadcrumbs', array( 'label' => esc_html__( 'Hide Breadcrumbs', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_hide_breadcrumbs', 'type' => 'checkbox', ) ) ); $wp_customize->add_setting( 'bands_hide_footer', array( 'default' => '', 'sanitize_callback' => 'bands_sanitize_checkbox' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'hide_footer', array( 'label' => esc_html__( 'Hide Footer', 'bands' ), 'section' => 'bands_options', 'settings' => 'bands_hide_footer', 'type' => 'checkbox', ) ) ); $wp_customize->add_section( 'bands_fonts', array( 'title' => esc_html__( 'Fonts', 'bands' ), 'priority' => 25 ) ); $wp_customize->add_setting( 'bands_header_font', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'header_font', array( 'label' => esc_html__( 'Headers Font', 'bands' ), 'description' => esc_html__( 'Google Fonts allowed here too.', 'bands' ), 'section' => 'bands_fonts', 'settings' => 'bands_header_font' ) ) ); $wp_customize->add_setting( 'bands_content_font', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'content_font', array( 'label' => esc_html__( 'Content Font', 'bands' ), 'description' => esc_html__( 'Google Fonts allowed here too.', 'bands' ), 'section' => 'bands_fonts', 'settings' => 'bands_content_font' ) ) ); $wp_customize->add_setting( 'bands_accent_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'accent_color', array( 'label' => esc_html__( 'Accent Color', 'bands' ), 'section' => 'colors', 'settings' => 'bands_accent_color', 'priority' => 0 ) ) ); $wp_customize->add_setting( 'bands_header_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_color', array( 'label' => esc_html__( 'Headers Color', 'bands' ), 'section' => 'colors', 'settings' => 'bands_header_color', 'priority' => 1 ) ) ); $wp_customize->add_setting( 'bands_content_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'content_color', array( 'label' => esc_html__( 'Content Color', 'bands' ), 'section' => 'colors', 'settings' => 'bands_content_color', 'priority' => 2 ) ) ); $wp_customize->add_setting( 'bands_link_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage' ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'link_color', array( 'label' => esc_html__( 'Link Color', 'bands' ), 'section' => 'colors', 'settings' => 'bands_link_color', 'priority' => 3 ) ) ); } function bands_sanitize_checkbox( $input ) { if ( $input === true || $input === '1' ) { return '1'; } return ''; } add_action( 'wp_head', 'bands_customizer_css' ); function bands_customizer_css() { ?>