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.


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

	return $atts;

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.
Term data object.
Depth of category, used for padding.
An array of arguments.
ID of the current category.


Since 5.2.0 Introduced.

Where the hook is called

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

Where in WP core the hook is used

Usage not found!