Opened 3 years ago
Closed 3 years ago
#53576 closed defect (bug) (fixed)
Remove unnecessary compatibility shim added in 5.8
Reported by: | desrosj | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | 5.8 |
Component: | Themes | Keywords: | has-patch commit dev-reviewed fixed-major |
Focuses: | Cc: |
Description
It looks like a compatibility shim from the Gutenberg plugin has accidentally made its way into Core.
The inline documentation indicates that the code block allows the plugin to work with older versions of WordPress until 5.8 is made the minimum required version. This doesn't matter in the context of WordPress because this code is being added in 5.8.
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #core-editor by desrosj. View the logs.
3 years ago
#3
@
3 years ago
- Keywords commit removed
Going to hold off committing to allow for additional context. See this thread in Slack.
#4
@
3 years ago
Hey, sorry about the late response. This code needs to remain, although the comment could be removed as it's a leftover.
This is what I've tested:
- Theme without
theme.json
support: the spacing panel is shown when the theme addsadd_theme_support( 'custom-spacing' );
, otherwise is not.
- Theme with
theme.json
andsettings.spacing.customPadding
equalstrue
: the spacing panel is shown, whether or not the theme hascustom-spacing
theme support.
- Theme with
theme.json
andsettings.spacing.customPadding
equalsfalse
: the spacing panel is not shown, whether or not the theme hascustom-spacing
theme support.
I've also tested that it can be enabled per block (disable the top-level settings.spacing.customPadding
but enable it for the core/cover
block, for example).
#5
@
3 years ago
- Owner set to desrosj
- Resolution set to fixed
- Status changed from new to closed
In 51352:
#6
@
3 years ago
- Keywords commit dev-feedback fixed-major added
- Resolution fixed deleted
- Status changed from closed to reopened
Thanks @nosolosw!
I've verified your testing steps and I'm seeing the same thing.
Conclusion: the inline comment is specific to the Gutenberg plugin, but only because the code following the notice will not be in WordPress Core until 5.8.
I've removed the inline comment in [51352] and marking for backport.
This looks good to be committed and backported