add_section( 'social_section', # Section ID to use in Option Table array( # Arguments array 'title' => __( 'Social Networks', 'basic-starter' ), # Translatable text, change the text domain to your own 'description' => __( 'Add social network links for this site', 'basic-starter' ) ) ); // branding section - general $wp_customize->add_section( 'branding_general_section', # Section ID to use in Option Table array( # Arguments array 'title' => __( 'General Colours', 'basic-starter' ), # Translatable text, change the text domain to your own 'description' => __( 'Main colours used on the website', 'basic-starter' ) ) ); // branding section - typeography $wp_customize->add_section( 'branding_typography_section', # Section ID to use in Option Table array( # Arguments array 'title' => __( 'Typography', 'basic-starter' ), # Translatable text, change the text domain to your own 'description' => __( 'Main colours used on the website', 'basic-starter' ) ) ); // branding section - typeography $wp_customize->add_section( 'branding_navigation_section', # Section ID to use in Option Table array( # Arguments array 'title' => __( 'Navigation Colours', 'basic-starter' ), # Translatable text, change the text domain to your own 'description' => __( 'Colour scheme for navigation elements', 'basic-starter' ) ) ); // TYPOGRAPHY // text color $wp_customize->add_setting( 'text_color' , array( 'default' => '#444', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'text_color', array( 'label' => __( 'Text Color', 'basic-starter' ), 'section' => 'branding_typography_section', ) ) ); $wp_customize->get_setting( 'text_color' )->transport = 'postMessage'; // text primary color $wp_customize->add_setting( 'text_primary_color' , array( 'default' => '#2d7091', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'text_primary_color', array( 'label' => __( 'Text Primary Color', 'basic-starter' ), 'section' => 'branding_typography_section', ) ) ); $wp_customize->get_setting( 'text_primary_color' )->transport = 'postMessage'; // text muted colour $wp_customize->add_setting( 'text_muted_color' , array( 'default' => '#999', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'text_muted_color', array( 'label' => __( 'Text Muted Color', 'basic-starter' ), 'section' => 'branding_typography_section', ) ) ); $wp_customize->get_setting( 'text_muted_color' )->transport = 'postMessage'; // text link colour $wp_customize->add_setting( 'textlink_color' , array( 'default' => '#07d', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'textlink_color', array( 'label' => __( 'Text Link Color', 'basic-starter' ), 'section' => 'branding_typography_section', ) ) ); $wp_customize->get_setting( 'textlink_color' )->transport = 'postMessage'; // text link hover colour $wp_customize->add_setting( 'textlink_color_hover' , array( 'default' => '#059', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'textlink_color_hover', array( 'label' => __( 'Text Link Hover Color', 'basic-starter' ), 'section' => 'branding_typography_section', ) ) ); $wp_customize->get_setting( 'textlink_color_hover' )->transport = 'postMessage'; // GENERAL // background color $wp_customize->add_setting( 'bgd_color' , array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'bgd_color', array( 'label' => __( 'Background Color', 'basic-starter' ), 'section' => 'branding_general_section', ) ) ); $wp_customize->get_setting( 'bgd_color' )->transport = 'postMessage'; // box bgd $wp_customize->add_setting( 'box_bgd' , array( 'default' => '#f5f5f5', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'box_bgd', array( 'label' => __( 'Box Background', 'basic-starter' ), 'section' => 'branding_general_section', ) ) ); $wp_customize->get_setting( 'box_bgd' )->transport = 'postMessage'; // box primary text $wp_customize->add_setting( 'box_txt' , array( 'default' => '#444', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'box_txt', array( 'label' => __( 'Box Text', 'basic-starter' ), 'section' => 'branding_general_section', ) ) ); $wp_customize->get_setting( 'box_txt' )->transport = 'postMessage'; // box primary title $wp_customize->add_setting( 'box_title' , array( 'default' => '#444', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'box_title', array( 'label' => __( 'Box Title', 'basic-starter' ), 'section' => 'branding_general_section', ) ) ); $wp_customize->get_setting( 'box_title' )->transport = 'postMessage'; // box primary bgd $wp_customize->add_setting( 'box_primary_bgd' , array( 'default' => '#ebf7fd', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'box_primary_bgd', array( 'label' => __( 'Box Primary Background', 'basic-starter' ), 'section' => 'branding_general_section', ) ) ); // box primary text $wp_customize->add_setting( 'box_primary_txt' , array( 'default' => '#2d7091', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'box_primary_txt', array( 'label' => __( 'Box Primary Text', 'basic-starter' ), 'section' => 'branding_general_section', ) ) ); // box primary title $wp_customize->add_setting( 'box_primary_title' , array( 'default' => '#2d7091', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'box_primary_title', array( 'label' => __( 'Box Primary Title', 'basic-starter' ), 'section' => 'branding_general_section', ) ) ); // NAVIGATION // button background $wp_customize->add_setting( 'button_bgd' , array( 'default' => '#eee', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'button_bgd', array( 'label' => __( 'Button Background', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // button background hover $wp_customize->add_setting( 'button_bgd_hover' , array( 'default' => '#f5f5f5', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'button_bgd_hover', array( 'label' => __( 'Button Background Hover', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // primary button background $wp_customize->add_setting( 'primary_button_bgd' , array( 'default' => '#00a8e6', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_button_bgd', array( 'label' => __( 'Primary Button Background', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // primary button background hover $wp_customize->add_setting( 'primary_button_bgd_hover' , array( 'default' => '#35b3ee', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_button_bgd_hover', array( 'label' => __( 'Primary Button Background Hover', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // icon button background $wp_customize->add_setting( 'icon_button_bgd' , array( 'default' => '#eee', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'icon_button_bgd', array( 'label' => __( 'Icon Button Background', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // icon button background hover $wp_customize->add_setting( 'icon_button_bgd_hover' , array( 'default' => '#f5f5f5', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'icon_button_bgd_hover', array( 'label' => __( 'Icon Button Background Hover', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // navbar background color $wp_customize->add_setting( 'navbar_bgd' , array( 'default' => '#eee', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navbar_bgd', array( 'label' => __( 'Navbar Background', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // navbar hover color $wp_customize->add_setting( 'navbar_bgd_hover' , array( 'default' => '#ddd', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navbar_bgd_hover', array( 'label' => __( 'Navbar Background Hover', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // navbar background active $wp_customize->add_setting( 'navbar_bgd_active' , array( 'default' => '#f5f5f5', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navbar_bgd_active', array( 'label' => __( 'Navbar Background Active', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // navbar dropdown $wp_customize->add_setting( 'navbar_bgd_dropdown' , array( 'default' => '#f5f5f5', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'navbar_bgd_dropdown', array( 'label' => __( 'Navbar Background Dropdown', 'basic-starter' ), 'section' => 'branding_navigation_section', ) ) ); // social networks $socialnetworks = bst_social_array(); foreach($socialnetworks as $socialitem) { $wp_customize->add_setting('social_'.$socialitem, array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('social_'.$socialitem, array( 'label' => $socialitem, 'section' => 'social_section', 'type' => 'text', )); } }