Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function woo_tabs_comments( $posts = 5, $size = 35 ) {
- global $wpdb;
- $comments = get_comments( array( 'number' => $posts, 'status' => 'approve' ) );
- if ( $comments ) {
- foreach ( (array) $comments as $comment) {
- $post = get_post( $comment->comment_post_ID );
- ?>
- <li class="recentcomments">
- <?php echo get_avatar( $comment, $size ); ?>
- <a href="<?php echo get_comment_link($comment->comment_ID); ?>" title="<?php echo wp_filter_nohtml_kses($comment->comment_author); ?> <?php _e( 'on', 'woothemes' ); ?> <?php echo $post->post_title; ?>"><?php echo wp_filter_nohtml_kses($comment->comment_author); ?> - <?php echo get_permalink($comment->comment_post_ID); ?> - <?php echo date( 'Y/m/d', strtotime($comment->comment_date) ); ?> - <?php echo stripslashes( substr( wp_filter_nohtml_kses( $comment->comment_content ), 0, 20 ) ); ?>...</a>
- <div class="fix"></div>
- </li>
- <?php
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment