Make WordPress Core

Changeset 40095


Ignore:
Timestamp:
02/21/2017 06:53:19 AM (10 years ago)
Author:
dd32
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, westonruter.
Merges [39951] to the 4.7 branch.
See #27403.
Fixes #39498.

Location:
branches/4.7
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/src/wp-includes/class-wp-customize-manager.php

    r39693 r40095  
    15721572
    15731573                wp_enqueue_script( 'customize-preview' );
     1574                wp_enqueue_style( 'customize-preview' );
    15741575                add_action( 'wp_head', array( $this, 'customize_preview_loading_style' ) );
    15751576                add_action( 'wp_head', array( $this, 'remove_frameless_preview_messenger_channel' ) );
  • branches/4.7/src/wp-includes/class-wp-customize-nav-menus.php

    r39570 r40095  
    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
  • branches/4.7/src/wp-includes/class-wp-customize-widgets.php

    r39571 r40095  
    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.