Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default value of enableCustomFields to undefined #33931

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

@mreishus
Copy link
Contributor

@mreishus mreishus commented Aug 6, 2021

Problem

When using a plugin to disable Custom Fields in the post editor, WordPress attempts to change $editor_settings to tell Gutenberg not to render the Custom Fields settings toggle in a preferences modal. However, Gutenberg is listening for a value that is impossible to send in PHP, and the settings toggle remains visible even when the feature itself is disabled.

This change makes it so when PHP uses unset() to not send a value, then undefined is the value, allowing the field to be hidden.

Steps to reproduce and more context

Please see #33912. This is tackling the same problem but in a different way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant