#31180 closed enhancement (fixed)
Add tumblr.com oEmbed support
Reported by: | elliottcarlson | Owned by: | |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Embeds | Keywords: | has-patch |
Focuses: | Cc: |
Description
Tumblr has recently added functionality for embedding posts on third party sites.
This patch adds https://www.tumblr.com/oembed/1.0
as the oEmbed endpoint for URLs matching the http://*.tumblr.com/post/*
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)
Change History (14)
#1
@
10 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\.)?thecodinglove.com/post/\d+/\S+#i', 'http://www.tumblr.com/oembed/1.0', 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.
#2
@
10 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: https://make.wordpress.org/core/handbook/design-decisions/#whitelisting-oembed-providers. 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
@
10 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.
Thanks!
Elliott
#5
@
10 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:
↓ 11
@
10 years ago
- Endpoint works over HTTP and HTTPS
- Tumblr URLs work as HTTP or HTTPS
- Supports
json
asformat
, does not supportxml
- Ignores
maxwidth
andmaxheight
but... - Resulting HTML is responsive (at least in 2014 and 2015 themes)
#7
@
10 years ago
Video of responsive:
https://wordpress.slack.com/files/wonderboymusic/F03TP3ZFB/tumblr.mov
#11
in reply to:
↑ 6
;
follow-up:
↓ 12
@
10 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
@
10 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.
Patch file