Used to change the appearance of the category list when list_cats() or wp_list_cats() is called from a theme. This filter is called in two different modes:
list_cats_filter($content, $category)
Will add the category ID after each category name and add "end of list" at the bottom of the category list:
add_filter('list_cats', array('foo_bar', 'list_cats_filter'), 10, 2); class foo_bar { function list_cats_filter($content, $category = null) { if ($category == null) { return $content . "<li>(end of list)</li>"; } else { return $content . " (ID={$category->cat_ID})"; } } }
See list_cats(), wp_list_cats().