[wp-trac] [WordPress Trac] #8592: Private Pages not listed in the Parent dropdown
WordPress Trac
noreply at wordpress.org
Mon Apr 20 08:37:04 UTC 2015
#8592: Private Pages not listed in the Parent dropdown
-------------------------------------------------+-------------------------
Reporter: mtdewvirus | Owner: nacin
Type: enhancement | Status: reopened
Priority: normal | Milestone: Future
Component: Posts, Post Types | Release
Severity: major | Version: 2.7
Keywords: 2nd-opinion needs-patch ux-feedback | Resolution:
| Focuses:
| administration
-------------------------------------------------+-------------------------
Comment (by alexfurr):
Well from our users point of view its pretty simple.
'''How we'd want it to work'''
In the 'Page Attributes' window (post.php) ALL pages should appear in the
'Parent' drop down option.
That bit seems to be quite simple - someone (I forget the source) has
already written a code snippet to do this
{{{
// Add draft / aprentpending etc for pages in the drop down
add_filter( 'page_attributes_dropdown_pages_args',
'wps_dropdown_pages_args_add_parents' );
add_filter( 'quick_edit_dropdown_pages_args',
'wps_dropdown_pages_args_add_parents' );
/**
* Add private/draft/future/pending pages to parent dropdown.
*/
function wps_dropdown_pages_args_add_parents( $dropdown_args, $post = NULL
) {
$dropdown_args['post_status'] = array( 'publish', 'draft', 'pending',
'future', 'private', );
return $dropdown_args;
}
}}}
The tricky bit (I believe) is changing what happens to child pages when a
parent is made private.
The default functionality is that they 'lose' their parent - consequences
of which means that if using the default navigation system these sub pages
now appear in the main menu.
'''How we'd like child pages of private pages to behave'''
When a child page has a 'private', pending' or 'future' status:
1. It should retain the original parent in the page attributes drop down
2. They should NOT appear in the default nav system
That way it would allow people do to the following, which we really really
need.
1. Create a set of sub pages under a single parent page
2. Make this page private, or future release
3. Therefore hiding the parent page and ALL child pages from the menu
until the parent is 'published'
Basically, as a normal CMS would handle things. Currently the behavior is
not what users predict.
I'm sure there are discussions to be had regarding children pages
inheriting parent pages status (e.g. are children of a private page ALSO
private?) but I'll leave that as for us, the main thing is NOT having
children of private pages appearing in the main nav menu.
Hopefully that makes sense - I appreciate my agenda my differ from other
peoples, but this is a major reason I can't fully recommend WP as the
default CMS in our institution.
Thanks for listening and good luck.
Alex
--
Ticket URL: <https://core.trac.wordpress.org/ticket/8592#comment:188>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list