WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#33005 closed defect (bug) (fixed)

Removing header image attachement does not remove header_image_data theme mod

Reported by: CreativeInfusion Owned by: obenland
Milestone: 4.3 Priority: normal
Severity: normal Version: 3.0
Component: Themes Keywords: has-patch
Focuses: Cc:

Description

If you delete an attachment from the media library that is set as a header image then although it deletes the header_image theme mod it does not delete the header_image_data theme mod.

This results in incompatible data being returned from get_custom_header and get_header_image.

Related #20871 #25156

Attachments (1)

33005.diff (620 bytes) - added by CreativeInfusion 5 years ago.

Download all attachments as: .zip

Change History (3)

#1 @obenland
5 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.3
  • Owner set to obenland
  • Status changed from new to accepted
  • Version changed from 4.0 to 3.0

Nice find CreativeInfusion.

Introduced in [14850].

#2 @obenland
5 years ago

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

In 33278:

Properly clean up header image data when the attachment is deleted.

Props CreativeInfusion.
Fixes #33005.

Note: See TracTickets for help on using tickets.