Fix: Converting video shortcode results in empty block #16588
Merged
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
Fixes: #15869
The shortcode to video transform was not handling the file type shortcode attributes as a possible source so the video shortcodes ended up being transformed into an empty video block.
This PR makes the transform handle all file type attributes documented in https://wordpress.org/support/article/video-shortcode/.
How has this been tested?
I added a class block.
I used the insert media button to insert an mp4 video.
I used the covert to blocks option.
I verified the video block works as expected (on master it is converted to an empty video block).