WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

#40155 closed enhancement (fixed)

Pass $attr through to wp_get_attachment_link filter

Reported by: danielbachhuber Owned by: joemcgill
Milestone: 5.1 Priority: normal
Severity: normal Version:
Component: Media Keywords: has-patch reporter-feedback
Focuses: Cc:

Description

The $attr variable is useful context for knowing where wp_get_attachment_link() is being called and, subsequently, how the value should be filtered.

Attachments (1)

40155.1.diff (937 bytes) - added by danielbachhuber 5 years ago.

Download all attachments as: .zip

Change History (4)

This ticket was mentioned in Slack in #core-media by antpb. View the logs.


3 years ago

#2 @joemcgill
3 years ago

  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to 5.1
  • Owner set to joemcgill
  • Status changed from new to accepted

@danielbachhuber – Assuming this enhancement still helpful, the patch looks good to me.

#3 @pento
3 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 44471:

Media: Add $attr to the wp_get_attachment_link filter.

Props danielbachhuber.
Fixes #40155.

Note: See TracTickets for help on using tickets.