-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extensibility: Add possibility to disable document settings panels re…
…gistered by plugins (#16900)
- Loading branch information
Showing
5 changed files
with
54 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...es/edit-post/src/components/options-modal/options/enable-plugin-document-setting-panel.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { createSlotFill } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { EnablePanelOption } from './index'; | ||
|
||
const { Fill, Slot } = createSlotFill( 'EnablePluginDocumentSettingPanelOption' ); | ||
|
||
const EnablePluginDocumentSettingPanelOption = ( { label, panelName } ) => ( | ||
<Fill> | ||
<EnablePanelOption | ||
label={ label } | ||
panelName={ panelName } | ||
/> | ||
</Fill> | ||
); | ||
|
||
EnablePluginDocumentSettingPanelOption.Slot = Slot; | ||
|
||
export default EnablePluginDocumentSettingPanelOption; |
1 change: 1 addition & 0 deletions
1
packages/edit-post/src/components/options-modal/options/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export { default as EnableCustomFieldsOption } from './enable-custom-fields'; | ||
export { default as EnablePanelOption } from './enable-panel'; | ||
export { default as EnablePluginDocumentSettingPanelOption } from './enable-plugin-document-setting-panel'; | ||
export { default as EnablePublishSidebarOption } from './enable-publish-sidebar'; | ||
export { default as EnableTipsOption } from './enable-tips'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters