wp_terms_checklist


wp_terms_checklist ( $post_id = 0, $args = array() )

Parameters:
  • (int) post_id Optional. Post ID. Default 0.
  • (array|string) args { Optional. Array or string of arguments for generating a terms checklist. Default empty array. @type int $descendants_and_self ID of the category to output along with its descendants. Default 0. @type int[] $selected_cats Array of category IDs to mark as checked. Default false. @type int[] $popular_cats Array of category IDs to receive the "popular-category" class. Default false. @type Walker $walker Walker object to use to build the output. Default is a Walker_Category_Checklist instance. @type string $taxonomy Taxonomy to generate the checklist for. Default 'category'. @type bool $checked_ontop Whether to move checked items out of the hierarchy and to the top of the list. Default true. @type bool $echo Whether to echo the generated markup. False to return the markup instead of echoing it. Default true. }
Returns:
  • (string) HTML list of input elements.
Defined at:
Change Log:
  • 4: .

Description

Output an unordered list of checkbox input elements labelled with term names.Taxonomy-independent version of wp_category_checklist().

Related Functions

wp_category_checklist, wp_popular_terms_checklist, wp_link_category_checklist, wp_version_check, wp_filter_object_list

Top Google Results

User discussions

wpseek mobile