/** * Scripts within the customizer controls window. * * Contextually shows the color hue control and informs the preview * when users open or close the front page sections section. */ (function() { wp.customize.bind( 'ready', function() { // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_frontpage_team_section', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-team', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_fonts_frontpage_team', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-team', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_frontpage_slide_title_section', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-slide-title', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_fonts_frontpage_slide', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-slide-title', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_frontpage_about_content_section', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-about-content', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_fonts_frontpage_about', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-about-content', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_frontpage_blog_section', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-blog', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_fonts_frontpage_blog', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-blog', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_frontpage_features_section', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-features', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_fonts_frontpage_features', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-features', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_frontpage_action_section', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-action', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_fonts_frontpage_action', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-action', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'sidebar-widgets-kirhero-subscribe-widgets', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-subscribe', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_fonts_frontpage_subscribe', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-subscribe', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'sidebar-widgets-kirhero-contact-widgets', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-contact', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_fonts_frontpage_contact', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-contact', { expanded: isExpanding }); } ); } ); // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly. wp.customize.section( 'kirhero_admin_footer_general', function( section ) { section.expanded.bind( function( isExpanding ) { wp.customize.previewer.send( 'section-highlight-footer', { expanded: isExpanding }); } ); } ); wp.customize.section( 'sidebar-widgets-kirhero-subscribe-widgets' ).panel( 'kirhero_admin_frontpage_panel' ); wp.customize.section( 'sidebar-widgets-kirhero-subscribe-widgets' ).priority( '5' ); wp.customize.section( 'sidebar-widgets-kirhero-contact-widgets' ).panel( 'kirhero_admin_frontpage_panel' ); wp.customize.section( 'sidebar-widgets-kirhero-contact-widgets' ).priority( '6' ); }); })( jQuery );