{"id":14726,"date":"2020-07-23T20:46:33","date_gmt":"2020-07-23T18:46:33","guid":{"rendered":"https:\/\/www.zylstra.org\/blog\/?p=14726"},"modified":"2021-01-19T11:26:03","modified_gmt":"2021-01-19T10:26:03","slug":"14726","status":"publish","type":"post","link":"https:\/\/www.zylstra.org\/blog\/2020\/07\/14726\/","title":{"rendered":""},"content":{"rendered":"<p>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 <a href=\"https:\/\/bonn.social\/@VictorVenema\/104563425633573825\">message by Victor Venema<\/a> saying pasting a Toot&#8217;s URL into your WordPress makes it display as embed. <\/p>\n<p>So I tried it myself with his message. That didn&#8217;t work as the URL he&#8217;s on, bonn.social &#8216;doesn&#8217;t allow it to be embedded in another page&#8217;. So that is something else I learned, apparantly you can make that happen from your server.<br \/>\nThen tried it with a <a href=\"https:\/\/m.tzyl.nl\/@ton\/104562254090331904\">Toot by myself<\/a>.<\/p>\n<p>https:\/\/m.tzyl.nl\/@ton\/104562254090331904<\/p>\n<p>that just shows the URL, so apparantly not recognised as a Mastodon instance. <\/p>\n<p>Then I tried another one, simply pasting <code>https:\/\/cybur.nl\/@systeemkabouter\/104564177512563566<\/code> into WordPress shows as an embed:<\/p>\n<p>https:\/\/cybur.nl\/@systeemkabouter\/104564177512563566<\/p>\n<p>It&#8217;s a much bigger area than needed, but it shows as an embed.<\/p>\n<p>If I do the same with a Tweet, pasting <code>https:\/\/twitter.com\/ton_zylstra\/status\/1052631885489287168<\/code> it shows not as an embed, but as a block-quote for me.<\/p>\n<p>https:\/\/twitter.com\/ton_zylstra\/status\/1052631885489287168<\/p>\n<p>A search on wordpress.org suggests it&#8217;s because I have tracker blockers in my browser, causing it to be shown as block quote (Mastodon messages don&#8217;t come with trackers), and if I wouldn&#8217;t block trackers it would show as an embed.<\/p>\n<p>I didn&#8217;t know WordPress does this type of parsing. Not sure what I think of it even, but it&#8217;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 <a href=\"https:\/\/wordpress.org\/support\/article\/embeds\/\">WordPress documentation on this<\/a>, and <a href=\"https:\/\/oembed.com\/\">oEmbed.com<\/a>]<\/p>\n<p>Curious to see how it ends up in the RSS feed as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;s URL into your WordPress makes it display as embed. So I tried it myself with his message. That didn&#8217;t work as the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"categories":[1347],"tags":[],"class_list":["post-14726","post","type-post","status-publish","format-standard","category-rss-only","no-title","h-entry","hentry"],"archive_meta":{"categories":["RSS Only"],"tags":[],"page_categories":[],"format":null,"kind":null,"ref":null},"_links":{"self":[{"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/posts\/14726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/comments?post=14726"}],"version-history":[{"count":22,"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/posts\/14726\/revisions"}],"predecessor-version":[{"id":15606,"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/posts\/14726\/revisions\/15606"}],"wp:attachment":[{"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/media?parent=14726"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/categories?post=14726"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zylstra.org\/blog\/wp-json\/wp\/v2\/tags?post=14726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}