WordPress at a glance
filter is not described

category_list_link_attributes filter-hook . WP 5.2.0

Filters the HTML attributes applied to a category list item's anchor element.

Usage

add_filter( 'category_list_link_attributes', 'filter_function_name_8066', 10, 5 );
function filter_function_name_8066( $atts, $category, $depth, $args, $id ){
	// filter...

	return $atts;
}
$atts(array)

The HTML attributes applied to the list item's <a> element, empty strings are ignored.

  • $href (string)
    The href attribute.

  • $title (string)
    The title attribute.
$category(WP_Term)
Term data object.
$depth(int)
Depth of category, used for padding.
$args(array)
An array of arguments.
$id(int)
ID of the current category.

Changelog

Since 5.2.0 Introduced.

Where the hook is called

Walker_Category::start_el()
category_list_link_attributes
wp-includes/class-walker-category.php 142
$atts = apply_filters( 'category_list_link_attributes', $atts, $category, $depth, $args, $id );

Where the hook is used (in WP core)

Usage not found!