Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#31717 closed defect (bug) (fixed)

Add a filter to `attachment_url_to_postid`

Reported by: mattwiebe's profile mattwiebe Owned by: azaozz's profile azaozz
Milestone: 4.2 Priority: normal
Severity: normal Version: 4.0
Component: Media Keywords: has-patch
Focuses: Cc:


attachment_url_to_postid doesn't work on, which breaks any Customizer upload controls from showing their current file. Rather than trying to make the function work to support our tricky uploads system, a filter should be introduced so we (and anyone else with an unconventional filesystem) can use fallbacks to find the attachment ID.

Attachments (1)

31717.diff (568 bytes) - added by mattwiebe 9 years ago.

Download all attachments as: .zip

Change History (4)

9 years ago

#1 @mattwiebe
9 years ago

  • Keywords has-patch added

#2 @azaozz
9 years ago

  • Milestone changed from Awaiting Review to 4.2

#3 @azaozz
9 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 31867:

Introduce attachment_url_to_postid filter to let plugins manage the uploads location better.
Props mattwiebe. Fixes #31717.

Note: See TracTickets for help on using tickets.