WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#31717 closed defect (bug) (fixed)

Add a filter to `attachment_url_to_postid`

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

Description

attachment_url_to_postid doesn't work on WordPress.com, 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 4 years ago.

Download all attachments as: .zip

Change History (4)

@mattwiebe
4 years ago

#1 @mattwiebe
4 years ago

  • Keywords has-patch added

#2 @azaozz
4 years ago

  • Milestone changed from Awaiting Review to 4.2

#3 @azaozz
4 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.