Skip to content
Browse files

Merge pull request #208 from colmdoyle/revert_fatal

revert 5317f9d
  • Loading branch information...
2 parents 078918b + fa8b8ca commit decb261491f40133e4c680a65e35340f999b8bf8 Colm Doyle committed Aug 2, 2012
Showing with 13 additions and 21 deletions.
  1. +13 −21 social-plugins/fb-comments.php
View
34 social-plugins/fb-comments.php
@@ -101,27 +101,19 @@ function fb_get_fb_comments_seo() {
if ( ! isset( $comments[$url] ) )
return '';
-
- $output = '<noscript><ol class="commentlist">';
- foreach ($comments[$url]['comments']['data'] as $key => $comment_info) {
- $unix_timestamp = strtotime($comment_info['created_time']);
- $output .= '<li id="' . esc_attr( 'comment-' . $key ) . '">
- <p><a href="' . esc_url( 'http://www.facebook.com/' . $comment_info['from']['id'], array( 'http', 'https' ) ) . '">' . esc_html( $comment_info['from']['name'] ) . '</a>:</p>
- <p class="metadata">' . date('F jS, Y', $unix_timestamp) . ' at ' . date('g:i a', $unix_timestamp) . '</p>
- ' . $comment_info['message'] . '
- </li>';
- if ($comment_info['comments'] && $comment_info['comments']['data']) {
- foreach ($comment_info['comments']['data'] as $second_key => $comment_info) {
- $unix_timestamp = strtotime($comment_info['created_time']);
- $output .= '<li id="' . esc_attr( 'comment-' . $key . '-' . $second_key ) . '">
- <p><a href="' . esc_url( 'http://www.facebook.com/' . $comment_info['from']['id'], array( 'http', 'https' ) ) . '">' . esc_html( $comment_info['from']['name'] ) . '</a>:</p>
- <p class="metadata">' . date('F jS, Y', $unix_timestamp) . ' at ' . date('g:i a', $unix_timestamp) . '</p>
- ' . $comment_info['message'] . '
- </li>';
- }
- }
- }
- $output .= '</ol></noscript>';
+
+ $output = '<noscript><ol class="commentlist">';
+
+ foreach ($comments[$url]['comments']['data'] as $key => $comment_info) {
+ $unix_timestamp = strtotime($comment_info['created_time']);
+ $output .= '<li id="' . esc_attr( 'comment-' . $key ) . '">
+ <p><a href="' . esc_url( 'http://www.facebook.com/' . $comment_info['from']['id'], array( 'http', 'https' ) ) . '">' . esc_html( $comment_info['from']['name'] ) . '</a>:</p>
+ <p class="metadata">' . date('F jS, Y', $unix_timestamp) . ' at ' . date('g:i a', $unix_timestamp) . '</p>
+ ' . $comment_info['message'] . '
+ </li>';
+ }
+
+ $output .= '</ol></noscript>';
}
return $output;

0 comments on commit decb261

Please sign in to comment.
Something went wrong with that request. Please try again.