Changeset 157 for trunk/wp-content/themes/xpress_default
- Timestamp:
- Apr 6, 2009, 12:33:22 AM (16 years ago)
- Location:
- trunk/wp-content/themes/xpress_default/blocks
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/xpress_default/blocks/popular_posts_block_theme.php
r142 r157 23 23 $block = array(); 24 24 $item_no = 0; 25 26 $selected_author_id = xpress_selected_author_id(false); 25 27 26 28 global $wpdb,$wp_query; … … 51 53 52 54 $where = " WHERE ($post_tb.post_type = 'post') AND ($post_tb.post_status = 'publish')"; 55 if (!empty($selected_author_id)){ 56 $where .= " AND $post_tb.post_author = $selected_author_id "; 57 } 53 58 54 59 if ($cat_select) { … … 73 78 $where .= " AND ($post2cat_tb.category_id IN ($cat_id))"; 74 79 } 80 if (!empty($selected_author_id)){ 81 $where .= " AND $post_tb.post_author = $selected_author_id "; 82 } 83 75 84 } 76 85 if ($show_month_range > 0) { -
trunk/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php
r145 r157 20 20 if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 21 21 22 $selected_author_id = xpress_selected_author_id(false); 23 if (!empty($selected_author_id)){ 24 $author_where ="author=$selected_author_id&"; 25 } else { 26 $author_where = ''; 27 } 22 28 global $wpdb,$wp_query; 23 29 $block = array(); … … 26 32 $wp_query->in_the_loop = true; //for use the_tags() in multi lopp 27 33 if (array_search(0,$selected)===0) { 28 $r = new WP_Query($ tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");34 $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 29 35 30 36 } else { 31 37 $cat_id = implode(',',$selected); 32 $r = new WP_Query($ tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");38 $r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 33 39 } 34 40 while($r->have_posts()){ -
trunk/wp-content/themes/xpress_default/blocks/recent_posts_list_block_theme.php
r142 r157 17 17 if (empty($time_format)) $time_format = get_settings('time_format'); 18 18 if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 19 20 $selected_author_id = xpress_selected_author_id(false); 21 if (!empty($selected_author_id)){ 22 $author_where ="author=$selected_author_id&"; 23 } else { 24 $author_where = ''; 25 } 19 26 20 27 global $wpdb,$wp_query; … … 24 31 $wp_query->in_the_loop = true; //for use the_tags() in multi lopp 25 32 if (array_search(0,$selected)===0) { 26 $r = new WP_Query($ tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");33 $r = new WP_Query($author_where . $tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 27 34 28 35 } else { 29 36 $cat_id = implode(',',$selected); 30 $r = new WP_Query($ tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish");37 $r = new WP_Query($author_where . $tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 31 38 } 32 39 while($r->have_posts()){
Note: See TracChangeset
for help on using the changeset viewer.