Steve Taylor photo

Add wmode parameter to WordPress oEmbeds

OK, so we know how to solve the Flash and z-index problem, right? But how to make WordPress add the solution—the wmode parameter—to its auto-embedded videos?

This should help:

add_filter( ‘oembed_result’, ‘slt_wmode_opaque’, 10, 3 );
function slt_wmode_opaque( $html, $url, $args ) {
if ( strpos( $html, ‘|’, ‘‘, $html, 1 );
if ( strpos( $html, ‘