[wp-trac] [WordPress Trac] #18091: Update YouTube and Vimeo shortcode support to use iframe embeds instead of Flash

WordPress Trac wp-trac at lists.automattic.com
Tue Jul 12 23:20:13 UTC 2011


#18091: Update YouTube and Vimeo shortcode support to use iframe embeds instead of
Flash
--------------------------+-----------------------------
 Reporter:  cfinke        |      Owner:  nickmomrik
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Shortcodes    |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 YouTube and Vimeo now have iframe embed methods.  I've attached a patch
 that uses those embed methods instead of the outdated Flash embeds.

 The patch also implement the following improvements:

 * "&w=123&h=123" is no longer encoded as "&w=123&h=123" in
 youtube_embed_to_short_code
 * youtube_link uses a preg_replace_callback call instead of the /e flag,
 as designated by the WordPress coding standards
 * youtube_sanitize_url ensures that there is only one question mark, at
 the beginning of the query string. (Previously, a URL like
 http://youtube.com/v/12345?a=b would have been converted to
 http://youtube.com/?v=12345?a=b, causing several other functions to
 manually fix the results of youtube_sanitize_url)
 * Added support for youtu.be URLs in wpcom_youtube_embed_crazy_url_init

 If separate patches are more appropriate for these additional changes,
 I'll gladly split them up.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18091>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list