Changeset 451 for branches/XPressMU/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_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/recent_posts_list_block_theme.php
r272 r451 1 1 <?php 2 // Block Version: 1.0 2 3 function recent_posts_list_block($options) 3 4 { … … 10 11 $time_format = empty( $options[6] ) ? '' : $options[6] ; 11 12 $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); 13 16 14 17 $mydirpath = get_xpress_dir_path(); … … 17 20 if (empty($time_format)) $time_format = get_settings('time_format'); 18 21 if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 22 if (array_search(0,$selected)===0) $cat_select = 0; 19 23 20 24 $selected_author_id = xpress_selected_author_id('echo=0'); … … 30 34 if (!is_null($wpdb)){ 31 35 $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 { 33 39 $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");38 40 } 39 41 while($r->have_posts()){
Note: See TracChangeset
for help on using the changeset viewer.