choices ) )
return; ?>
label ) ) : ?>
label ); ?>
description ) ) : ?>
description ); ?>
value() ) ? explode( ',', $this->value() ) : $this->value(); ?>
link(); ?> value="" />
add_section( 'array_sharing_customizer_panel', array(
'title' => __( 'Sharing Icons', 'array-toolkit' ),
'priority' => 500
) );
$wp_customize->add_setting( 'array_social_icon_choices',
array(
'sanitize_callback' => 'array_sanitize_checkboxes'
)
);
$wp_customize->add_control(
new Array_Customize_Control_Checkbox_Multiple(
$wp_customize, 'array_social_icon_choices',
array(
'section' => 'array_sharing_customizer_panel',
'label' => esc_html__( 'Sharing Icons', 'array-toolkit' ),
'description' => esc_html__( 'Choose the post sharing icons you would like use in your theme. See theme docs for output location.', 'array-toolkit' ),
'choices' => array(
'facebook' => esc_html__( 'Facebook', 'array-toolkit' ),
'twitter' => esc_html__( 'Twitter', 'array-toolkit' ),
'google' => esc_html__( 'Google', 'array-toolkit' ),
'linkedin' => esc_html__( 'LinkedIn', 'array-toolkit' ),
'pinterest' => esc_html__( 'Pinterest', 'array-toolkit' ),
'reddit' => esc_html__( 'Reddit', 'array-toolkit' ),
'email' => esc_html__( 'Email', 'array-toolkit' )
)
)
)
);
$wp_customize->selective_refresh->add_partial( 'array_social_icon_choices', array(
'selector' => '.array-share-links',
'container_inclusive' => false,
'render_callback' => function() {
return get_theme_mod( 'array_social_icon_choices' );
},
) );
}
add_action( 'customize_register', 'array_social_customize_register' );
// Add sharing script to the footer
function array_social_icon_footer_script() { ?>