W3cubDocs

/WordPress

apply_filters( 'category_list_link_attributes', array $atts, WP_Term $category, int $depth, array $args, int $id )

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

Parameters

$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.

Source

File: wp-includes/class-walker-category.php

View on Trac

Changelog

Version Description
5.2.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/category_list_link_attributes