Outputs an unordered list of checkbox input elements labeled with category names.
$post_idintoptional
$descendants_and_selfintoptional
$selected_catsint[]|falseoptional
Default:false
$popular_catsint[]|falseoptional
Default:false
$walkerWalkeroptional
Default:null
$checked_ontopbooloptional
Default:true
function wp_category_checklist( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true ) {
wp_terms_checklist(
$post_id,
array(
'taxonomy' => 'category',
'descendants_and_self' => $descendants_and_self,
'selected_cats' => $selected_cats,
'popular_cats' => $popular_cats,
'walker' => $walker,
'checked_ontop' => $checked_ontop,
)
);
}
| Version | Description |
|---|---|
| 2.5.1 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_category_checklist