import { __ } from '@wordpress/i18n';
import {
PluginSidebar,
} from '@wordpress/editor';
import {
PanelBody,
} from '@wordpress/components';
const TestPluginSidebar = () => (
<PluginSidebar
name="test-plugin-sidebar"
title={ __('Test Plugin Sidebar', 'your-theme-name') }
icon="paperclip"
>
<PanelBody>
...
</PanelBody>
</PluginSidebar>
);
registerPlugin('test-settings-plugin-sidebar', {
render: TestPluginSidebar,
});
2. PluginDocumentSettingPanel
import { __ } from '@wordpress/i18n';
import {
registerPlugin,
} from '@wordpress/plugins';
import {
PluginDocumentSettingPanel,
} from '@wordpress/editor';
const TestSettingPanel = () => (
<PluginDocumentSettingPanel
name="test-panel"
title={ __('Test Panel', 'your-theme-name') }
icon="paperclip"
>
...
</PluginDocumentSettingPanel>
);
registerPlugin('test-settings-panel', {
render: TestSettingPanel,
});
import { __ } from '@wordpress/i18n';
import {
InspectorControls,
} from '@wordpress/block-editor';
import {
PanelBody,
} from '@wordpress/components';