Skip to content

Add Threads embed block variation#76502

Draft
pestevez wants to merge 1 commit intoWordPress:trunkfrom
pestevez:add/threads-embed-variation
Draft

Add Threads embed block variation#76502
pestevez wants to merge 1 commit intoWordPress:trunkfrom
pestevez:add/threads-embed-variation

Conversation

@pestevez
Copy link
Copy Markdown

@pestevez pestevez commented Mar 13, 2026

What?

Adds Threads as an embed block variation, allowing users to embed Threads posts directly from the block inserter.

Note: This PR depends on Threads being registered as an oEmbed provider in WordPress Core. Threads pages do not include oEmbed discovery <link> tags, so the embed will only resolve once the Core change lands. See: Core Trac ticket / PR.

Why?

Threads recently updated their oEmbed API to drop the access token requirement, making tokenless embedding possible.

This brings Threads in line with other social platforms that already have embed block variations.

How?

  • Added embedThreadsIcon to icons.js using the same SVG path already used by the social-link Threads icon
  • Added a Threads variation to variations.js with URL patterns supporting both threads.com and threads.net domains
  • Supported URL formats:
    • https://www.threads.com/@{username}/post/{shortcode}
    • https://www.threads.com/t/{shortcode}

Testing Instructions

  1. Ensure Threads is registered as an oEmbed provider in Core (or apply the patch from [Core PR link])
  2. Create a new post
  3. Open the block inserter (/) and search for "Threads"
  4. The Threads embed block should appear with its icon
  5. Add the block and paste a Threads URL (e.g. https://www.threads.com/@zuck/post/C1234567890)
  6. Verify the embed resolves and renders

Testing Instructions for Keyboard

  1. Press / to open the block inserter
  2. Type "Threads" and press Enter to select the Threads embed block
  3. Paste a Threads URL into the URL field and press Enter
  4. Verify the embed preview loads

Screenshots or screencast

Before After
image
image
No Threads option in embed blocks image

Use of AI Tools

Created using Claude Code (Opus 4.6).

@github-actions github-actions bot added the [Package] Block library /packages/block-library label Mar 13, 2026
@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @pestevez.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: pestevez.


To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Mar 13, 2026
@github-actions
Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @pestevez! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@pestevez pestevez marked this pull request as draft March 14, 2026 00:02
@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. [Block] Embed Affects the Embed Block labels Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Embed Affects the Embed Block First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants