add_panel( 'billow_socials', array( 'priority' => 60, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Social Networks', 'billow' ), ) ); // SOCIAL LINKS $wp_customize->add_section( 'billow_social_links' , array( 'priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Social Network Accounts', 'billow'), 'description' => __( 'Set your social network accounts here and then enable them where you want.', 'billow' ), 'panel' => 'billow_socials', ) ); //-- billow_social_ require 'social_media_names.php'; $billow_social_media_names = apply_filters('billow_social_media_names', $billow_social_media_names ); foreach( $billow_social_media_names as $value => $label ){ // phpcs:ignore WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound $wp_customize->add_setting( 'billow_social_' . $value, array( 'default' => '', 'sanitize_callback' => 'billow_text_sanitization', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'billow_social_' . $value, array( 'label' => $label, // phpcs:ignore WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedVariableFound 'section' => 'billow_social_links', 'type' => 'text' ) ); } // SOCIAL LINKS STYLES $wp_customize->add_section( 'billow_social_links_styles' , array( 'priority' => 20, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __('Social Network Styles', 'billow'), 'panel' => 'billow_socials', ) ); //-- billow_social_links_align $wp_customize->add_setting( 'billow_social_links_align', array( 'default' => 'align-center', 'sanitize_callback' => 'billow_text_sanitization', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new Billow_Text_Radio_Button_Custom_Control( $wp_customize, 'billow_social_links_align', array( 'label' => __( 'Horizontal Alignment', 'billow' ), 'section' => 'billow_social_links_styles', 'choices' => array( 'align-left' => __( 'Left', 'billow' ), 'align-center' => __( 'Center', 'billow' ), 'align-right' => __( 'Right', 'billow' ) ) ) ) ); //-- billow_social_links_size $wp_customize->add_setting( 'billow_social_links_size', array( 'default' => '', 'sanitize_callback' => 'billow_sanitize_css_unit', 'sanitize_js_callback' => 'billow_sanitize_js_css_unit', 'transport' => 'refresh', ) ); $wp_customize->add_control( 'billow_social_links_size', array( 'label' => __( 'Icons Size', 'billow' ), 'section' => 'billow_social_links_styles', 'type' => 'text', ) ); //-- billow_social_links_spacing $wp_customize->add_setting( 'billow_social_links_spacing', array( 'default' => '0.5rem', 'sanitize_callback' => 'billow_sanitize_css_unit', 'sanitize_js_callback' => 'billow_sanitize_js_css_unit', 'transport' => 'refresh', ) ); $wp_customize->add_control( new Billow_Customizer_CSS_Number_With_Units_Control( $wp_customize, 'billow_social_links_spacing', array( 'label' => __( 'Icons Spacing', 'billow' ), 'section' => 'billow_social_links_styles', 'type' => 'text' ) ) ); //-- billow_social_links_color $wp_customize->add_setting( 'billow_social_links_color', array( 'default' => 'blw-social-icon-custom', 'sanitize_callback' => 'billow_text_sanitization', 'transport' => 'refresh', ) ); $wp_customize->add_control( new Billow_Text_Radio_Button_Custom_Control( $wp_customize, 'billow_social_links_color', array( 'label' => __( 'Icons Color', 'billow' ), 'section' => 'billow_social_links_styles', 'choices' => array( 'blw-social-icon-custom' => __( 'Custom', 'billow' ), 'blw-social-icon-official' => __( 'Official', 'billow' ) ) ) ) ); //-- billow_social_links_color_custom $wp_customize->add_setting( 'billow_social_links_color_custom', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_social_links_color_custom', array( 'label' => __( 'Icons Color', 'billow' ), 'section' => 'billow_social_links_styles', ) ) ); //-- billow_social_links_hover_color_custom $wp_customize->add_setting( 'billow_social_links_hover_color_custom', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_social_links_hover_color_custom', array( 'label' => __( 'Hover Icons Color', 'billow' ), 'section' => 'billow_social_links_styles', ) ) ); //-- billow_social_links_shape $wp_customize->add_setting( 'billow_social_links_shape', array( 'default' => 'blw-social-icon-none', 'sanitize_callback' => 'billow_text_sanitization', 'transport' => 'refresh', ) ); $wp_customize->add_control( new Billow_Text_Radio_Button_Custom_Control( $wp_customize, 'billow_social_links_shape', array( 'label' => __( 'Icons Shape Type', 'billow' ), 'section' => 'billow_social_links_styles', 'choices' => array( 'blw-social-icon-none' => __( 'None', 'billow' ), 'blw-social-icon-rounded' => __( 'Rounded', 'billow' ), 'blw-social-icon-square' => __( 'Square', 'billow' ) ) ) ) ); //-- billow_social_links_rounded_bc_color $wp_customize->add_setting( 'billow_social_links_rounded_bc_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_social_links_rounded_bc_color', array( 'label' => __( 'Background Color', 'billow' ), 'section' => 'billow_social_links_styles', ) ) ); //-- billow_social_links_hover_rounded_bc_color $wp_customize->add_setting( 'billow_social_links_hover_rounded_bc_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_social_links_hover_rounded_bc_color', array( 'label' => __( 'Hover Background Color', 'billow' ), 'section' => 'billow_social_links_styles', ) ) ); //-- billow_social_linkbc_s_square_color $wp_customize->add_setting( 'billow_social_links_square_bc_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_social_links_square_bc_color', array( 'label' => __( 'Background Color', 'billow' ), 'section' => 'billow_social_links_styles', ) ) ); //-- billow_social_links_hover_square_bc_color $wp_customize->add_setting( 'billow_social_links_hover_square_bc_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color_no_hash', 'sanitize_js_callback' => 'maybe_hash_hex_color', 'transport' => 'refresh', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'billow_social_links_hover_square_bc_color', array( 'label' => __( 'Hover Background Color', 'billow' ), 'section' => 'billow_social_links_styles', ) ) ); //-- billow_social_links_display_visibility $wp_customize->add_control( 'billow_social_links_display_visibility', array( 'label' => __( 'Display Icons Label On', 'billow' ), 'section' => 'billow_social_links_styles', 'settings' => array(), 'type' => 'hidden' ) ); //-- billow_social_links_on_desktop $wp_customize->add_setting( 'billow_social_links_on_desktop', array( 'default' => 0, 'sanitize_callback' => 'billow_text_sanitization', ) ); $wp_customize->add_control( 'billow_social_links_on_desktop', array( 'label' => __( 'Desktop', 'billow' ), 'section' => 'billow_social_links_styles', 'type' => 'checkbox', ) ); //-- billow_social__links_ontablet $wp_customize->add_setting( 'billow_social_links_on_tablet', array( 'default' => 0, 'sanitize_callback' => 'billow_text_sanitization', ) ); $wp_customize->add_control( 'billow_social_links_on_tablet', array( 'label' => __( 'Tablet', 'billow' ), 'section' => 'billow_social_links_styles', 'type' => 'checkbox', ) ); //-- billow_social_links_on_mobile $wp_customize->add_setting( 'billow_social_links_on_mobile', array( 'default' => 0, 'sanitize_callback' => 'billow_text_sanitization', ) ); $wp_customize->add_control( 'billow_social_links_on_mobile', array( 'label' => __( 'Mobile', 'billow' ), 'section' => 'billow_social_links_styles', 'type' => 'checkbox', ) ); //-- billow_social_links_visibility $wp_customize->add_control( 'billow_social_links_visibility', array( 'label' => __( 'Enable Social Network', 'billow' ), 'section' => 'billow_social_links_styles', 'settings' => array(), 'type' => 'hidden' ) ); //-- billow_social_links_single_post_visibility $wp_customize->add_setting( 'billow_social_links_single_post_visibility', array( 'default' => 0, 'sanitize_callback' => 'billow_text_sanitization', ) ); $wp_customize->add_control( 'billow_social_links_single_post_visibility', array( 'label' => __( 'Single Post', 'billow' ), 'section' => 'billow_social_links_styles', 'type' => 'checkbox', ) ); //-- billow_social_links_author_box_visibility $wp_customize->add_setting( 'billow_social_links_author_box_visibility', array( 'default' => 0, 'sanitize_callback' => 'billow_text_sanitization', ) ); $wp_customize->add_control( 'billow_social_links_author_box_visibility', array( 'label' => __( 'Author Box', 'billow' ), 'section' => 'billow_social_links_styles', 'type' => 'checkbox', ) ); //-- billow_social_links_copyright_bar_visibility $wp_customize->add_setting( 'billow_social_links_copyright_bar_visibility', array( 'default' => 0, 'sanitize_callback' => 'billow_text_sanitization', ) ); $wp_customize->add_control( 'billow_social_links_copyright_bar_visibility', array( 'label' => __( 'Copyright Bar', 'billow' ), 'section' => 'billow_social_links_styles', 'type' => 'checkbox', ) );