-
-
Save billerickson/6c46e2a6e18110b2fa312ef6f94ee503 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 | |
/** | |
* Facebook for Comment Count | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/facebook-comments-in-wordpress | |
* | |
* @param int $count | |
* @param int $post_id | |
* @return int $count | |
*/ | |
function ea_facebook_for_comment_count( $count, $post_id ) { | |
if( ! function_exists( 'ea_share' ) ) | |
return $count; | |
return ea_share()->core->count( $post_id, 'facebook_comments' ); | |
} | |
add_filter( 'get_comments_number', 'ea_facebook_for_comment_count', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment