Changeset 435 for trunk/xpressme_integration_kit/wp-content/themes/xpress_default/blocks/recent_posts_list_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/recent_posts_list_block_theme.php
r272 r435 10 10 $time_format = empty( $options[6] ) ? '' : $options[6] ; 11 11 $tag_select = $options[7] ; 12 $selected = array_slice($options,8); // get allowed cats 12 $cat_select = empty( $options[8] ) ? '0' : $options[8] ; 13 14 $selected = explode(',' , $cat_select); 13 15 14 16 $mydirpath = get_xpress_dir_path(); … … 17 19 if (empty($time_format)) $time_format = get_settings('time_format'); 18 20 if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 21 if (array_search(0,$selected)===0) $cat_select = 0; 19 22 20 23 $selected_author_id = xpress_selected_author_id('echo=0'); … … 30 33 if (!is_null($wpdb)){ 31 34 $wp_query->in_the_loop = true; //for use the_tags() in multi lopp 32 if (array_search(0,$selected)===0) { 35 if ($cat_select) { 36 $r = new WP_Query($author_where . $tag_where . "cat=$cat_select&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 37 } else { 33 38 $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 39 } 39 40 while($r->have_posts()){
Note: See TracChangeset
for help on using the changeset viewer.