Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This removes all references to the oEmbed metadata, and provides
an API based on the 'embed-parse' admin ajax action that the
classic editor uses to preview embedded content.
Some class names have changed (most notably Funny or Die) because
the provider name is now taken from the title of the block.
Previously, this came from oEmbed, but that was not reliable
as some plugins override oEmbed behaviour and do not provide
any metadata, only HTML. With this change, we are able to
define all of that data in the blocks, and not have
plugins mess things up for us unexpectedly.
How Has This Been Tested?
Create embed blocks for all tests listed in
components/sandbox/README.md
Also, embed a KickStarter URL, because these were the ones that oEmbed frequently
only returns metadata for.
Types of changes
Bug fix: for #5530
Breaking change: Existing embed blocks may have to be converted, because we've got rid of some attributes.
Video embeds are no longer responsive in the editor with this change, #5333 is required to reinstate that (and can be merged separately).