Hi Fred! You can do this by using the plugin’s link markup filter. Here’s an example:
add_filter( 'scriptlesssocialsharing_link_markup', 'prefix_modify_scriptless_button', 10, 2 );
/**
* Modify the link output for Scriptless Social Sharing buttons.
*
* @param $output
* @param $button
*
* @return string
*/
function prefix_modify_scriptless_button( $output, $button ) {
$target = 'email' === $button['name'] ? '' : ' target="_blank"';
return sprintf( '<a class="button %s %s"%s href="%s" rel="noopener" %s><span class="sss-name">%s</span></a>',
esc_attr( $button['name'] ),
esc_attr( 'my-custom-class' ), // this is where you would put your custom class.
$target,
esc_url( $button['url'] ),
$button['data'],
$button['label']
);
}
Basically this is an exact copy of the plugin’s original button markup function, but with an extra line/class added in ('my-custom-class'
). Hope this helps you get started.