Changeset 9522 for trunk/wp-includes/widgets.php
- Timestamp:
- 11/05/2008 07:09:20 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/widgets.php
r9506 r9522 1388 1388 1389 1389 if ( !$comments = wp_cache_get( 'recent_comments', 'widget' ) ) { 1390 $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_IDFROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT $number");1390 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT $number"); 1391 1391 wp_cache_add( 'recent_comments', $comments, 'widget' ); 1392 1392 } … … 1397 1397 <ul id="recentcomments"><?php 1398 1398 if ( $comments ) : foreach ( (array) $comments as $comment) : 1399 echo '<li class="recentcomments">' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_ permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID. '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>';1399 echo '<li class="recentcomments">' . sprintf(__('%1$s on %2$s'), get_comment_author_link(), '<a href="'. get_comment_link($comment->comment_ID) . '">' . get_the_title($comment->comment_post_ID) . '</a>') . '</li>'; 1400 1400 endforeach; endif;?></ul> 1401 1401 <?php echo $after_widget; ?>
Note: See TracChangeset
for help on using the changeset viewer.