apply_filters( ‘wp_get_attachment_link_attributes’, array $attributes, int $id )

In this article

Filters the list of attachment link attributes.

Parameters

$attributesarray
An array of attributes for the link markup, keyed on the attribute name.
$idint
Post ID.

Source

$attributes = apply_filters( 'wp_get_attachment_link_attributes', array( 'href' => $url ), $_post->ID );

Changelog

VersionDescription
6.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.