-
-
Save billerickson/969f8ef0e980fe6e6345 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 | |
/** | |
* Add Reddit to Admin Services | |
* | |
*/ | |
function be_sharedcount_reddit_admin_services( $services ) { | |
$services['reddit'] = 'Reddit'; | |
return $services; | |
} | |
add_filter( 'ea_share_count_admin_services', 'be_sharedcount_reddit_admin_services' ); | |
/** | |
* Add Reddit Link Information | |
* | |
*/ | |
function be_sharedcount_reddit_link_information( $link ) { | |
if( 'reddit' == $link['type'] ) { | |
$link['link'] = '//www.reddit.com/submit?url=' . $link['url']; | |
$link['target'] = '_blank'; | |
$link['icon'] = 'fa fa-reddit'; | |
} | |
return $link; | |
} | |
add_filter( 'ea_share_count_link', 'be_sharedcount_reddit_link_information' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment