-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 a panel from the settings? #6225
Comments
Let's consolidate in #6533 |
This has been closed, so is there any solution how to remove the panel of the post tags? |
You can do the following as of today: var el = wp.element.createElement;
function removeCategoryPanel( OriginalComponent ) {
return function( props ) {
if ( props.slug === 'category' ) {
return null
} else {
return el(
OriginalComponent,
props
);
}
}
};
wp.hooks.addFilter(
'editor.PostTaxonomyType',
'my-custom-plugin',
removeCategoryPanel
); Howeve it won't remove the panel's title. I will have a look tomorrow and find out if that is easy to do. |
There's an API used in the options panel to hide these panels, I think we can just use it here? |
I have PR almost ready which adds another flag. The issue with the existing action is that you still would be able to enable it back using Options modal. My change will put the editor in the following state: |
A Question from camthor in the support forum:
Source: https://wordpress.org/support/topic/how-to-programatically-remove-a-panel-from-the-settings/
The text was updated successfully, but these errors were encountered: