[wp-trac] [WordPress Trac] #45282: Block Editor: Don't show the Custom Fields meta box option if the meta box has been removed
WordPress Trac
noreply at wordpress.org
Mon Nov 5 02:33:38 UTC 2018
#45282: Block Editor: Don't show the Custom Fields meta box option if the meta box
has been removed
--------------------------+---------------------
Reporter: pento | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.0
Component: Editor | Version: 5.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+---------------------
Changes (by pento):
* keywords: => has-patch
Old description:
> Some plugins remove the Custom Fields meta box, overriding whether the
> CPT has set the `postcustom` feature.
>
> When this is the case, the block editor Options dialog shouldn't show an
> option to display the Custom Fields meta box.
New description:
Some plugins remove the Custom Fields meta box, overriding whether the CPT
has set the `postcustom` feature.
When this is the case, the block editor Options dialog shouldn't show an
option to display the Custom Fields meta box.
Related: [https://github.com/WordPress/gutenberg/issues/11386 GB11386].
--
Comment:
[attachment:"45282.diff"] removes the `enableCustomFields` setting from
the editor settings, based on whether the Custom Fields meta box exists or
not.
It can be tested with this snippet:
{{{#!php
<?php
add_action( 'add_meta_boxes', function() {
remove_meta_box( 'postcustom', false, 'normal' );
} );
}}}
This patch requires changes in the relevant `@wordpress` package to hide
the option when `enableCustomFields` is undefined.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45282#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list