[wp-trac] [WordPress Trac] #27222: get_uploaded_header_images() returns the incorrect image URL
WordPress Trac
noreply at wordpress.org
Thu Feb 27 13:38:02 UTC 2014
#27222: get_uploaded_header_images() returns the incorrect image URL
--------------------------+-----------------------------
Reporter: Kopepasah | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Appearance | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When using a CDN (e.g. [http://aws.amazon.com/s3/ S3] ) and a plugin that
modifies the File URL for an attachment (e.g.
[http://wordpress.org/plugins/amazon-s3-and-cloudfront/ Amazon S3 and
CloudFront]), the `get_uploaded_header_images()` function returns an array
with the unmodified URL instead of the new URL.
In the case of this particular plugin, we have the option of removing the
media from the media folder and using the media strictly on the CDN;
however, the result is a blank image (by looking in the empty media
library) instead of the image on the CDN.
The attached patch uses `wp_get_attachment_url( $header->ID )` in lieu of
`$header->guid` to return the correct URL.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27222>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list