Changeset 553671
- Timestamp:
- 06/06/2012 05:39:57 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
category-sticky-posts/trunk/bz_category_sticky.php
r452293 r553671 5 5 Description: Set sticky posts for individual category archives 6 6 Author: Brian Zeligson 7 Version: 0.1 17 Version: 0.12 8 8 Author URI: http://www.workinginboxershorts.com 9 9 … … 146 146 $cat_obj = $wp_query->get_queried_object(); 147 147 if (!is_array($this->bz_sticky_categories[$cat_obj->term_id])) return $posts; 148 foreach($this->bz_sticky_categories[$cat_obj->term_id] as $bz_cat_sticky_post => $val) $newposts[] = get_post($bz_cat_sticky_post); 148 foreach($this->bz_sticky_categories[$cat_obj->term_id] as $bz_cat_sticky_post => $val) 149 { 150 $sticky_post = get_post($bz_cat_sticky_post); 151 if ($sticky_post->post_status === 'publish') $newposts[] = $sticky_post; 152 } 149 153 foreach($posts as $post) if (!isset($this->bz_sticky_categories[$cat_obj->term_id][$post->ID])) $newposts[] = $post; 150 154 return $newposts;
Note: See TracChangeset
for help on using the changeset viewer.