ID] = $book_landing_page_posts->post_title; } foreach( $book_landing_page_settings as $setting ){ require get_template_directory() . '/inc/customizer/' . $setting . '.php'; } foreach( $book_landing_page_sections as $section ){ require get_template_directory() . '/inc/customizer/home/' . $section . '.php'; } /** * Sanitization Functions */ require get_template_directory() . '/inc/customizer/sanitization-functions.php'; /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function book_landing_page_customize_preview_js() { wp_enqueue_script( 'book-landing-page-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true ); } add_action( 'customize_preview_init', 'book_landing_page_customize_preview_js' ); /** * Registering and enqueuing scripts/stylesheets for Customizer controls. */ function book_landing_page_customizer_js() { wp_enqueue_script( 'book-landing-page-customizer-js', get_template_directory_uri() . '/inc/js/customizer.js', array("jquery"), '20160512', true ); $book_landing_page_array = array( 'newsletter' => is_newsletter_activated() ); wp_localize_script( 'book-landing-page-customizer-js', 'book_landing_page_data', $book_landing_page_array ); } add_action( 'customize_controls_enqueue_scripts', 'book_landing_page_customizer_js' );