Make WordPress Core

Opened 6 years ago

Last modified 5 years ago

#43585 new defect (bug)

Dynamically created setting not received on previewer

Reported by: jegbagus's profile jegbagus Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Customize Keywords: reporter-feedback
Focuses: docs Cc:


I try to create dynamic setting & control on customizer, but setting is not propagated on previewer when setting created. Setting that dynamically created will only available on previewer when previewer refreshed.

i create a simple plugin to explain this issue :

please take a look at browser console to see the message

Change History (2)

#1 @westonruter
6 years ago

Hi. You just have to send the setting to the preview after you create it. For example, in the controls app:

setting.previewer.send( 'setting', [, setting() ] );

It will then get created as a dirty setting in the preview here:

#2 @dlh
5 years ago

  • Focuses docs added; javascript removed
  • Keywords reporter-feedback added
  • Milestone changed from Awaiting Review to Future Release
  • Version 4.9.4 deleted

Based on comment:1, there isn't a code bug here, but there's still an opportunity to document this potential gotcha.

@jegbagus Can you think back to when you submitted this ticket to suggest a location in the codebase or the Customizer handbook where it would have been helpful to see the snippet in comment:1?

Note: See TracTickets for help on using tickets.