Ensure Hello Dolly plugin text doesn't overlap the widgets screen UI #30729
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
Consolidates both classes necessary (
block-editor-page
andwp-embed-responsive
) into one function to add required admin body classes for the new Widgets editor,gutenberg_widgets_editor_add_admin_body_classes()
.Only calls
add_filter()
when widgets editor page is being loaded.Closes: #26219
How has this been tested?
Tested manually with Hello Dolly in
wp-env
, along with existing automated tests withnpm run test
.Screenshots
One of the issues this fixes is Hello Dolly text being overlapped by the editor:
Before:
After:
Types of changes
Primarily a bug fix to resolve the Hello Dolly issue above, but includes behavior changes.
block-editor-page
is added to the new Widgets screen, which would mean styles targeted to that class will now be applied.Changes the way the
wp-embed-responsive
class is added, as it is now only added when the widget page is loaded, instead of adding it to every admin page. I believe this is what was intended, based on the previous function's wording.As part of this, an existing function,
gutenberg_widgets_editor_add_responsive_embed_body_class
is removed in favor ofgutenberg_widgets_editor_add_admin_body_classes
to add both classes.Checklist:
*.native.js
files for terms that need renaming or removal).