XPressME Integration Kit

Trac


Ignore:
Timestamp:
Jun 8, 2009, 5:55:59 PM (15 years ago)
Author:
toemon
Message:

#137 WordPressME2.0.11への対応(ブロックの対応)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_comments_block_theme.php

    r142 r262  
    4646                $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 "; 
    4747                $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                } 
    4953                $comment_sql .= "ORDER BY comment_date_gmt DESC LIMIT $disp_count"; 
    50  
    5154                $comments = $wpdb->get_results($comment_sql); 
    5255                 
Note: See TracChangeset for help on using the changeset viewer.