Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

r-a-y

By: a guest on Jul 23rd, 2010  |  syntax: None  |  size: 0.34 KB  |  views: 128  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function my_oembed_wmode( $embed ) {
  2.         if ( strpos( $embed, '<param' ) !== false ) {
  3.                 $embed = str_replace( '<embed', '<embed wmode="transparent" ', $embed );
  4.                 $embed = preg_replace( '/param>/', 'param><param name="wmode" value="transparent" />', $embed, 1);
  5.         }
  6.        
  7.         return $embed;
  8. }
  9. add_filter( 'embed_oembed_html', 'my_oembed_wmode', 1 );