[wp-trac] [WordPress Trac] #36944: Display server-sent Customizer setting validation errors before save is attempted
WordPress Trac
noreply at wordpress.org
Tue Jun 14 05:30:37 UTC 2016
#36944: Display server-sent Customizer setting validation errors before save is
attempted
--------------------------------------+--------------------------
Reporter: westonruter | Owner: westonruter
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.6
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+--------------------------
Comment (by westonruter):
In [attachment:36944.3.diff]:
* Introduce `Setting#findControls` to split out logic from
`wp.customize.findControlsForSettings`, allowing individual settings to
override the logic for how associated controls are found.
@NateWr this change should help you give some control (pun intended) over
how controls are listed for a given setting with associated notifications.
You can override a setting's `findControls` method to handle a case when a
single setting is associated with multiple controls, or when a single
control has multiple fields that map to a setting with an object value
(e.g. nav menu items or widget). I added support for handling
notifications for a setting associated with multiple controls in the
Customize Posts plugin: https://github.com/xwp/wp-customize-posts/pull/180
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36944#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list