[wp-trac] [WordPress Trac] #20851: Expand the capabilities of oembed
WordPress Trac
wp-trac at lists.automattic.com
Wed Jun 6 03:05:34 UTC 2012
#20851: Expand the capabilities of oembed
-----------------------------+-----------------------------
Reporter: Otto42 | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version: 3.3.2
Severity: normal | Keywords:
-----------------------------+-----------------------------
WordPress's oembed support follows the spec quite nicely, but doesn't
really allow for expandability.
In particular, the fetch() function in WP_oEmbed only realistically allows
for maxwidth and maxheight parameters. Adding onto these parameters isn't
easily possible.
Modifying the fetch function to support arbitrary parameters from the
embed shortcode to be passed on to the provider, as per provider support,
is relatively easy, but can't be done with a plugin due to the lack of
filters.
Example: https://dev.twitter.com/docs/api/1/get/statuses/oembed
Simple patch attached to support arbitrary filters.
Example of an embed code after the patch, using the align parameter to
pass align=center to twitter's oembed call:
[embed
align=center]https://twitter.com/Otto42/status/210198339386482688[/embed]
Related: #19626
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20851>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list