Automattic/jetpack — pull request #1431 by clifgriffin (2014-12-16 18:45:25+00:00)
Title: Add various dev filters to Sharing_Source::get_link()

Howdy,

Recently had to make some modifications to output of the sharing buttons for a client, and found that the provided filters were a bit weak.

I've added a few that I feel provide as much versatility as possible without doing anything obnoxious.

The only unorthodox thing I'm doing here is passing all of the original arguments to each filter using `func_get_args()`. This is so that developers always have the full context. (I've verified this function is safe with PHP 5.2+)

However, a more complete implementation might need to include full and immediate filtering of all arguments, pre-output or manipulation. Something like:
`extract ( apply_filters('sharing_display_args', compact('url', 'text', 'title', 'query', 'id') ) );`

Which, I didn't include because I'm fairly certain `extract()` is not kosher even in this application :)

Please let me know if you'd prefer any adjustments, or if you have any thoughts on the above. I can add via a second pull request if desired.

Clif