Skip to content

Commit

Permalink
Merge pull request facebookarchive#208 from colmdoyle/revert_fatal
Browse files Browse the repository at this point in the history
revert 5317f9d
  • Loading branch information
Colm Doyle committed Aug 2, 2012
2 parents 078918b + fa8b8ca commit decb261
Showing 1 changed file with 13 additions and 21 deletions.
34 changes: 13 additions & 21 deletions social-plugins/fb-comments.php
Expand Up @@ -101,27 +101,19 @@ function fb_get_fb_comments_seo() {


if ( ! isset( $comments[$url] ) ) if ( ! isset( $comments[$url] ) )
return ''; return '';


$output = '<noscript><ol class="commentlist">'; $output = '<noscript><ol class="commentlist">';
foreach ($comments[$url]['comments']['data'] as $key => $comment_info) {
$unix_timestamp = strtotime($comment_info['created_time']); foreach ($comments[$url]['comments']['data'] as $key => $comment_info) {
$output .= '<li id="' . esc_attr( 'comment-' . $key ) . '"> $unix_timestamp = strtotime($comment_info['created_time']);
<p><a href="' . esc_url( 'http://www.facebook.com/' . $comment_info['from']['id'], array( 'http', 'https' ) ) . '">' . esc_html( $comment_info['from']['name'] ) . '</a>:</p> $output .= '<li id="' . esc_attr( 'comment-' . $key ) . '">
<p class="metadata">' . date('F jS, Y', $unix_timestamp) . ' at ' . date('g:i a', $unix_timestamp) . '</p> <p><a href="' . esc_url( 'http://www.facebook.com/' . $comment_info['from']['id'], array( 'http', 'https' ) ) . '">' . esc_html( $comment_info['from']['name'] ) . '</a>:</p>
' . $comment_info['message'] . ' <p class="metadata">' . date('F jS, Y', $unix_timestamp) . ' at ' . date('g:i a', $unix_timestamp) . '</p>
</li>'; ' . $comment_info['message'] . '
if ($comment_info['comments'] && $comment_info['comments']['data']) { </li>';
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 ) . '"> $output .= '</ol></noscript>';
<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; return $output;
Expand Down

0 comments on commit decb261

Please sign in to comment.