Make WordPress Core

Opened 12 years ago

Closed 10 years ago

Last modified 10 years ago

#16437 closed enhancement (duplicate)

wp_category_checklist should have name parameter

Reported by: takien's profile takien Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.0.4
Component: General Keywords: close
Focuses: Cc:


I found wp_category_checklist is useful for creating my plugin/theme settings options. Unfortunately, it's currently don't have name parameter, the name is statically defined as post_category in the Walker_Category_Checklist default walker.

wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true )

where it should be something like

wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true, $name='post_category' )

So we don't need to create a new walker just to change the name.
Thank you.

Change History (6)

#1 @sillybean
12 years ago

  • Cc steph@… added
  • Keywords changed from wp_category_checklist, category, walker to wp_category_checklist category, walker

#2 @SergeyBiryukov
12 years ago

  • Keywords needs-patch added; wp_category_checklist category walker removed

#3 @scribu
11 years ago

  • Keywords close added; needs-patch removed
  • Severity changed from normal to minor
  • Type changed from feature request to enhancement

wp_category_checklist() should be deprecated. It's just a wrapper for wp_terms_checklist() at this point.

Instead, we should add the parameter directly to wp_terms_checklist() and make it a template tag: #19556

#4 @sillybean
10 years ago

Adding the name parameter would be a quick fix, but if there's agreement about moving to wp_terms_checklist(), I'll work on it.

#5 @wonderboymusic
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #19556.

The changes will happen here, which has $args as an array

#6 @technosailor
10 years ago

Yeah, taxonomy specific functions should only be wrappers around appropriate term API methods. +1 To Scribu's take. Go for it, sillybean

Note: See TracTickets for help on using tickets.