[wp-hackers] Manually refresh the customizer preview iframe via wp.customise JS object

dgwyer d.v.gwyer at presscoders.com
Wed Sep 25 16:50:06 UTC 2013

I'm trying to do a manual refresh on the customizer preview iframe, via the
JS wp.customize object. If I know a customizer setting ID I know I can do
something like (thanks Otto):


Can I do something similar to refresh the preview iframe generally?

My use case is that when the 'Save & Publish' button is clicked the color
picker values are written to a static stylesheet file (which is then
enqueued before the main theme stylesheet). The key issue is the preview
iframe needs to be manually refreshed after a successful save operation to
display the new statics stylesheet.

I was intending to hook into the ajax 'custom_save' .success() event to
refresh the preview iframe. I'm just not sure of the command needed to
manually refresh the window. I'm assuming this is possible?

View this message in context: http://wordpress-hackers.1065353.n5.nabble.com/Manually-refresh-the-customizer-preview-iframe-via-wp-customise-JS-object-tp42390.html
Sent from the Wordpress Hackers mailing list archive at Nabble.com.

More information about the wp-hackers mailing list