XPressME Integration Kit

Trac


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

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

File:
1 edited

Legend:

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

    r145 r157  
    2020        if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 
    2121         
     22        $selected_author_id = xpress_selected_author_id(false);  
     23        if (!empty($selected_author_id)){ 
     24                $author_where ="author=$selected_author_id&"; 
     25        } else { 
     26                $author_where = ''; 
     27        } 
    2228        global $wpdb,$wp_query; 
    2329        $block = array(); 
     
    2632                $wp_query->in_the_loop = true;          //for use the_tags() in multi lopp  
    2733                if (array_search(0,$selected)===0) { 
    28                         $r = new WP_Query($tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
     34                        $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    2935 
    3036                } else { 
    3137                        $cat_id = implode(',',$selected); 
    32                         $r = new WP_Query($tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
     38                        $r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    3339                } 
    3440                while($r->have_posts()){                         
Note: See TracChangeset for help on using the changeset viewer.