Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#31180 closed enhancement (fixed)

Add oEmbed support

Reported by: elliottcarlson's profile elliottcarlson Owned by:
Milestone: 4.2 Priority: normal
Severity: normal Version:
Component: Embeds Keywords: has-patch
Focuses: Cc:


Tumblr has recently added functionality for embedding posts on third party sites.

This patch adds as the oEmbed endpoint for URLs matching the http://** format. This will account only for standard Tumblr blogs and does not account for those with customized domains - that support would require global oEmbed discovery to be enabled, and should not be part of the core Wordpress whitelist.

Attachments (1)

add_tumblr_oembed.diff (1.3 KB) - added by elliottcarlson 9 years ago.
Patch file

Download all attachments as: .zip

Change History (14)

9 years ago

Patch file

#1 @archimedes.trajano
9 years ago

Looks good, I added one for thecodinglove myself using the My Custom Functions plugin to add it without making any changes to the core.

wp_oembed_add_provider( '#http://(www\.)?\d+/\S+#i', '', true );

The only problem I see is that sometimes the images do not automatically load up and you see some grey placeholder. I haven't seen anyway around it yet.

Version 0, edited 9 years ago by archimedes.trajano (next)

#2 @nacin
9 years ago

Hi Elliott, thanks for stopping by! Sounds good to us. We'll want to due some due diligence on this endpoint and make sure it always returns what we expect, such as when maxwidth and maxheight are all sorts of values (in particular, we set a super tall maxheight in WP), proper handling when they are not integers, etc.

I'm having trouble tracking down an announcement post or developer documentation for this endpoint. Could you share?

For reference, here's the guidelines we usually use when adding oEmbed endpoints: Obviously, adding Tumblr is a given, and you don't need to go through that checklist to justify it. For established services, the only bullet point I ever worry about is:

Is its oEmbed endpoint clearly established and properly documented? Sometimes, they are just a developer’s pet project that may not be supported.)

#3 @elliottcarlson
9 years ago

Hi nacin;

We will be releasing the documentation for this sometime this week - it's currently in pre-release mode with a few established publishers (though it's not a secret that we are supporting this - hence the ticket). I will be more than happy to follow up with a link to the published documentation once it has been approved via editorial.



Last edited 9 years ago by elliottcarlson (previous) (diff)

#4 @DrewAPicture
9 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.2

#5 @wonderboymusic
9 years ago

@elliottcarlson - any news? I will do some searching for it online, but drop some links if you have them, please.

#6 follow-up: @wonderboymusic
9 years ago

  • Endpoint works over HTTP and HTTPS
  • Tumblr URLs work as HTTP or HTTPS
  • Supports json as format, does not support xml
  • Ignores maxwidth and maxheight but...
  • Resulting HTML is responsive (at least in 2014 and 2015 themes)

#8 @wonderboymusic
9 years ago

In 31630:

Add oEmbed support for Tumblr.

Props elliottcarlson.
See #31180.

#9 @DrewAPicture
9 years ago

Added Tumblr to the Embeds article in the Codex as "Coming in 4.2".

#10 @wonderboymusic
9 years ago

  • Resolution set to fixed
  • Status changed from new to closed

#11 in reply to: ↑ 6 ; follow-up: @johnbillion
9 years ago

Replying to wonderboymusic:

  • Tumblr URLs work as HTTP or HTTPS

Sure about that? I can't get any Tumblr site (apart from the dashboard at www.) to load over HTTPS.

@elliottcarlson: Are there any plans to enable HTTPS for Tumblr subdomains?

#12 in reply to: ↑ 11 @johnbillion
9 years ago

Replying to johnbillion:

Replying to wonderboymusic:

  • Tumblr URLs work as HTTP or HTTPS

Sure about that? I can't get any Tumblr site (apart from the dashboard at www.) to load over HTTPS.

Sorry I just realised you meant the endpoint works with HTTP or HTTPS URLs, which is correct.

This ticket was mentioned in Slack in #core by netweb. View the logs.

9 years ago

Note: See TracTickets for help on using tickets.