jaredatch / EA-Share-Count

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

Add new filter for the link URL #80

Closed amdrew closed 7 years ago

amdrew commented 7 years ago

Hey Bill & Jared!

Would you be so kind as to consider adding a filter specifically for $link['url']?

I see the ea_share_count_link filter (https://github.com/jaredatch/EA-Share-Count/blob/master/includes/class-front.php#L502) but unfortunately that's a bit too late since $link['link'] is passed to the anchor link.

I'd like to integrate your plugin withan add-on for AffiliateWP (https://affiliatewp.com), allowing affiliates (when logged in) to share the post/page/etc URL and have their referral ID/username automatically appended to the shared URL. So instead of:

http://mysite.com/my-awesome-post/

The URL could be

http://mysite.com/my-awesome-post/ref/123/ (where 123 is their affiliate ID)

I'll submit a PR in just a few to provide a possible implementation to discuss. Thanks!

amdrew commented 7 years ago

There's probably a cleaner way but something like that ^

amdrew commented 7 years ago

Thanks @billerickson