Expand the capabilities of oembed
|Reported by:||Otto42||Owned by:|
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.
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:
Change History (9)
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed