(1389 . 7)(1389 . 7)
26 $number = 15;
27
28 if ( !$comments = wp_cache_get( 'recent_comments', 'widget' ) ) {
29 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT $number");
30 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_approved = '1' and comment_type = '' ORDER BY comment_date_gmt DESC LIMIT $number");
31 wp_cache_add( 'recent_comments', $comments, 'widget' );
32 }
33 ?>