Make WordPress Core

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's profile 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)

post-template.wp_pages_checklist.diff (2.4 KB) - added by jackreichert 13 years ago.
post-template.wp_pages_checklist-post_types.diff (2.6 KB) - added by jackreichert 13 years ago.

Download all attachments as: .zip

Change History (9)

#1 @DrewAPicture
13 years ago

  • Cc xoodrew@… added

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. Maybe wp_posts_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.

Last edited 13 years ago by DrewAPicture (previous) (diff)

#2 @scribu
13 years ago

What DrewAPicture said.

Also, are you sure there already isn't a checklist walker for this already? Related: [17796]

Last edited 13 years ago by scribu (previous) (diff)

#3 @jackreichert
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 @jackreichert
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.

Last edited 13 years ago by jackreichert (previous) (diff)

#5 @jackreichert
13 years ago

  • Cc jack@… added

#6 @nacin
11 years ago

  • Component changed from Template to Posts, Post Types
  • Focuses template added

#7 @chriscct7
9 years ago

  • Keywords needs-refresh added
Note: See TracTickets for help on using tickets.