Skip to content

Commit

Permalink
Fix/plugin document setting panel docs (#16620)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Welcher authored and youknowriad committed Jul 26, 2019
1 parent b8df976 commit fc0b94b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/designers-developers/developers/slotfills/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function PostStatus( { isOpened, onTogglePanel } ) {
There are currently seven available SlotFills in the `edit-post` package. Please refer to the individual items below for usage and example details:

* [PluginBlockSettingsMenuItem](./plugin-block-settings-menu-item.md)
* [PluginDocumentSettingPanel](./plugin-document-setting-panel.md)
* [PluginMoreMenuItem](./plugin-more-menu-item.md)
* [PluginPostPublishPanel](./plugin-post-publish-panel.md)
* [PluginPostStatusInfo](./plugin-post-status-info.md)
Expand Down
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' } );
```
6 changes: 6 additions & 0 deletions docs/manifest-devhub.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@
"markdown_source": "../docs/designers-developers/developers/slotfills/plugin-block-settings-menu-item.md",
"parent": "slotfills"
},
{
"title": "PluginDocumentSettingPanel",
"slug": "plugin-document-setting-panel",
"markdown_source": "../docs/designers-developers/developers/slotfills/plugin-document-setting-panel.md",
"parent": "slotfills"
},
{
"title": "PluginMoreMenuItem",
"slug": "plugin-more-menu-item",
Expand Down
1 change: 1 addition & 0 deletions docs/toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
] },
{"docs/designers-developers/developers/slotfills/README.md": [
{ "docs/designers-developers/developers/slotfills/plugin-block-settings-menu-item.md": [] },
{ "docs/designers-developers/developers/slotfills/plugin-document-setting-panel.md": [] },
{ "docs/designers-developers/developers/slotfills/plugin-more-menu-item.md": [] },
{ "docs/designers-developers/developers/slotfills/plugin-post-publish-panel.md": [] },
{ "docs/designers-developers/developers/slotfills/plugin-post-status-info.md": [] },
Expand Down

0 comments on commit fc0b94b

Please sign in to comment.