[wp-trac] [WordPress Trac] #56733: oEmbed: Add support for Tumblr reader URLs
WordPress Trac
noreply at wordpress.org
Wed Oct 19 21:12:11 UTC 2022
#56733: oEmbed: Add support for Tumblr reader URLs
------------------------------------+-----------------------
Reporter: pento | Owner: pento
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.1
Component: Embeds | Version: 6.1
Severity: normal | Resolution:
Keywords: has-patch dev-reviewed | Focuses:
------------------------------------+-----------------------
Changes (by Bernhard Reiter):
* keywords: has-patch needs-review needs-testing => has-patch dev-reviewed
Comment:
I've tested the
[https://core.trac.wordpress.org/attachment/ticket/56733/56733.2.diff
updated patch]. Note that WordPress caches oEmbeds (in the corresponding
post’s post meta), so we’re taking that into account in the following
instructions.
On `trunk`:
- Create a new post.
- Switch to the Code Editor (this is to prevent oEmbed expansion in the
Visual Editor, which is handled separately but might prime the cache).
- Insert two Tumblr URLs in separate formats, e.g.
- https://photomatt.tumblr.com/post/696629352701493248/why-go-nuts-show-
nuts-doesnt-work-in-2022 and
- https://www.tumblr.com/photomatt/696629352701493248/why-go-nuts-show-
nuts-doesnt-work-in-2022
- Do ''not'' switch back to the Visual Editor. Instead, publish the post
directly from the Code Editor.
- View the post.
You should see the first URL properly expanded into the tumblr post’s
oEmbed, but the second one un-expanded (just the URL).
- Write down the post ID. We’ll refer to it as YOUR_POST_ID in the
following.
- In your terminal, verify that the post has oEmbed data cached in its
post meta:
{{{
npm run env:cli post meta list YOUR_POST_ID
}}}
- You should see a post meta table with a few entries starting with
`_oembed_`. Something like
{{{
+---------+-----------------------------------------------+------------------------------------------------------------------------------------------+
| post_id | meta_key | meta_value
|
+---------+-----------------------------------------------+------------------------------------------------------------------------------------------+
| 45 | _edit_lock | 1666213351:1
|
| 45 | _oembed_1c805202e7bc7384a18e9127ac66fc0a | <div class
="tumblr-post" data-
href="https://embed.tumblr.com/embed/post/vmmie3u7VrfQyfsJ |
| | |
WrijkQ/696629352701493248" data-
did="5d8c0d3a24e12f917cd50640525f7785fc206836" ><a href |
| | |
="https://photomatt.tumblr.com/post/696629352701493248/why-go-nuts-show-
nuts-doesnt-work |
| | |
-in-2022">https://photomatt.tumblr.com/post/696629352701493248/why-go-
nuts-show-nuts-doe |
| | | snt-work-
in-2022</a></div><script async
src="https://assets.tumblr.com/post.js"></script |
| | | >
|
| 45 | _oembed_time_1c805202e7bc7384a18e9127ac66fc0a | 1666213194
|
| 45 | _oembed_897442790bd8799408ee0d764e295748 | {{unknown}}
|
+---------+-----------------------------------------------+------------------------------------------------------------------------------------------+
}}}
- Now delete that post meta:
{{{
npm run env:cli "post meta delete YOUR_POST_ID --all".
}}}
- Apply the
[https://core.trac.wordpress.org/attachment/ticket/56733/56733.2.diff
patch].
- Reload the post on the frontend.
Verify that this time around, ''both'' URLs expand into their
corresponding oEmbeds.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56733#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list