add_section( 'aces_topbar_social_section', array( 'title' => esc_html__( 'Social', 'aces' ), 'priority' => 10, 'panel' => $panel, 'active_callback' => 'aces_topbar_enable', ) ); $wp_customize->add_setting( 'aces_topbar_social_icon_color', array( 'transport' => 'postMessage', 'default' => '#969696', 'sanitize_callback' => 'aces_sanitize_color', ) ); $wp_customize->add_control( new Aces_Customizer_Color_Control( $wp_customize, 'aces_topbar_social_icon_color', array( 'label' => esc_html__( 'Icon Color', 'aces' ), 'section' => 'aces_topbar_social_section', 'settings' => 'aces_topbar_social_icon_color', 'priority' => 10, 'active_callback' => 'aces_topbar_enable', ) ) ); $wp_customize->add_setting( 'aces_topbar_social_icon_hover_color', array( 'transport' => 'postMessage', 'default' => '#262626', 'sanitize_callback' => 'aces_sanitize_color', ) ); $wp_customize->add_control( new Aces_Customizer_Color_Control( $wp_customize, 'aces_topbar_social_icon_hover_color', array( 'label' => esc_html__( 'Icon Hover: Color', 'aces' ), 'section' => 'aces_topbar_social_section', 'settings' => 'aces_topbar_social_icon_hover_color', 'priority' => 10, 'active_callback' => 'aces_topbar_enable', ) ) ); $wp_customize->add_setting( 'aces_topbar_social_border_color', array( 'transport' => 'postMessage', 'default' => '#ebebeb ', 'sanitize_callback' => 'aces_sanitize_color', ) ); $wp_customize->add_control( new Aces_Customizer_Color_Control( $wp_customize, 'aces_topbar_social_border_color', array( 'label' => esc_html__( 'Border Color', 'aces' ), 'section' => 'aces_topbar_social_section', 'settings' => 'aces_topbar_social_border_color', 'priority' => 10, 'active_callback' => 'aces_topbar_enable', ) ) ); /** * Top Bar Social Settings */ $social_options = aces_social_options(); foreach ( $social_options as $key => $val ) { if ( 'skype' == $key ) { $sanitize = 'wp_filter_nohtml_kses'; } else if ( 'email' == $key ) { $sanitize = 'sanitize_email'; } else { $sanitize = 'esc_url_raw'; } $wp_customize->add_setting( 'aces_top_bar_social_profiles[' . $key .']', array( 'sanitize_callback' => $sanitize, ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'aces_top_bar_social_profiles[' . $key .']', array( 'label' => esc_html( $val['label'] ), 'type' => 'text', 'section' => 'aces_topbar_social_section', 'settings' => 'aces_top_bar_social_profiles[' . $key .']', 'priority' => 10, 'active_callback' => 'aces_topbar_enable', ) ) ); }