Snippets: Add “nocookie” To WordPress oEmbeded Youtube Videos

// Add "nocookie" To WordPress oEmbeded Youtube Videos
function wpex_youtube_nocookie_oembed( $return ) {
	$return = str_replace( 'youtube', 'youtube-nocookie', $return );
	return $return;
}
add_filter( 'oembed_dataparse', 'wpex_youtube_nocookie_oembed' );

Snippet Type: PHP

Posted Under: Other

All PHP snippets should be added via a child theme's functions.php file.