wppaste
WordPress

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

Since
1.2.0
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.

Compatibility

WordPress
since 1.2.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$elementstring
Category name.
$categoryWP_Term|null
The category object, or null if there's no corresponding category.

Where this hook fires · 5

  • wp-includes/category-template.php:437wp_dropdown_categories()
  • wp-includes/category-template.php:446wp_dropdown_categories()
  • wp-includes/category-template.php:454wp_dropdown_categories()
  • wp-includes/class-walker-category-dropdown.php:66Walker_CategoryDropdown::start_el()
  • wp-includes/class-walker-category.php:106Walker_Category::start_el()

Changelog

Introduced in 1.2.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.