Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue-12: Add oEmbed support #14

Merged
merged 7 commits into from
Feb 28, 2024
Merged

Conversation

mogmarsh
Copy link
Contributor

Description

I would like to see urls for oEmbeddable content be converted into the wp:embed block

Use Case

If a url such as https://www.instagram.com/p/CSpmSvAphdf/ is found, it will be converted into

<!-- wp:embed {"url":"https://www.instagram.com/p/CSpmSvAphdf/","type":"rich","providerNameSlug":"instagram","responsive":true} -->
<figure class="wp-block-embed is-type-rich is-provider-instagram wp-block-embed-instagram"><div class="wp-block-embed__wrapper">
https://www.instagram.com/p/CSpmSvAphdf/
</div></figure>
<!-- /wp:embed -->

wp_oembed_get should be useful to see if a url is oEmbeddable.

@mogmarsh mogmarsh marked this pull request as ready for review February 28, 2024 16:55
Copy link
Member

@kevinfodness kevinfodness left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍣

@mogmarsh mogmarsh merged commit d8b1fdd into develop Feb 28, 2024
6 checks passed
@mogmarsh mogmarsh deleted the feature/issue-12/add-oembed-support branch February 28, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants