Home / Admin / Allow HTML in the product description
Duplicate Snippet

Embed Snippet on Your Site

Allow HTML in the product description

Code Preview
php
<?php
function wcv_wpkses_post_html_tags( $tags, $context ) {
	if ( 'post' === $context ) {
		$tags['iframe'] = array(
			'src'             => true,
			'height'          => true,
			'width'           => true,
			'frameborder'     => true,
			'allowfullscreen' => true,
		);
	}
	return $tags;
}
add_filter( 'wp_kses_allowed_html', 'wcv_wpkses_post_html_tags', 10, 2 );

Comments

Add a Comment