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

Remove Post Type Support not reflected in Gutenberg UI #26306

Closed
designbuildtest opened this issue Oct 20, 2020 · 2 comments
Closed

Remove Post Type Support not reflected in Gutenberg UI #26306

designbuildtest opened this issue Oct 20, 2020 · 2 comments
Labels
[Feature] Custom Fields Anything related to the custom fields project - connecting block attributes and dynamic values

Comments

@designbuildtest
Copy link

designbuildtest commented Oct 20, 2020

When I declare the below action, the "Custom fields" option is still accessible when choosing "Options" (vertical ellipsis) > "Options" > "Advanced panels".

function mytheme_remove_page_post_custom field_support() {
        remove_post_type_support( 'post', 'custom-fields' );
        remove_post_type_support( 'page', 'custom-fields' );
}
add_action( 'init', 'mytheme_remove_page_post_custom field_support' );

If I switch to the Classic Editor, this declaration is correctly honoured with all Custom fields UI removed.

Is the hook I'm using incorrect, or is this a bug?

Gutenberg version 9.1.1

remove-post-type-support-custom-fields-options-panel

@noisysocks noisysocks added [Feature] Custom Fields Anything related to the custom fields project - connecting block attributes and dynamic values Needs Testing Needs further testing to be confirmed. labels Oct 27, 2020
@skorasaurus
Copy link
Member

skorasaurus commented Dec 22, 2020

confirmed in Gutenberg 9.5.2.

(note function would be:

function mytheme_remove_page_post_custom_field_support() {
	remove_post_type_support( 'post', 'custom-fields' );
	remove_post_type_support( 'page', 'custom-fields' );
}
add_action( 'init', 'mytheme_remove_page_post_custom_field_support' );

author's post is missing an underscore in function name.

@skorasaurus skorasaurus removed the Needs Testing Needs further testing to be confirmed. label Dec 22, 2020
@jordesign
Copy link
Contributor

I'm no longer able to recreate this in WP6.3. Option to show Custom fields is no longer shown in the preferences when they're disabled for post types.

Accordingly I'll close this as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Custom Fields Anything related to the custom fields project - connecting block attributes and dynamic values
Projects
None yet
Development

No branches or pull requests

4 participants