[wp-trac] [WordPress Trac] #23149: YouTube Embedding is incorrect for https:// URLs

WordPress Trac noreply at wordpress.org
Sat Jan 11 19:23:05 UTC 2014


#23149: YouTube Embedding is incorrect for https:// URLs
------------------------------------+------------------
 Reporter:  Otto42                  |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  3.9
Component:  Embeds                  |     Version:  3.5
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by Otto42):

 @adamsilverstein: The shortcode function won't work for testing here
 because you're not in a normal Loop and so there is no global $post
 context setup. The shortcode expects there to be a $post because it uses
 the $postmeta to do caching of the oembed result. This is to prevent it
 from retrieving the info from the remote URL every time. Additionally, you
 have to use a real working YouTube URL for it to actually get anything
 back, a fake URL won't have valid response data.


 `echo wp_oembed_get( 'http://www.youtube.com/watch?v=oHg5SJYRHA0' );`

 returns:

 `<iframe width="500" height="375"
 src="http://www.youtube.com/embed/oHg5SJYRHA0?feature=oembed"
 frameborder="0" allowfullscreen></iframe>`

--
Ticket URL: <https://core.trac.wordpress.org/ticket/23149#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list