XPressME Integration Kit

Trac


Ignore:
Timestamp:
Apr 6, 2009, 12:33:22 AM (15 years ago)
Author:
toemon
Message:

#90 マルチループを使っているブロックがマルチユーザに対応していない に対する修正

File:
1 edited

Legend:

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

    r142 r157  
    2323        $block = array(); 
    2424        $item_no = 0;    
     25         
     26        $selected_author_id = xpress_selected_author_id(false);  
    2527 
    2628        global $wpdb,$wp_query; 
     
    5153                 
    5254                $where = " WHERE ($post_tb.post_type = 'post') AND ($post_tb.post_status = 'publish')"; 
     55                if (!empty($selected_author_id)){ 
     56                        $where  .= " AND $post_tb.post_author = $selected_author_id "; 
     57                } 
    5358 
    5459                if ($cat_select) { 
     
    7378                        $where .= " AND ($post2cat_tb.category_id IN ($cat_id))"; 
    7479                } 
     80                if (!empty($selected_author_id)){ 
     81                        $where  .= " AND $post_tb.post_author = $selected_author_id "; 
     82                } 
     83 
    7584        } 
    7685        if ($show_month_range > 0) { 
Note: See TracChangeset for help on using the changeset viewer.