jaredatch/EA-Share-Count

Add new filter for the link URL

Closed this issue · 2 comments

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!

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