[wp-trac] [WordPress Trac] #37727: Allow for customize control notifications to have extensible templates

WordPress Trac noreply at wordpress.org
Thu Aug 18 23:27:04 UTC 2016


#37727: Allow for customize control notifications to have extensible templates
-------------------------+-----------------------------
 Reporter:  westonruter  |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Customize    |    Version:  4.6
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:  javascript   |
-------------------------+-----------------------------
 It was [https://wordpress.slack.com/archives/core-
 customize/p1469851496000101 noted] by @celloexpressions toward the end of
 4.6:

 > FYI I just noticed an issue with the JS template for control
 notifications introduced in [37476]. We need to display the raw message
 rather than escaping it `{{{` instead of `{{` so that html is allowed.
 Which it should be for links, etc., and it's needed for #34923. I'm making
 the change in the next patch there and don't think we need to change it
 for 4.6 but wanted to point it out.

 It is useful to embed non-message content into a notification to allow for
 buttons to action on the notification. However, I don't feel that just
 allowing the raw `message` to be injected into the notification template
 is necessarily the best way to go. To me it would seem better if we
 allowed for `Notification` subclasses that had custom templates to handle
 the various notification codes differently. Then the server wouldn't have
 to pass markup back as part of error messages.

 Allowing custom templates for notifications would be highly useful for the
 global notification area in the Customizer (#35210).

 See also https://core.trac.wordpress.org/ticket/30738#comment:16

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37727>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list