-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix/plugin document setting panel docs (#16620)
- Loading branch information
1 parent
b8df976
commit fc0b94b
Showing
4 changed files
with
34 additions
and
0 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
26 changes: 26 additions & 0 deletions
26
docs/designers-developers/developers/slotfills/plugin-document-setting-panel.md
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,26 @@ | ||
# PluginDocumentSettingPanel | ||
|
||
This SlotFill allows registering a UI to edit Document settings. | ||
|
||
## Available Props | ||
* __name__ `string`: A string identifying the panel. | ||
* __className__ `string`: An optional class name added to the sidebar body. | ||
* __title__ `string`: Title displayed at the top of the sidebar. | ||
* __icon__ `(string|Element)`: The [Dashicon](https://developer.wordpress.org/resource/dashicons/) icon slug string, or an SVG WP element. | ||
|
||
## Example | ||
```js | ||
const { registerPlugin } = wp.plugins; | ||
const { PluginDocumentSettingPanel } = wp.editPost; | ||
|
||
const PluginDocumentSettingPanelDemo = () => ( | ||
<PluginDocumentSettingPanel | ||
name="custom-panel" | ||
title="Custom Panel" | ||
className="custom-panel" | ||
> | ||
Custom Panel Contents | ||
</PluginDocumentSettingPanel> | ||
); | ||
registerPlugin( 'plugin-document-setting-panel-demo', { render: PluginDocumentSettingPanelDemo, icon: 'palmtree' } ); | ||
``` |
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