Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* Theme Customizer enhancements for a better user experience.
*
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
*/
( function( wp, $ ) {
/* ... */
// Layout
var handle_layout = function( layout ) {
var layout = layout || 'left';
if ( layout == 'none' || layout == 'left' || layout == 'right' )
$( 'body' ).removeClass( 'layout-none layout-left layout-right' ).addClass( 'layout-' + layout );
};
wp.customize( 'sj_global_layout', function( value ) {
value.bind( handle_layout );
} );
/* ... */
} )( wp, jQuery );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.