list_cats WordPress Filter Hook

The list_cats hook can be used to display a list of categories on your WordPress site. This hook is typically used in the sidebar, but can be used anywhere on your site.

apply_filters( 'list_cats', string $element, WP_Term|null $category ) #

Filters a taxonomy drop-down display element.


Description

A variety of taxonomy drop-down display elements can be modified just prior to display via this filter. Filterable arguments include ‘show_option_none’, ‘show_option_all’, and various forms of the term name.

Top ↑

See also


Top ↑

Parameters

$element

(string)Category name.

$category

(WP_Term|null)The category object, or null if there's no corresponding category.


Top ↑

Source

File: wp-includes/category-template.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
1.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.