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

    r418 r451  
    11<?php 
     2// Block Version: 1.0 
    23function popular_posts_block($options) 
    34{ 
     
    910        $time_format = empty( $options[5] ) ? '' : $options[5] ; 
    1011        $tag_select = $options[6] ; 
    11         $selected = array_slice($options, 7); // get allowed cats 
     12        $cat_select = empty( $options[7] ) ? '0' : $options[7] ; 
     13         
     14        $selected = explode(',' , $cat_select); 
    1215 
    1316        $mydirpath = get_xpress_dir_path(); 
     
    1518        if (empty($date_format)) $date_format = get_settings('date_format'); 
    1619        if (empty($time_format)) $time_format = get_settings('time_format'); 
    17         if (array_search(0,$selected)===0) { 
    18                 $cat_select = false; 
    19         }else { 
    20                 $cat_select = true;                      
    21         } 
    22         $cat_id = implode(',',$selected); 
     20        if (array_search(0,$selected)===0) $cat_select = 0; 
     21         
     22        $cat_select; 
    2323        $block = array(); 
    2424        $item_no = 0;    
     
    5858 
    5959                if ($cat_select) { 
    60                         $where .= " AND ($term_taxonomy.term_id IN ($cat_id))"; 
     60                        $where .= " AND ($term_taxonomy.term_id IN ($cat_select))"; 
    6161                } 
    6262                 
     
    7575                 
    7676                if ($cat_select) { 
    77                         $where .= " AND ($post2cat_tb.category_id IN ($cat_id))"; 
     77                        $where .= " AND ($post2cat_tb.category_id IN ($cat_select))"; 
    7878                } 
    7979        } 
Note: See TracChangeset for help on using the changeset viewer.