-
-
Save anteprimorac/bdf013328e666854a883 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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