Opened 15 months ago
Last modified 15 months ago
#20167 new enhancement
Add wp_pages_checklist for creating checklist of pages on site
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Template | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | xoodrew@…, jack@… |
Description
Per conclusion of ticket #20156
"If someone does write a patch that implements wp_posts_checklist() and
uses it in nav-menus.php, please open a new ticket."
The attached patch:
- extends Walker with Walker_Page_Checklist
- adds wp_pages_checklist() and wp_pages_checklist() functions
functionality structure was modeled after wp_category_checklist and wp_dropdown_pages to keep with WP standards.
If this patch is accepted my intention is to finish the request and implement it into nav-menus.php.
Attachments (2)
Change History (7)
jackreichert — 15 months ago
comment:1
DrewAPicture — 15 months ago
- Cc xoodrew@… added
What DrewAPicture said.
Also, are you sure there already isn't a checklist walker for this already? Related: [17796]
comment:3
jackreichert — 15 months ago
Apt insight. I'll work on a post_type version of the patch, shouldn't be difficult to modify.
I looked through the code for a checklist page walker, there is one for categories, but not pages/post_types.
jackreichert — 15 months ago
comment:4
jackreichert — 15 months ago
I've adapted the patch to work with post_types.
Note: Since get_posts in now used vs. get_pages, the 'child_of' option does not work and was removed.
If this patch is approved I will work to refactor the nav-menus.php to incorporate the new function.
I look forward to your feedback.
comment:5
jackreichert — 15 months ago
- Cc jack@… added

I'd think since we have the taxonomy-agnostic wp_terms_checklist, we'd do better to introduce a content-agnostic version for hierarchical post types too rather that one specifically for pages. Maybe wp_post_type_checklist or wp_content_checklist or something of that vein.
We're at a time when custom post (content) types are being used all over the place, it feels like it would be a step back not to cover all our bases now and make it future-proof.
#20054 is semi-related.