WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 4 years ago

#38794 closed enhancement

Customize: Allow panels and sections to have notifications just like controls can — at Version 3

Reported by: westonruter Owned by:
Milestone: 4.9 Priority: normal
Severity: normal Version: 4.6
Component: Customize Keywords: has-patch has-screenshots has-dev-note
Focuses: Cc:

Description (last modified by westonruter)

In #34893, the ability to show notifications on controls was added. In #35210 this is proposed to be extended at a global level to be able to show notifications at the root of the customizer. Between these two ends, there should also be the ability to show notifications at the panel and section level.

The Customize Posts plugin implements notifications for sections which could serve as a start for the patch here: https://github.com/xwp/wp-customize-posts/blob/0.8.2/js/customize-post-section.js#L825-L942

Once implemented, section notifications should be utilized for the Header Media section to show a notification when not previewing a URL that is eligible for a header video. See #38778. The section-level notification could be used in #40432 as well.

For more sample code, see:

Change History (3)

#1 @celloexpressions
5 years ago

  • Version set to 4.6

While it's probably generally a better practice to use control-specific descriptions and notifications, header media is a good example of where it can make sense to do this for certain sections and panels. Another potential use case could be an info notification in the menus panel when there are no menus that invites users to create their first menu and assign it to their theme's locations.

#2 @westonruter
5 years ago

  • Description modified (diff)

#3 @westonruter
4 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.