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' => 'buzz_agency_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'buzz_agency_customize_partial_blogdescription', ) ); } class Buzz_Agency_Customize_Heading extends WP_Customize_Control { public $type = 'heading'; public function render_content() { if ( !empty( $this->label ) ) : ?>

label ); ?>

description){ ?> description); ?> $box ){ foreach ($box as $key => $value){ $input_decoded[$boxes][$key] = sanitize_text_field( $value ); } } return json_encode($input_decoded); } return $input; } /** * Repeater Sanitize for html filter */ function buzz_agency_html_sanitize_repeater($input){ $input_decoded = json_decode( $input, true ); if(!empty($input_decoded)) { foreach ($input_decoded as $boxes => $box ){ foreach ($box as $key => $value){ $input_decoded[$boxes][$key] = wp_kses_post( $value ); } } return json_encode($input_decoded); } return $input; } } add_action( 'customize_register', 'buzz_agency_repeaters_customize_register' );