[wp-trac] [WordPress Trac] #13943: Sticky posts are sticky posts even if they are trashed
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 17 11:41:51 UTC 2010
#13943: Sticky posts are sticky posts even if they are trashed
--------------------------+-------------------------------------------------
Reporter: bi0xid | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Unassigned
Component: Post Types | Version:
Severity: normal | Keywords: reporter-feedback, sticky posts
--------------------------+-------------------------------------------------
Changes (by nacin):
* milestone: 3.0 => Unassigned
Comment:
When using WP_Query to query posts, sticky posts that are trashed will be
excluded.
I suppose we could add a filter to get_option('sticky_posts') that
excludes any trashed IDs, or better yet unstick any post when it is
trashed, but I'm not sure if either of those would be what the expected
behavior is.
The code you provide I imagine would work for any post in the trash, not
just sticky ones.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13943#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list