[wp-trac] [WordPress Trac] #6939: wp_list_pages() should also lists private pages if the user has capability 'read_private_pages'

WordPress Trac wp-trac at lists.automattic.com
Thu May 8 18:19:29 GMT 2008


#6939: wp_list_pages() should also lists private pages if the user has capability
'read_private_pages'
---------------------------+------------------------------------------------
 Reporter:  imwebgefunden  |       Owner:  anonymous                        
     Type:  defect         |      Status:  new                              
 Priority:  normal         |   Milestone:  2.5.2                            
Component:  Template       |     Version:  2.5.1                            
 Severity:  normal         |    Keywords:  wp_list_pages, read_private_pages
---------------------------+------------------------------------------------
 If the user has the capability "read_private_pages" wp_list_pages() don't
 lists private pages in no way. I've noticed this problem by some comments
 on my "Role Manager" Plugin page.

 Two patches are attached to this ticket.

 wp_list_pages() gets a new option "include_private_pages". The default
 value is 1 for lists private pages too if the user has the capability
 "read_private_pages".
 If private pages should not be listed also if the user has the cap
 "read_private_pages" the syntax is as an example:
 wp_list_pages('title_li=<h2>Pages</h2>&include_private_pages=0');

 The second patch is for get_pages() - with the same option and default
 value.

 And of course: if a user don't has the cap "read_private_pages" private
 pages are listed in no case :)

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


More information about the wp-trac mailing list