[wp-trac] [WordPress Trac] #4711: get_pages and get_posts do not work well with private posts

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 7 17:41:32 GMT 2007


#4711: get_pages and get_posts do not work well with private posts
----------------------+-----------------------------------------------------
 Reporter:  Otto42    |       Owner:  anonymous  
     Type:  defect    |      Status:  new        
 Priority:  normal    |   Milestone:  2.3 (trunk)
Component:  Template  |     Version:  2.2.1      
 Severity:  major     |    Keywords:             
----------------------+-----------------------------------------------------
 The get_pages function has no way to retrieve private pages.
 The get_posts function uses a post_status parameter, meaning that it can
 retrieve (and potentially display) private posts regardless of the user.

 While get_pages() simply lacks a feature, I would argue that get_posts()
 is defective in that it can display things that it should not be able to
 display.

 Both of these functions need to be updated to use the
 get_private_posts_cap_sql() function for building the correct post_status
 query segment.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4711>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list