jaredatch / EA-Share-Count

A lean plugin that leverages SharedCount.com API to quickly retrieve, cache, and display various social sharing counts.
85 stars 13 forks source link

Option to hide 0 share counts #12

Closed jaredatch closed 9 years ago

jaredatch commented 9 years ago

I think we should add the option that when a service has no shares (meaning the count is 0) that the share count doesn't display.

So essentially a way to toggle: $output .= '<span class="ea-share-count">' . $link['count'] . '</span>';

This way the badges that have no share counts look more like a button (bubble is missing for 0s) and less like a badge with no sharing activity :)

billerickson commented 9 years ago

Why don't we just hide 0 counts altogether? There's no benefit to showing it hasn't been shared before. Sort of like how Genesis displays "Leave a Comment" instead of "O Comments"

jaredatch commented 9 years ago

I don't think hiding by default is a bad idea, but I'd leave the option to still display 0 for no counts.

The reason is I've done sites where the share icons are stacked vertically (often in a floating bar left of the content) where we adjust them to all align nicely. In layouts such as this you usually want to display the bubble even if 0 to keep conformity with the other buttons above/below.