Opened 15 years ago
Closed 15 years ago
#11123 closed defect (bug) (fixed)
Limit wp_get_recent_posts() to real/live posts
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Trash | Keywords: | has-patch |
Focuses: | Cc: |
Description
The WP function wp_get_recent_posts does a simple SELECT against the posts table to get data on recent posts. This function is currently only used by the mw_getRecentPosts() function (XML-RPC method metaWeblog.getRecentPosts) to provide clients with a list of recent WP posts.
A check for post_status needs to be added so that wp_get_recent_posts only returns data for "real" posts, ones with a post_status of 'draft', 'publish', 'future', 'pending', or 'private'.
With out this metaWeblog.getRecentPosts will return data for posts that have been deleted when trash is turned on.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
(In [12237]) Limit wp_get_recent_posts() to real/live posts, props josephscott, fixes #11123