Skip to content

Instantly share code, notes, and snippets.

@billerickson
Last active November 12, 2017 20:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/969f8ef0e980fe6e6345 to your computer and use it in GitHub Desktop.
Save billerickson/969f8ef0e980fe6e6345 to your computer and use it in GitHub Desktop.
<?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