get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->remove_section( 'background_image' ); $wp_customize->remove_control( 'background_color' ); if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => function() { bloginfo( 'name' ); }, ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => function() { bloginfo( 'description' ); }, ) ); } /** * Theme options. */ // $wp_customize->add_section( // 'theme_options', // [ // 'title' => __( 'LazyLoad Images', 'bongo' ), // 'priority' => 130, // Before Additional CSS. // ] // ); } /** * Enqueues JavaScript to make Customizer preview reload changes asynchronously. */ public function action_enqueue_customize_preview_js() { wp_enqueue_script( 'bongo-customizer', get_theme_file_uri( '/assets/js/customizer.min.js' ), array( 'customize-preview' ), bongo()->get_asset_version( get_theme_file_path( '/assets/js/customizer.min.js' ) ), true ); } } if ( class_exists( 'Kirki' ) ) { // Add customizer with kirki framework require get_template_directory() . '/inc/Customizer/admin/customizer/customizer.php'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound }