| 641 | | $comments = array_slice( (array) $comments, 0, $number ); |
| 642 | | ?> |
| 643 | | <?php echo $before_widget; ?> |
| 644 | | <?php if ( $title ) echo $before_title . $title . $after_title; ?> |
| 645 | | <ul id="recentcomments"><?php |
| 646 | | if ( $comments ) : foreach ( (array) $comments as $comment) : |
| 647 | | echo '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>'; |
| 648 | | endforeach; endif;?></ul> |
| 649 | | <?php echo $after_widget; ?> |
| 650 | | <?php |
| | 638 | echo $before_widget; |
| | 639 | if ( $title ) |
| | 640 | echo $before_title . $title . $after_title; |
| | 641 | |
| | 642 | echo '<ul id="recentcomments">'; |
| | 643 | if ( $comments ) { |
| | 644 | foreach ( (array) $comments as $comment) { |
| | 645 | echo '<li class="recentcomments">' . /* translators: comments widget: 1: comment author, 2: post link */ sprintf(_x('%1$s on %2$s', 'widgets'), get_comment_author_link(), '<a href="' . esc_url( get_comment_link($comment->comment_ID) ) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>'; |
| | 646 | } |
| | 647 | } |
| | 648 | echo '</ul>'; |
| | 649 | echo $after_widget; |