add_section( 'social_media_settings', array( 'title' => __( 'Social Media Settings', 'blossom-floral-pro' ), 'priority' => 35, 'panel' => 'general_settings', ) ); /** Enable Social Links */ $wp_customize->add_setting( 'ed_social_links', array( 'default' => true, 'sanitize_callback' => 'blossom_floral_pro_sanitize_checkbox' ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Toggle_Control( $wp_customize, 'ed_social_links', array( 'section' => 'social_media_settings', 'label' => __( 'Enable Social Links', 'blossom-floral-pro' ), 'description' => __( 'Enable to show social links at header.', 'blossom-floral-pro' ), ) ) ); $wp_customize->add_setting( new Blossom_Floral_Pro_Repeater_Setting( $wp_customize, 'social_links', array( 'default' => array( array( 'font' => 'fab fa-facebook-f', 'link' => 'https://www.facebook.com/', ), array( 'font' => 'fab fa-twitter', 'link' => 'https://twitter.com/', ), array( 'font' => 'fab fa-youtube', 'link' => 'https://www.youtube.com/', ), array( 'font' => 'fab fa-instagram', 'link' => 'https://www.instagram.com/', ), array( 'font' => 'fab fa-pinterest', 'link' => 'https://www.pinterest.com/', ) ), 'sanitize_callback' => array( 'Blossom_Floral_Pro_Repeater_Setting', 'sanitize_repeater_setting' ), ) ) ); $wp_customize->add_control( new Blossom_Floral_Pro_Control_Repeater( $wp_customize, 'social_links', array( 'section' => 'social_media_settings', 'label' => __( 'Social Links', 'blossom-floral-pro' ), 'fields' => array( 'font' => array( 'type' => 'font', 'label' => __( 'Font Awesome Icon', 'blossom-floral-pro' ), 'description' => __( 'Example: fab fa-facebook-f', 'blossom-floral-pro' ), ), 'link' => array( 'type' => 'url', 'label' => __( 'Link', 'blossom-floral-pro' ), 'description' => __( 'Example: https://facebook.com', 'blossom-floral-pro' ), ) ), 'row_label' => array( 'type' => 'field', 'value' => __( 'links', 'blossom-floral-pro' ), 'field' => 'link' ) ) ) ); /** Social Media Settings Ends */ } add_action( 'customize_register', 'blossom_floral_pro_customize_register_general_social' );