jaredatch / Shared-Counts

WordPress plugin that leverages SharedCount.com API to quickly retrieve, cache, and display various social sharing counts.
GNU General Public License v2.0
48 stars 16 forks source link

Add share type parameter to shared_counts_link_url filter #106

Closed ozzyrod closed 4 years ago

ozzyrod commented 4 years ago

Adding a second parameter to the shared_counts_link_url filter.

Description

Adding a second parameter to the filter allows users to check for the type of share, and change the share link accordingly. Solves issue #105

Testing procedure

  1. In a development environment, used the shared_counts_link_url filter as it currently stands
  2. Added a second parameter to the shared_counts_link_url filter
  3. Checks that using the filter as it currently constructed still works
  4. Added 2 as the $acceptable_args when calling the shared_counts_link_url filter.
  5. Able to test against the parameter passed in

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue) [x] Enhancement (modification of the currently available functionality) [ ] New feature (non-breaking change which adds functionality) [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] My code follows the code style of this project (WordPress coding standards, etc). [x] My code has appropriate phpdoc comments with a description, @since, @params and @return. [x] My code is tested for both new installs and for users that are upgrading from older versions.