WordPress.org

Make WordPress Core

Changeset 39951


Ignore:
Timestamp:
01/26/2017 03:46:52 AM (3 years ago)
Author:
westonruter
Message:

Customize: Always enqueue customize-preview stylesheet in the customizer preview to style selective refresh and visual edit shortcuts.

Enqueues the style along with the customize-preview script in the manager instead of via the widgets and nav_menus components, ensuring that the stylesheet is loaded for users who cannot manage widgets or nav menus.

Props dlh.
See #27403.
Fixes #39498.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r39924 r39951  
    15781578
    15791579        wp_enqueue_script( 'customize-preview' );
     1580        wp_enqueue_style( 'customize-preview' );
    15801581        add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) );
    15811582        add_action( 'wp_head', array( $this, 'remove_frameless_preview_messenger_channel' ) );
  • trunk/src/wp-includes/class-wp-customize-nav-menus.php

    r39924 r39951  
    13281328    public function customize_preview_enqueue_deps() {
    13291329        wp_enqueue_script( 'customize-preview-nav-menus' ); // Note that we have overridden this.
    1330         wp_enqueue_style( 'customize-preview' );
    13311330    }
    13321331
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r39545 r39951  
    10871087    public function customize_preview_enqueue() {
    10881088        wp_enqueue_script( 'customize-preview-widgets' );
    1089         wp_enqueue_style( 'customize-preview' );
    10901089    }
    10911090
Note: See TracChangeset for help on using the changeset viewer.