Filters the HTML attributes applied to a category list item's anchor element.
$attsarray$hrefstring
$titlestring
$categoryWP_Term$depthint$argsarray$current_object_idintwp-includes/class-walker-category.php:144Walker_Category::start_el() * } * @param WP_Term $category Term data object. * @param int $depth Depth of category, used for padding. * @param array $args An array of arguments. * @param int $current_object_id ID of the current category. */ $atts = apply_filters( 'category_list_link_attributes', $atts, $category, $depth, $args, $current_object_id ); $attributes = ''; foreach ( $atts as $attr => $value ) { if ( is_scalar( $value ) && '' !== $value && false !== $value ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); $attributes .= ' ' . $attr . '="' . $value . '"';Introduced in 5.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.