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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should add this regardlessly. It seems like we only add this if the theme supports responsive embeds in the post editor:wordpress-develop/src/wp-includes/post-template.php
Lines 784 to 786 in b1f0971
We can add this if statement here as well. WDYT?No wait, seems like it's being added here instead.
wordpress-develop/src/wp-admin/admin-header.php
Lines 192 to 194 in b1f0971
Since that every block editor will have this class in
<body>
, the fix seems reasonable.However, I don't think the editor should be relying on class names on
<body>
to work. Probably worth to fix it in gutenberg instead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current_theme_supports( 'responsive-embeds' )
only applies frontend in thebody_class()
.Seems the class is added backend if the current screen is an block editor.
wordpress-develop/src/wp-admin/admin-header.php
Lines 192 to 194 in b1f0971
--
Did a quick test adding the conditional and removed
responsive-embeds
support. In the post editor the embeds work but in the cusomtizer they didn't.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we add the class conditionally based on whether or not the block editor is being used in the Customizer?