[wp-trac] [WordPress Trac] #38737: Add selective refresh to new custom header functions

WordPress Trac noreply at wordpress.org
Wed Nov 9 21:50:23 UTC 2016


#38737: Add selective refresh to new custom header functions
---------------------------+-------------------------
 Reporter:  peterwilsoncc  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  4.7
Component:  Themes         |    Version:  trunk
 Severity:  normal         |   Keywords:  needs-patch
  Focuses:                 |
---------------------------+-------------------------
 Forked from #38639

 cc: @bradyvercher, @celloexpressions, @westonruter
 Adding to milestone per original ticket

 Original description for this part of the ticket:

 == Selective Refresh ==

 A Customizer partial is registered by default and uses
 `the_custom_header_markup()` for the render callback, which allows both
 header images and videos to automatically support selective refresh. If a
 header image or video hasn't been set, we don't want to output empty
 markup on the front end, however, the container div needs to exist in the
 Customizer for selective refresh to work. Otherwise, setting an image or
 video will result in a full refresh.

 `the_custom_logo()`, along with other features in core, output
 placeholders in the Customizer preview for the optimal experience, so
 making sure the container is always available in the preview isn't really
 breaking new ground. Themes can always use `.wp-custom-header:empty {
 display: none;}` to hide it if it causes styling issues in the preview.

 === Header Image Settings ===

 It may also be worth changing the transport for the `header_image` and
 `header_image_data` settings to `postMessage` automatically when the the
 theme registers support for videos. Otherwise, it's kind of a weird
 experience when videos use selective refresh and images don't.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38737>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list