add_section( 'socialIconsSection' , array( 'title' => __( 'Social Icons', 'astrology' ), 'priority' => 30, ) ); // Social Account 1 $wp_customize->add_setting( 'socialIcon1' , array( 'default' => 'fa-facebook', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'socialIcon1', array( 'label' => __( 'Enter Social Icon 1', 'astrology' ), 'section' => 'socialIconsSection', ) ); $wp_customize->add_setting( 'socialLink1' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'socialLink1', array( 'label' => __( 'Enter Link 1', 'astrology' ), 'section' => 'socialIconsSection', ) ); // Social Account 2 $wp_customize->add_setting( 'socialIcon2' , array( 'default' => 'fa-twitter', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'socialIcon2', array( 'label' => __( 'Enter Social Icon 2', 'astrology' ), 'section' => 'socialIconsSection', ) ); $wp_customize->add_setting( 'socialLink2' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'socialLink2', array( 'label' => __( 'Enter Link 2', 'astrology' ), 'section' => 'socialIconsSection', ) ); // Social Account 3 $wp_customize->add_setting( 'socialIcon3' , array( 'default' => 'fa-instagram', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'socialIcon3', array( 'label' => __( 'Enter Social Icon 2', 'astrology' ), 'section' => 'socialIconsSection', ) ); $wp_customize->add_setting( 'socialLink3' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'socialLink3', array( 'label' => __( 'Enter Link 3', 'astrology' ), 'section' => 'socialIconsSection', ) ); // Social Account 4 $wp_customize->add_setting( 'socialIcon4' , array( 'default' => 'fa-pinterest-p', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'socialIcon4', array( 'label' => __( 'Enter Social Icon 4', 'astrology' ), 'section' => 'socialIconsSection', ) ); $wp_customize->add_setting( 'socialLink4' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'socialLink4', array( 'label' => __( 'Enter Link 4', 'astrology' ), 'section' => 'socialIconsSection', ) ); // Social Account 5 $wp_customize->add_setting( 'socialIcon5' , array( 'default' => 'fa-skype', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( 'socialIcon5', array( 'label' => __( 'Enter Social Icon 5', 'astrology' ), 'section' => 'socialIconsSection', ) ); $wp_customize->add_setting( 'socialLink5' , array( 'transport' => 'refresh', 'sanitize_callback' => 'esc_url_raw' ) ); $wp_customize->add_control( 'socialLink5', array( 'label' => __( 'Enter Link 5', 'astrology' ), 'section' => 'socialIconsSection', ) ); $wp_customize->add_setting( 'astrologyColorSectionPrimaryColor', array( 'default' => '#ad2737', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'astrologyColorSectionPrimaryColor', array( 'label' => __('Theme Color','astrology'), 'section' => 'colors', 'settings' => 'astrologyColorSectionPrimaryColor', ) ) ); $wp_customize->add_setting( 'astrologyColorSectionSecondaryColor', array( 'default' => '#4d4d4d', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'astrologyColorSectionSecondaryColor', array( 'label' => __('Secondary Color','astrology'), 'section' => 'colors', 'settings' => 'astrologyColorSectionSecondaryColor', ) ) ); } add_action( 'customize_register', 'AstrologyCustomizeRegister' ); function AstrologyCustomCss(){ if(get_theme_mod('astrologyColorSectionPrimaryColor') == '') { $astrologyColorSectionPrimaryColor = '#ad2737'; } else { $astrologyColorSectionPrimaryColor = esc_attr(get_theme_mod('astrologyColorSectionPrimaryColor')); } if(get_theme_mod('astrologyColorSectionSecondaryColor') == '') { $astrologyColorSectionSecondaryColor = '#E1E1E1'; } else { $astrologyColorSectionSecondaryColor = esc_attr(get_theme_mod('astrologyColorSectionSecondaryColor')); } ?>