XPressME Integration Kit

Trac


Ignore:
Timestamp:
Nov 20, 2009, 2:52:16 PM (14 years ago)
Author:
toemon
Message:

MUブランチにVer2.2.0RC1の変更内容をマージ

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php

    r272 r451  
    11<?php 
     2// Block Version: 1.0 
    23function recent_posts_list_block($options) 
    34{ 
     
    1011        $time_format = empty( $options[6] ) ? '' : $options[6] ; 
    1112        $tag_select = $options[7] ; 
    12         $selected = array_slice($options,8); // get allowed cats 
     13        $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 
     14         
     15        $selected = explode(',' , $cat_select); 
    1316 
    1417        $mydirpath = get_xpress_dir_path(); 
     
    1720        if (empty($time_format)) $time_format = get_settings('time_format'); 
    1821        if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 
     22        if (array_search(0,$selected)===0) $cat_select = 0; 
    1923 
    2024        $selected_author_id = xpress_selected_author_id('echo=0');       
     
    3034        if (!is_null($wpdb)){ 
    3135                $wp_query->in_the_loop = true;          //for use the_tags() in multi lopp  
    32                 if (array_search(0,$selected)===0) { 
     36                if ($cat_select) { 
     37                        $r = new WP_Query($author_where . $tag_where . "cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
     38                } else { 
    3339                        $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    34  
    35                 } else { 
    36                         $cat_id = implode(',',$selected); 
    37                         $r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    3840                } 
    3941                while($r->have_posts()){                         
Note: See TracChangeset for help on using the changeset viewer.