[wp-hackers] Force Theme Customizer to Reload iFrame

Frank Bueltge frank at bueltge.de
Tue Oct 16 08:56:34 UTC 2012


You can find also a small example for WP Title and Description on this theme.
See the dev version od script for read the source:
https://github.com/bueltge/Documentation/blob/master/js/theme-customizer.dev.js

The include can you find in the customizer file:
https://github.com/bueltge/Documentation/blob/master/inc/theme-customize.php
Line: 40
add_action( 'customize_preview_init', array( $this, 'customize_preview_js' ) );

Best regards

On Mon, Oct 15, 2012 at 7:41 PM, Amy Hendrix <sabreuse at gmail.com> wrote:
> To force an auto-refresh, you'll need to set the 'transport' arg to
> 'postMessage' in your add_setting() call. You then need to write a bit
> of js to handle your particular case. You can find more details at:
>
> http://codex.wordpress.org/Theme_Customization_API#Part_3:_Configure_Live_Preview_.28Optional.29
>
> http://ottopress.com/2012/how-to-leverage-the-theme-customizer-in-your-own-themes/
> (scroll down to the end for the "Enter postMessage" section)
>
> On Mon, Oct 15, 2012 at 12:00 PM, David Kryzaniak <dkryzaniak at gmail.com> wrote:
>> Hey all!
>>
>> I'm working on a few menus in the Theme Customizer admin area. I need to
>> refresh once a button (A tag) is pressed. The button is in the right column
>> and not on the page, if it makes a difference. Is there a javascript
>> function I can call to force a refresh without saving? If I type in a text
>> area, the page auto refreshes just fine.
>>
>>  Is there somewhere in the codex that has the un-minified js for the theme
>> customizer?
>>
>> Thanks for the help!
>> -Dave
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list