Closed ozzyrod closed 4 years ago
Is there any additional data in the $link
array that might be useful when customizing the link URL? What if we passed the entire $link
in the filter rather than just $link['type']
? That would achieve the same goal but also provide additional information.
I can't think of a use case, but access to additional data is always nice, even if they might be edge cases. I thought about trying to do that, but I was concerned about creating a breaking change in the plugin and decided against going that route.
Let me know how y'all would like to handle it. I can always update the PR accordingly if you'd like.
If you can update the PR to use $link
instead of $link['type']
, I'll merge it in.
Thanks
No problem and thank you!
It's been updated in PR #106
It's now merged, thank you!
It would be nice to update the shared link URL based on the share type. This would allow users to add social network specific parameters. For example, users may want to have different utm parameters for Facebook and Twitter depending on the campaign that they're running.
Plugin Version
1.3.0
Current Behavior
Currently, the filters only allows one parameter. This doesn't allow the user to check which share type the link is for, at least not very easily.
Expected Behavior
By adding a second parameter,
$link['type'], to the
shared_counts_link_url` filter, a user could easily check if they'd like.Possible Solution
Add a second parameter to the
shared_counts_link_url
filter.