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

Merged
merged 4 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions packages/edit-post/src/components/preferences-modal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,12 @@ export default function PreferencesModal() {
/>
</PageAttributesCheck>
</Section>
<Section
<MetaBoxesSection
title={ __( 'Additional' ) }
description={ __(
'Add extra areas to the editor.'
) }
>
<MetaBoxesSection />
</Section>
/>
</>
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,10 @@ exports[`PreferencesModal should match snapshot when the modal is active small v
/>
</PageAttributesCheck>
</Section>
<Section
<WithSelect(MetaBoxesSection)
description="Add extra areas to the editor."
title="Additional"
>
<WithSelect(MetaBoxesSection) />
</Section>
/>
</NavigationItem>
</NavigationMenu>
</Navigation>
Expand Down
8 changes: 6 additions & 2 deletions packages/editor/src/store/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export const PREFERENCES_DEFAULTS = {
* allowedBlockTypes boolean|Array Allowed block types
* richEditingEnabled boolean Whether rich editing is enabled or not
* codeEditingEnabled boolean Whether code editing is enabled or not
* enableCustomFields boolean Whether the WordPress custom fields are enabled or not
* enableCustomFields boolean Whether the WordPress custom fields are enabled or not.
* true = the user has opted to show the Custom Fields panel at the bottom of the editor.
* false = the user has opted to hide the Custom Fields panel at the bottom of the editor.
* undefined = the current environment does not support Custom Fields,
getsource marked this conversation as resolved.
Show resolved Hide resolved
* and the user doesn't see the option toggle.
* autosaveInterval number Autosave Interval
* availableTemplates array? The available post templates
* disablePostFormats boolean Whether or not the post formats are disabled
Expand All @@ -27,6 +31,6 @@ export const EDITOR_SETTINGS_DEFAULTS = {

richEditingEnabled: true,
codeEditingEnabled: true,
enableCustomFields: false,
enableCustomFields: undefined,
supportsLayout: true,
};