
WordPress高级自定义字段教程
wp_category_checklist ( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true )
wp_category_checklist: 这是一个函数,显示一个分层的复选框列表,用于为文章选择类别。它可以用来让用户轻松地选择和分配类别给他们的文章。
输出一个无序的复选框输入元素列表,并标明类别名称。
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, ) ); }