Interesting how WordPress treats Instagram posts, Twitter messages and Mastodon messages if you just paste in the URL in a posting. It started with a message by Victor Venema saying pasting a Toot’s URL into your WordPress makes it display as embed.
So I tried it myself with his message. That didn’t work as the URL he’s on, bonn.social ‘doesn’t allow it to be embedded in another page’. So that is something else I learned, apparantly you can make that happen from your server.
Then tried it with a Toot by myself.
https://m.tzyl.nl/@ton/104562254090331904
that just shows the URL, so apparantly not recognised as a Mastodon instance.
Then I tried another one, simply pasting https://cybur.nl/@systeemkabouter/104564177512563566
into WordPress shows as an embed:
It’s a much bigger area than needed, but it shows as an embed.
If I do the same with a Tweet, pasting https://twitter.com/ton_zylstra/status/1052631885489287168
it shows not as an embed, but as a block-quote for me.
Are you on #Mastodon? Find me at https://t.co/O0ifvedQcq #fediverse #decentralized #activitypub
— Ton Zijlstra (@ton_zylstra) October 17, 2018
A search on wordpress.org suggests it’s because I have tracker blockers in my browser, causing it to be shown as block quote (Mastodon messages don’t come with trackers), and if I wouldn’t block trackers it would show as an embed.
I didn’t know WordPress does this type of parsing. Not sure what I think of it even, but it’s an interesting behaviour.[Update 24-7-2020: As pointed out in the comments, it is oEmbed, a way to embed material without having to copy and paste the HTML for it. WordPress has an internal allow-list for which sources can be embedded. Sources would need an oEmbed API endpoint.See WordPress documentation on this, and oEmbed.com]
Curious to see how it ends up in the RSS feed as well.
If you wanna know more go read about oEmbed: https://oembed.com/ ;)h
Ah, it’s oEmbed. Thank you for that, didn’t know.