diff --git wp-includes/media.php wp-includes/media.php
index 43b5aab..b9d8a5d 100644
|
|
function wp_maybe_load_embeds() { |
2183 | 2183 | if ( ! apply_filters( 'load_default_embeds', true ) ) { |
2184 | 2184 | return; |
2185 | 2185 | } |
| 2186 | |
| 2187 | wp_embed_register_handler( 'youtubevideo', '#^.*\.youtube\.com/(embed/|watch\?v=|\#/watch\?v=)([^\#\&\?]*)#i', 'wp_embed_handler_youtubevideo' ); |
2186 | 2188 | |
2187 | 2189 | wp_embed_register_handler( 'googlevideo', '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', 'wp_embed_handler_googlevideo' ); |
2188 | 2190 | |
… |
… |
function wp_maybe_load_embeds() { |
2205 | 2207 | wp_embed_register_handler( 'video', '#^https?://.+?\.(' . join( '|', wp_get_video_extensions() ) . ')$#i', apply_filters( 'wp_video_embed_handler', 'wp_embed_handler_video' ), 9999 ); |
2206 | 2208 | } |
2207 | 2209 | |
| 2210 | function wp_embed_handler_youtubevideo( $matches, $attr, $url, $rawattr ) { |
| 2211 | $video_url = sprintf( 'http://www.youtube.com/watch?v=%s', esc_attr( $matches[2] ) ); |
| 2212 | |
| 2213 | return apply_filters( 'embed_youtubevideo', wp_oembed_get( $video_url ), $attr, $url, $rawattr ); |
| 2214 | } |
| 2215 | |
2208 | 2216 | /** |
2209 | 2217 | * The Google Video embed handler callback. Google Video does not support oEmbed. |
2210 | 2218 | * |