mirror of
https://ghproxy.net/https://github.com/AlxMedia/magaziner.git
synced 2025-08-28 19:02:57 +08:00
Initial commit
This commit is contained in:
commit
b0607606ae
369 changed files with 85494 additions and 0 deletions
23
functions/kirki/modules/post-meta/customize-controls.js
Normal file
23
functions/kirki/modules/post-meta/customize-controls.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
jQuery( document ).ready( function() {
|
||||
|
||||
var self;
|
||||
|
||||
self = {
|
||||
queriedPost: new wp.customize.Value()
|
||||
};
|
||||
|
||||
// Listen for queried-post messages from the preview.
|
||||
wp.customize.bind( 'ready', function() {
|
||||
wp.customize.previewer.bind( 'queried-post', function( queriedPost ) {
|
||||
self.queriedPost.set( queriedPost || false );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Listen for post
|
||||
self.queriedPost.bind( function( newPost, oldPost ) {
|
||||
window.kirkiPost = false;
|
||||
if ( newPost || oldPost ) {
|
||||
window.kirkiPost = ( newPost ) ? newPost : oldPost;
|
||||
}
|
||||
} );
|
||||
} );
|
Loading…
Add table
Add a link
Reference in a new issue