add_section( 'gum_theme', array( 'title' => __( 'Theme Options', 'bloom-feminine' ), 'description' => __( 'This is a settings section.', 'bloom-feminine' ), 'priority' => 35, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'theme_color_setting', array( 'default' => '#ff9ca9', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'theme_color_setting', array( 'label' => __( 'Theme Color Scheme', 'bloom-feminine' ), 'section' => 'colors', 'settings' =>'theme_color_setting', ) ) ); $wp_customize->add_setting( 'theme_cat_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'theme_cat_color', array( 'label' => __('Category text', 'bloom-feminine' ), 'section' => 'colors', 'settings' => 'theme_cat_color', ) ) ); $wp_customize->add_setting( 'logo-upload' , array( 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options', 'default' => '', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo-upload', array( 'label' => __('Logo Upload', 'bloom-feminine' ), 'section' => 'gum_theme', 'settings' => 'logo-upload', ) ) ); /********** Social Media links **********/ $wp_customize->add_setting( 'facebook_link', array( 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options', 'default' => '', ) ); $wp_customize->add_control( 'facebook_link', array( 'label' => __('Facebook Link', 'bloom-feminine' ), 'section' => 'gum_theme', 'type' => 'url', ) ); $wp_customize->add_setting( 'twitter_link', array( 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options', 'default' => '', ) ); $wp_customize->add_control( 'twitter_link', array( 'label' => __('Twitter Link', 'bloom-feminine' ), 'section' => 'gum_theme', 'type' => 'url', ) ); $wp_customize->add_setting( 'pinterest_link', array( 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options', 'default' => '', ) ); $wp_customize->add_control( 'pinterest_link', array( 'label' => __('Pinterest Link', 'bloom-feminine' ), 'section' => 'gum_theme', 'type' => 'url', ) ); $wp_customize->add_setting( 'youtube_link', array( 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options', 'default' => '', ) ); $wp_customize->add_control( 'youtube_link', array( 'label' => __('Youtube Link', 'bloom-feminine' ), 'section' => 'gum_theme', 'type' => 'url', ) ); $wp_customize->add_setting( 'linkedin_link', array( 'sanitize_callback' => 'esc_url_raw', 'capability' => 'edit_theme_options', 'default' => '', ) ); $wp_customize->add_control( 'linkedin_link', array( 'label' => __('Linkedin Link', 'bloom-feminine' ), 'section' => 'gum_theme', 'type' => 'url', ) ); /**** Footer Copyright ****/ $wp_customize->add_setting( 'copyright_textbox', array( 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', 'default' => '© 2020', ) ); $wp_customize->add_control( 'copyright_textbox', array( 'label' => __('Copyright text', 'bloom-feminine' ), 'section' => 'gum_theme', 'type' => 'text', ) ); $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->remove_control('header_textcolor'); $wp_customize->remove_section('header_image'); } add_action( 'customize_register', 'gumt_bloom_theme_customizer' ); add_action( 'wp_head', 'Theme_styles' ); function Theme_styles() { $theme_color = esc_attr(get_theme_mod("theme_color_setting")); $theme_cat_color = esc_attr(get_theme_mod("theme_cat_color")); ?>