mirror of
https://ghproxy.net/https://github.com/AlxMedia/curver.git
synced 2025-08-28 11:50:25 +08:00
15 lines
488 B
JavaScript
15 lines
488 B
JavaScript
|
/* global wp, _customizePostPreviewedQueriedObject */
|
||
|
jQuery( document ).ready( function() {
|
||
|
|
||
|
var self = {
|
||
|
queriedPost: ( ! _.isUndefined( _customizePostPreviewedQueriedObject ) ) ? _customizePostPreviewedQueriedObject : null
|
||
|
};
|
||
|
|
||
|
// Send the queried post object to the Customizer pane when ready.
|
||
|
wp.customize.bind( 'preview-ready', function() {
|
||
|
wp.customize.preview.bind( 'active', function() {
|
||
|
wp.customize.preview.send( 'queried-post', self.queriedPost );
|
||
|
} );
|
||
|
} );
|
||
|
} );
|