Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_category_checklist [ WordPress Function ]

wp_category_checklist ( $post_id = 0, $descendants_and_self = 0, $selected_cats = false, $popular_cats = false, $walker = null, $checked_ontop = true )
Parameters:
  • (int) $post_id Mark categories associated with this post as checked. $selected_cats must not be an array.
  • (int) $descendants_and_self ID of the category to output along with its descendents.
  • (bool|array) $selected_cats List of categories to mark as checked.
  • (bool|array) $popular_cats Override the list of categories that receive the "popular-category" class.
  • (object) $walker Walker object to use to build the output.
  • (bool) $checked_ontop Move checked items out of the hierarchy and to the top of the list.
See:
Defined at:



Output an unordered list of checkbox <input> elements labelled with category names.

Source


<?php
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
    
) );
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics