category_list_link_attributes

category_list_link_attributes

Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('category_list_link_attributes') is found 1 times:

  • /wp-includes/class-walker-category.php line 144
    		 * @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 . '"';