get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => 'burger_joint_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'burger_joint_customize_partial_blogdescription', ) ); } // Upsell Section. $wp_customize->add_section( new Burger_Joint_Upsell_Section( $wp_customize, 'upsell_section', array( 'title' => __( 'Burger Joint Pro', 'burger-joint' ), 'button_text' => __( 'Buy Pro', 'burger-joint' ), 'url' => 'https://asterthemes.com/products/food-joint-wordpress-theme', 'background_color' => '#FF4500', 'text_color' => '#fff', 'priority' => 0, ) ) ); // Doc Section. $wp_customize->add_section( new Burger_Joint_Upsell_Section( $wp_customize, 'doc_section', array( 'title' => __( 'Documentation', 'burger-joint' ), 'button_text' => __( 'Free Doc', 'burger-joint' ), 'url' => 'https://demo.asterthemes.com/docs/fast-food-joint-free/', 'background_color' => '#FF4500', 'text_color' => '#fff', 'priority' => 1, ) ) ); // Theme Options. require get_template_directory() . '/theme-library/customizer/theme-options.php'; // Front Page Options. require get_template_directory() . '/theme-library/customizer/front-page-options.php'; // Colors. require get_template_directory() . '/theme-library/customizer/colors.php'; } add_action( 'customize_register', 'burger_joint_customize_register' ); function burger_joint_customize_partial_blogname() { bloginfo( 'name' ); } function burger_joint_customize_partial_blogdescription() { bloginfo( 'description' ); } function burger_joint_customize_preview_js() { $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_script( 'burger-joint-customizer', get_template_directory_uri() . '/resource/js/customizer' . $min . '.js', array( 'customize-preview' ), BURGER_JOINT_VERSION, true ); } add_action( 'customize_preview_init', 'burger_joint_customize_preview_js' ); function burger_joint_custom_control_scripts() { $min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; wp_enqueue_style( 'burger-joint-custom-controls-css', get_template_directory_uri() . '/resource/css/custom-controls' . $min . '.css', array(), '1.0', 'all' ); wp_enqueue_script( 'burger-joint-custom-controls-js', get_template_directory_uri() . '/resource/js/custom-controls' . $min . '.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-sortable' ), '1.0', true ); } add_action( 'customize_controls_enqueue_scripts', 'burger_joint_custom_control_scripts' );