Changeset 435 for trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
- Timestamp:
- Nov 13, 2009, 6:38:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
r418 r435 9 9 $time_format = empty( $options[5] ) ? '' : $options[5] ; 10 10 $tag_select = $options[6] ; 11 $selected = array_slice($options, 7); // get allowed cats 11 $cat_select = empty( $options[7] ) ? '0' : $options[7] ; 12 13 $selected = explode(',' , $cat_select); 12 14 13 15 $mydirpath = get_xpress_dir_path(); … … 15 17 if (empty($date_format)) $date_format = get_settings('date_format'); 16 18 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); 19 if (array_search(0,$selected)===0) $cat_select = 0; 20 21 $cat_select; 23 22 $block = array(); 24 23 $item_no = 0; … … 58 57 59 58 if ($cat_select) { 60 $where .= " AND ($term_taxonomy.term_id IN ($cat_ id))";59 $where .= " AND ($term_taxonomy.term_id IN ($cat_select))"; 61 60 } 62 61 … … 75 74 76 75 if ($cat_select) { 77 $where .= " AND ($post2cat_tb.category_id IN ($cat_ id))";76 $where .= " AND ($post2cat_tb.category_id IN ($cat_select))"; 78 77 } 79 78 }
Note: See TracChangeset
for help on using the changeset viewer.