jaredatch/EA-Share-Count

Add filter for modifying wrapping class

Closed this issue · 3 comments

entr commented

Ideally this should be a filterable sprintf() format I think like:

$links = apply_filters( 'ea_share_count_display', $services, $location );
$wrap_format = apply_filters( 'ea_share_count_display_wrap_format', '<div class="ea-share-count-wrap %2$s">%1$s</div>', $location );
$output = sprintf( $wrap_format, $links, sanitize_html_class( $location ) );

And probably an extra filter on $output while we on the subject. I could send a PR if everyone is happy with that.

I'm cool with that... actually i originally thought I could make it work with ea_share_count_display as-is... but couldn't. I love the filters on the links themselves, but your solution would make it much more flexible. I'm trying to add flexbox support via https://github.com/JiveDig/flexington, but the same would apply for people using bootstrap or other. Good to go from here ;) Thanks.