Get a default value of the Customizer setting using wp.customize API (JS)

It would make sense for the default value to be available via: wp.customize.instance( ‘slug_awesome_title’ ).default Or equivalently: wp.customize( ‘slug_awesome_title’ ).default However, I can see the default is simply not getting exported from PHP to JS. I can see that this is going to be needed in core also when client-side templating replaces server-side rendering of … Read more

Customizer AJAX using buttons

Having any AJAX inside of the customizer defeats the reason for using the customizer in the first place. The idea of the customizer is that it fully controls the state of the settings while it is active, and having any setting being updated without going via the customizer logic can actually cause a mismatch between … Read more