In a project we need to show/hide the author selection panel dynamically based on another option, but there are no mechanisms to do this.
Unlike the other rows in the post status panel, authorships row does not have a special classname that could be used to toggle with CSS in place of other mechanisms
In a project we need to show/hide the author selection panel dynamically based on another option, but there are no mechanisms to do this.
Unlike the other rows in the post status panel, authorships row does not have a special classname that could be used to toggle with CSS in place of other mechanisms
Luckily, there is a
className
prop on thePluginPostStatusInfo
component: https://github.com/WordPress/gutenberg/blob/3da717b8d0ac7d7821fc6d0475695ccf3ae2829f/packages/edit-post/src/components/sidebar/plugin-post-status-info/index.js#L55https://github.com/humanmade/authorship/blob/develop/src/plugin.tsx#L13 could be modified to add this prop, and we would be able to toggle the visibility of this UI without resorting to DOM hacking