#16437 closed enhancement (duplicate)
wp_category_checklist should have name parameter
Reported by: | takien | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.0.4 |
Component: | General | Keywords: | close |
Focuses: | Cc: |
Description
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
@
13 years ago
- Cc steph@… added
- Keywords changed from wp_category_checklist, category, walker to wp_category_checklist category, walker
#3
@
13 years ago
- Keywords close added; needs-patch removed
- Severity changed from normal to minor
- Type changed from feature request to enhancement
#4
@
11 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.
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