Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35210, comment 115


Ignore:
Timestamp:
03/01/2017 06:20:32 PM (8 years ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35210, comment 115

    initial v1  
    33For the API, I suggest that we introduce `wp.customize.notifications` which is a of `wp.customize.Values` (collection) instance of `wp.customize.Notifications`. This would mirror what is added to controls and settings. When this collection changes, the notifications should be re-rendered just as they are done on controls.
    44
    5 There should be an opportunity to factor out the current code from controls to some `utils` namespace to re-use between control notifications and root notifications, while also allowing the code to be re-used for implementing notifications on panels and sections (see #38794).
     5There should be an opportunity to factor out the current code from controls to some `utils` namespace to re-use between control notifications and root notifications, while also allowing the code to be re-used for implementing notifications on panels and sections (see #38794). For some sample code, see:
     6
     7* https://github.com/xwp/wp-customize-featured-content-demo/blob/8bf4d65/js/featured-items-panel.js#L45
     8* https://github.com/xwp/wp-customize-featured-content-demo/blob/8bf4d65/js/featured-items-panel.js#L69-L116
     9* https://github.com/xwp/wp-customize-featured-content-demo/blob/c748adf/php/class-featured-items-customize-panel.php#L47-L63