wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_get_attachment_link_attributes › WordPress Filter Hooks

Since6.2.0
Deprecatedn/a
apply_filters( 'wp_get_attachment_link_attributes', array( 'href' => $url )
Parameters: (2)
  • () attributes An array of attributes for the link markup, keyed on the attribute name.
    Required: No
    Default:
  • () id Post ID.
    Required: Yes
Defined at:
Codex:

Filters the list of attachment link attributes.





Source

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