WordPress.org

Make WordPress Core

Changeset 34188


Ignore:
Timestamp:
09/15/2015 02:45:59 PM (5 years ago)
Author:
wonderboymusic
Message:

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

Props polevaultweb.
Fixes #33319.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/custom-header.php

    r34163 r34188  
    894894        $attachment_id = $this->insert_attachment( $object, $cropped );
    895895
    896         $url = $object['guid'];
     896        $url = wp_get_attachment_url( $attachment_id );
    897897        $this->set_header_image( compact( 'url', 'attachment_id', 'width', 'height' ) );
    898898
     
    11261126            'ID' => $parent_attachment_id,
    11271127            'post_title' => basename($cropped),
    1128             'post_content' => $url,
    11291128            'post_mime_type' => $image_type,
    11301129            'guid' => $url,
     
    12081207
    12091208        $object['attachment_id'] = $new_attachment_id;
     1209        $object['url']           = wp_get_attachment_url( $new_attachment_id );;
    12101210        $object['width']         = $dimensions['dst_width'];
    12111211        $object['height']        = $dimensions['dst_height'];
  • trunk/src/wp-admin/js/customize-controls.js

    r34056 r34188  
    24142414         */
    24152415        onCropped: function(croppedImage) {
    2416             var url = croppedImage.post_content,
     2416            var url = croppedImage.url,
    24172417                attachmentId = croppedImage.attachment_id,
    24182418                w = croppedImage.width,
Note: See TracChangeset for help on using the changeset viewer.