mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 15:50:09 +00:00
In the youtube_embed_url embed handler, make embed a non-capturing group that alternately matches for v - YouTube supports both URL paths.
Add unit test cases. Props dmchale for some patch work. Fixes #32161. git-svn-id: https://develop.svn.wordpress.org/trunk@32787 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2312,7 +2312,7 @@ function wp_maybe_load_embeds() {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube\.com/embed/([^/]+)#i', 'wp_embed_handler_youtube' );
|
||||
wp_embed_register_handler( 'youtube_embed_url', '#https?://(www.)?youtube\.com/(?:v|embed)/([^/]+)#i', 'wp_embed_handler_youtube' );
|
||||
|
||||
wp_embed_register_handler( 'googlevideo', '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', 'wp_embed_handler_googlevideo' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user