xwp / wp-widget-customizer

[OBSOLETE] Widget Customizer plugin for WordPress (now merged into Core)
http://wordpress.org/plugins/widget-customizer/
54 stars 18 forks source link

Settings in customizer panel and preview window should be kept in sync #38

Open westonruter opened 11 years ago

westonruter commented 11 years ago

It turns out that the customizer preview has a copy of the settings just like the customizer panel (parent frame), but if you change the setting in the preview window, it does not sync those changes to the settings in the parent frame. So when changing settings within preview they should propagate up to the parent customizer iframe settings. This will enable inline widget controls inside of the preivew.

Relates to #17.

westonruter commented 11 years ago

Are settings not being synced out of concerns for security? Is this also why the previewer instance is encapsulated in a closure and not exported?

https://github.com/WordPress/WordPress/blob/8bfa1e8d24f42e81d3380086c1633b36799a7500/wp-includes/js/customize-preview.js#L54-L61