[wp-trac] [WordPress Trac] #8592: Private Pages not listed in the Parent dropdown

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 31 18:12:24 UTC 2011


#8592: Private Pages not listed in the Parent dropdown
---------------------------------+-----------------------------
 Reporter:  mtdewvirus           |       Owner:  nacin
     Type:  defect (bug)         |      Status:  reviewing
 Priority:  normal               |   Milestone:  Future Release
Component:  Administration       |     Version:  2.7
 Severity:  major                |  Resolution:
 Keywords:  has-patch 3.2-early  |
---------------------------------+-----------------------------

Comment (by sillybean):

 I tested this patch on a site where I have a deep hierarchy of private
 pages and a bunch of users a) creating more pages in that hierarchy, and
 b) viewing lists of the private pages on the front end.

 The patch solves the dropdown issue beautifully, but I'm looking at
 resolving #4711 and #6939 as well as this ticket. Casting `$post_status`
 as an array causes problems if you've passed more than one status in an
 argument string -- e.g. `wp_list_pages('post_status=publish,private')`
 returns false because the resulting array doesn't pass the `array_diff()`
 test with `get_post_stati()`.

 If, in `wp-includes/post.php`, instead of:

 {{{
 $post_status = (array) $post_status;
 }}}


 we do this:

 {{{
 if (!is_array($post_status))
         $post_status = explode(',', $post_status);
 }}}


 ... then it becomes possible to call `wp_list_pages()` with more than one
 status, and that warning in Quick Edit is still taken care of.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/8592#comment:102>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list