Changeset 262 for trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php
- Timestamp:
- Jun 8, 2009, 5:55:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php
r142 r262 46 46 $comment_sql = "SELECT comment_ID,comment_post_ID,comment_author,comment_author_email,comment_author_url,comment_content, comment_type,UNIX_TIMESTAMP(comment_date) as comment_unix_time "; 47 47 $comment_sql .= "FROM $wpdb->comments LEFT JOIN $wpdb->posts ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID "; 48 $comment_sql .= "WHERE comment_approved = '1' AND post_type = 'post' AND post_status = 'publish' $type_select "; 48 if (xpress_is_wp20()){ 49 $comment_sql .= "WHERE comment_approved = '1' AND post_status = 'publish' $type_select "; 50 } else { 51 $comment_sql .= "WHERE comment_approved = '1' AND post_type = 'post' AND post_status = 'publish' $type_select "; 52 } 49 53 $comment_sql .= "ORDER BY comment_date_gmt DESC LIMIT $disp_count"; 50 51 54 $comments = $wpdb->get_results($comment_sql); 52 55
Note: See TracChangeset
for help on using the changeset viewer.