Opened 2 years ago
Last modified 17 months ago
#16437 new enhancement
wp_category_checklist should have name parameter
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | General | Version: | 3.0.4 |
| Severity: | minor | Keywords: | close |
| Cc: | steph@… |
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 (3)
- Cc steph@… added
- Keywords changed from wp_category_checklist, category, walker to wp_category_checklist category, walker
comment:2
SergeyBiryukov — 21 months ago
- Keywords needs-patch added; wp_category_checklist category walker removed

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