[wp-trac] [WordPress Trac] #31742: Customizer: use attachment ID to show current header

WordPress Trac noreply at wordpress.org
Thu Mar 26 19:51:36 UTC 2015

#31742: Customizer: use attachment ID to show current header
 Reporter:  sirbrillig    |       Owner:  ocean90
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  4.2
Component:  Customize     |     Version:  3.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:

Comment (by sirbrillig):

 After some testing with the last patch, it seems there are still cases
 where it could be incorrect; in fact, sometimes it seems that it could be
 more incorrect than the existing behavior. I still think it would be a
 good idea to match without URL, but in this case we went back to the
 original issue that prompted this ticket, which is that in some cases the
 Current Image control reads "no image set" when in fact an image is
 actually set.

 Taking another approach for that particular behavior, I made a new patch
 which simply checks, when displaying the current image, if its model data
 is inconsistent with the settings. If so, it falls back to using the
 current image from the settings.

 More specifically, if `api.get().header_image` is set, and
 `this.model.get('choice')` is unset, then something is wrong and we might
 as well use `api.get().header_image` as the data.

Ticket URL: <https://core.trac.wordpress.org/ticket/31742#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list