is_free_plan() ) { require get_template_directory() . '/inc/customizer/sections/upgrade-to-pro.php'; } require get_template_directory() . '/inc/customizer/sections/sort-homepage-section.php'; /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function bootstrap_coach_customize_preview_js() { wp_enqueue_script( 'bootstrap_coach_customizer', get_theme_file_uri( '/inc/js/customizer.js' ), array( 'customize-preview', 'customize-selective-refresh' ), BOOTSTRAP_COACH_VERSION, true ); } add_action( 'customize_preview_init', 'bootstrap_coach_customize_preview_js' ); function bootstrap_coach_customizer_scripts() { wp_enqueue_script( 'bootstrap_coach_customize', get_template_directory_uri() . '/inc/js/customize.js', array( 'jquery' ), BOOTSTRAP_COACH_VERSION, true ); $array = array( 'home' => get_home_url(), ); wp_localize_script( 'bootstrap_coach_customize', 'data', $array ); } add_action( 'customize_controls_enqueue_scripts', 'bootstrap_coach_customizer_scripts' ); /** * Binds Customizer CSS directives for free theme version. */ function bootstrap_coach_customizer_css() { wp_enqueue_style( 'bootstrap_coach_customizer_css', get_template_directory_uri() . '/inc/css/customizer.css', array(), BOOTSTRAP_COACH_VERSION ); } if ( fs_bootstrap_coach()->is_free_plan() ) { add_action( 'customize_controls_enqueue_scripts', 'bootstrap_coach_customizer_css' ); } /** * Render Callback Functions */ require get_template_directory() . '/inc/customizer/render-functions.php'; /** * Sanitization Functions */ require get_template_directory() . '/inc/customizer/sanitization-functions.php';