Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use post global

  • Loading branch information...
commit 0ae0b8d4010363a821bffb624ce614fb840ea841 1 parent 6b452f7
@niallkennedy niallkennedy authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 social-plugins/class-facebook-comments.php
View
5 social-plugins/class-facebook-comments.php
@@ -100,8 +100,9 @@ public static function get_comments_number_filter( $count, $post_id = null ) {
* @return string passed output or XFBML string
*/
public static function comments_number_filter( $output, $number = null ) {
- $_post = get_post();
- if ( $_post && self::comments_enabled_for_post_type( $_post ) )
+ global $post;
+
+ if ( isset( $post ) && self::comments_enabled_for_post_type( $post ) )
return self::comments_count_xfbml();
return $output;
}
Please sign in to comment.
Something went wrong with that request. Please try again.