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/popular_posts_block_theme.php

    r158 r262  
    4444                 
    4545        $select = "SELECT $view_tb.post_views, $post_tb.ID, $post_tb.post_title, $post_tb.post_date";                            
    46  
     46        if ($wp_db_version >= 6124){ 
    4747                $from  = " FROM ((("; 
    4848                $from .= " $post_tb LEFT JOIN $view_tb ON $post_tb.ID = $view_tb.post_id)"; 
     
    6666                                $where .= " AND ($term_taxonomy.term_id IN ($tag_id_list))"; 
    6767                } 
     68        } else { 
     69                $from  = " FROM (("; 
     70                $from .= " $post_tb LEFT JOIN $view_tb ON $post_tb.ID = $view_tb.post_id)"; 
     71                $from .= " LEFT JOIN $post2cat_tb ON $post_tb.ID = $post2cat_tb.post_id)"; 
     72                $from .= " INNER JOIN $user_tb ON $post_tb.post_author = $user_tb.ID"; 
     73                 
     74                $where = " WHERE ($post_tb.post_status = 'publish') AND  (UNIX_TIMESTAMP($post_tb.post_date) <= UNIX_TIMESTAMP())" ; 
     75                 
     76                if ($cat_select) { 
     77                        $where .= " AND ($post2cat_tb.category_id IN ($cat_id))"; 
     78                } 
     79        } 
    6880                 
    6981 
     
    106118                        ob_end_clean();  
    107119                         
    108                         ob_start(); 
    109                                 the_tags(__('Tags:', 'kubrick') . ' ',' &bull; ',''); 
    110                                 $tags = ob_get_contents(); 
    111                         ob_end_clean(); 
     120                        if (function_exists('the_tags')){ 
     121                                ob_start(); 
     122                                        the_tags(__('Tags:', 'xpress') . ' ',' &bull; ',''); 
     123                                        $tags = ob_get_contents(); 
     124                                ob_end_clean();  
     125                        } else { 
     126                                $tags = ''; 
     127                        } 
    112128                         
    113129                        ob_start(); 
     
    115131                                $post_modified_date = ob_get_contents(); 
    116132                        ob_end_clean(); 
    117                          
     133                                 
    118134                        ob_start(); 
    119135                                the_modified_date($time_format); 
Note: See TracChangeset for help on using the changeset viewer.