[wp-trac] [WordPress Trac] #32161: support youtube search friendly URL usualy used for sharing http://www.youtube.com/v/dr4HHepGxxM

WordPress Trac noreply at wordpress.org
Wed May 13 03:33:53 UTC 2015


#32161: support youtube search friendly URL usualy used for sharing
http://www.youtube.com/v/dr4HHepGxxM
--------------------------+--------------------------
 Reporter:  ritter.aaron  |       Owner:  johnbillion
     Type:  enhancement   |      Status:  assigned
 Priority:  normal        |   Milestone:  4.3
Component:  Embeds        |     Version:  2.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+--------------------------

Comment (by dmchale):

 This is my first time writing unit tests, so please be gentle :)

 Patch 4 added for testing `youtube.com/embed/` URLs as well as the new
 `youtube.com/v/` URLs. Mimicking the functionality of the handlers, we
 regex the given URL to pull the video id from it, run it through
 `wp_embed_handler_youtube()` to get a `youtube.com?v=xxxxxxxx` formatted
 url, and then take the final step of passing that through
 `wp_oembed_get()` to get a full
 `https://www.youtube.com/embed/oHg5SJYRHA0?feature=oembed` result.

 Not sure if that's too far, not enough, or done the wrong way - so input
 is more than welcome.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32161#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list