WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/14/2016 06:40:08 PM (4 years ago)
Author:
westonruter
Message:

Customize: Use selective refresh for custom header changes when possible.

  • Use postMessage transport for header image settings by default when video headers are supported, and thus the_custom_header_markup() will necessarily be used (and thus a selective refresh partial will be available).
  • Ensure that the_custom_header_markup() always outputs a container element in the customizer preview even if the header is empty.
  • Ensure that edit shortcut appearing for custom header does not get positioned off-screen.

Props bradyvercher, westonruter.
See #38639.
Fixes #38737.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyseventeen/inc/customizer.php

    r39078 r39227  
    1717    $wp_customize->get_setting( 'blogdescription' )->transport   = 'postMessage';
    1818    $wp_customize->get_setting( 'header_textcolor' )->transport  = 'postMessage';
    19     $wp_customize->get_setting( 'header_image' )->transport      = 'postMessage';
    20     $wp_customize->get_setting( 'header_image_data' )->transport = 'postMessage';
    2119
    2220    $wp_customize->selective_refresh->add_partial( 'blogname', array(
Note: See TracChangeset for help on using the changeset viewer.