-
-
Save billerickson/ed5af4d66f823e59d4eceb8a13471134 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Shared Counts - Add username to twitter share | |
* | |
* @see https://www.billerickson.net/code/shared-counts-twitter-username | |
* @author Bill Erickson | |
* | |
* @param array $link | |
* @return array | |
*/ | |
function be_shared_counts_twitter_username( $link ) { | |
if( 'twitter' == $link['type'] ) { | |
$link['link'] .= '&via=billerickson'; | |
} | |
return $link; | |
} | |
add_filter( 'shared_counts_link', 'be_shared_counts_twitter_username' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment