Changeset 451 for branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
- Timestamp:
- Nov 20, 2009, 2:52:16 PM (14 years ago)
- 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 1 1 <?php 2 // Block Version: 1.0 2 3 function popular_posts_block($options) 3 4 { … … 9 10 $time_format = empty( $options[5] ) ? '' : $options[5] ; 10 11 $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); 12 15 13 16 $mydirpath = get_xpress_dir_path(); … … 15 18 if (empty($date_format)) $date_format = get_settings('date_format'); 16 19 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; 23 23 $block = array(); 24 24 $item_no = 0; … … 58 58 59 59 if ($cat_select) { 60 $where .= " AND ($term_taxonomy.term_id IN ($cat_ id))";60 $where .= " AND ($term_taxonomy.term_id IN ($cat_select))"; 61 61 } 62 62 … … 75 75 76 76 if ($cat_select) { 77 $where .= " AND ($post2cat_tb.category_id IN ($cat_ id))";77 $where .= " AND ($post2cat_tb.category_id IN ($cat_select))"; 78 78 } 79 79 }
Note: See TracChangeset
for help on using the changeset viewer.