Opened 13 years ago
Last modified 7 years ago
#19556 new enhancement
Make wp_term_checklist() available as a template tag
Reported by: | scribu | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | has-patch needs-refresh |
Focuses: | template | Cc: |
Description
Currently, wp_term_checklist() is defined in wp-admin/includes/template.php, which means it's not available as a template tag for themes.
Note that wp_dropdown_categories()
is defined in wp-includes/category-template.php
. We should move wp_term_checklist() there too.
Attachments (2)
Change History (13)
@
11 years ago
Make wp_term_checklist() available as a template tag, add support for 'name' argument
#5
@
11 years ago
This patch:
- moves wp_category_checklist(), wp_terms_checklist(), and Walker_Category_Checklist from wp-admin/includes/template.php to wp-includes/category-template.php
- adds support for the 'name' argument to wp_terms_checklist() and Walker_Category_Checklist (for #16437)
- removes the capability check / 'disabled' attribute
I'd appreciate a sanity check on that last point. I couldn't think of any scenarios where the checklist was displayed but disabled, and scribu was right about needing to remove that in order to make the function available as a template tag.
#9
@
9 years ago
- Keywords needs-testing needs-unit-tests needs-refresh removed
- Milestone changed from Awaiting Review to Future Release
19556.2.diff is an updated patch that applies cleanly against trunk. It does the following:
- Moves
wp_category_checklist()
andwp_terms_checklist()
fromwp-admin/includes/template.php
towp-includes/category-template.php
- Doesn't move
wp_popular_terms_checklist()
- Moves
wp-admin/includes/class-walker-category-checklist.php
towp-includes/class-walker-category-checklist.php
- Adds support for the
$name
argument towp_terms_checklist()
/Walker_Category_Checklist
(see #16437)
Note: If this gets committed, svn cp
would need to be used to move the walker class file.
Not sure what to do with the 'popular_cats' arg.