Opened 13 years ago
Last modified 5 years ago
#20167 new enhancement
Add wp_pages_checklist for creating checklist of pages on site
Reported by: | jackreichert | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch needs-refresh |
Focuses: | template | Cc: |
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 (9)
#2
@
13 years ago
What DrewAPicture said.
Also, are you sure there already isn't a checklist walker for this already? Related: [17796]
#3
@
13 years 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.
#4
@
13 years 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.
I'd think since we have the taxonomy-agnostic
wp_terms_checklist
, we'd do better to introduce a content-agnostic version for custom post types too rather that one specifically for pages. Maybewp_posts_checklist
orwp_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.