Advertisement
viktormorales

Funciones Wordpress: Solución al problema z-index de youtube

Mar 16th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. <?php
  2. function wmode_filter($html, $url, $attr) {
  3.     if ( strpos( $html, "<embed src=" ) !== false )
  4.        { return str_replace('</param><embed', '</param><param name="wmode" value="opaque"></param><embed wmode="opaque" ', $html); }
  5.     elseif ( strpos ( $html, 'feature=oembed' ) !== false )
  6.        { return str_replace( 'feature=oembed', 'feature=oembed&wmode=opaque', $html ); }
  7.     else
  8.        { return $html; }
  9.  }
  10.  add_filter( 'embed_oembed_html', 'wmode_filter', 10, 3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement