The wp_terms_checklist_args
filter allows you to modify the arguments array in wp_terms_checklist
, which is located in wp-admin/includes/template.php. wp_terms_checklist
is the taxonomy-independent version of wp_category_checklist
and only works with hierarchical taxonomies.
It accepts two arguments:
- array
$args
The arguments array (seewp_terms_checklist
for the defaults - int
$post_id
The post id
Example:
Let’s say you have a hierarchical taxonomy called ‘Media Categories’ — with a slug of media_cats
— that you’re using with media attachments. And let’s say you don’t want the selected categories to float to the top of the box (the default behavior).
View the code example on Gist.