#16437 closed enhancement (duplicate)
wp_category_checklist should have name parameter
| Reported by: | takien | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.0.4 |
| Severity: | minor | Keywords: | close |
| Cc: | Focuses: |
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
@
15 years ago
- Cc added
- Keywords wp_category_checklist, category, walker → wp_category_checklist category, walker
#3
@
15 years ago
- Keywords close added; needs-patch removed
- Severity normal → minor
- Type feature request → enhancement
#4
@
13 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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