Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#33319 closed enhancement (fixed)

Customizer header image crop uses static URL when refreshing UI after crop.

Reported by: polevaultweb's profile polevaultweb Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.4 Priority: normal
Severity: normal Version: 3.9
Component: Customize Keywords: has-patch needs-testing
Focuses: Cc:

Description

Once an image crop has been made for the Header image inside the Customizer, the new cropped attachment is created with the URL as the post content and this is passed back to the UI with JS, to update the header img.

However, if you reload the page the header images are retrieved using wp_get_attachment_url() which allows other plugins to filter on the URL.

The URL passed to the UI after crop should be created with the same function. Is there any need for the URL to also be stored in post_content for the attachment?

Attachments (1)

33319.diff (1.6 KB) - added by polevaultweb 9 years ago.
Use wp_get_attachment_url for the cropped image URL

Download all attachments as: .zip

Change History (9)

@polevaultweb
9 years ago

Use wp_get_attachment_url for the cropped image URL

#1 @polevaultweb
9 years ago

  • Keywords has-patch needs-testing added

#2 @westonruter
9 years ago

The feature was introduced in #21785, specifically added in [27497].

@gcorne Is this something you can advise on?

#3 @nerrad
9 years ago

I'd like to second this patch, it makes it more consistent with other places attachment url is retrieved and used.

#4 @nerrad
9 years ago

seems like a related fix was made in #33386.

#5 @wonderboymusic
9 years ago

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

In 34188:

Similar to #33386, don't use guid when retrieving URL for a cropped header image in the Customizer.

Props polevaultweb.
Fixes #33319.

#6 @wonderboymusic
9 years ago

  • Milestone changed from Awaiting Review to 4.4

#7 @wonderboymusic
9 years ago

In 34214:

After [34188], fix unit test for image header.

See #33319.

#8 @DrewAPicture
9 years ago

In 34228:

Docs: Add a changelog entry for the switch to using wp_get_attachment_url() instead of the guid for determining the header image URL in Custom_Image_Header::step_3().

The change was introduced in [34188].

See #33319.

Note: See TracTickets for help on using tickets.