Changeset 14924 for trunk/wp-includes/default-widgets.php
- Timestamp:
- 05/26/2010 02:42:15 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-widgets.php
r14849 r14924 625 625 function widget( $args, $instance ) { 626 626 global $comments, $comment; 627 627 628 628 $cache = wp_cache_get('widget_recent_comments', 'widget'); 629 629 630 630 if ( ! is_array( $cache ) ) 631 631 $cache = array(); 632 632 633 633 if ( isset( $cache[$args['widget_id']] ) ) { 634 634 echo $cache[$args['widget_id']]; … … 647 647 $comments = get_comments( array( 'number' => $number, 'status' => 'approve' ) ); 648 648 $output .= $before_widget; 649 if ( $title ) 649 if ( $title ) 650 650 $output .= $before_title . $title . $after_title; 651 651 652 652 $output .= '<ul id="recentcomments">'; 653 if ( $comments ) { 653 if ( $comments ) { 654 654 foreach ( (array) $comments as $comment) { 655 655 $output .= '<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>';
Note: See TracChangeset
for help on using the changeset viewer.