WordPress.org

Make WordPress Core

#39498 closed defect (bug) (fixed)

Customizer edit shortcuts are unstyled if user can't `edit_theme_options`

Reported by: dlh Owned by: westonruter
Milestone: 4.7.3 Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

To replicate:

  • Install a plugin that allows non-administrators to open the Customizer, like Customize Posts.
  • Open the Customizer as an Editor.

See attached illustration with Twenty Seventeen.

The attached patch would enqueue the customize-preview style along with the script, although the fix might not be that straightforward.

Attachments (2)

39498.diff (692 bytes) - added by dlh 12 months ago.
39498.png (663.1 KB) - added by dlh 12 months ago.

Download all attachments as: .zip

Change History (8)

@dlh
12 months ago

@dlh
12 months ago

#1 @westonruter
12 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.7.2

Good catch, easy fix.

#2 @westonruter
11 months ago

  • Keywords commit added
  • Owner set to westonruter
  • Status changed from new to accepted

#3 @westonruter
11 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 39951:

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.

#4 @westonruter
11 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for 4.7.2

#5 @westonruter
11 months ago

  • Version set to 4.7

#6 @dd32
10 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 40095:

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.

Note: See TracTickets for help on using tickets.