Skip to content

Instantly share code, notes, and snippets.

@igmoweb
Created May 1, 2020 13:31
Show Gist options
  • Save igmoweb/63875c16995bc3bbed7fb843362911f0 to your computer and use it in GitHub Desktop.
Save igmoweb/63875c16995bc3bbed7fb843362911f0 to your computer and use it in GitHub Desktop.
const { registerPlugin } = wp.plugins;
const { PluginDocumentSettingPanel } = wp.editPost;
const PANEL_NAME = 'my-panel';
const Render = () => (
<PluginDocumentSettingPanel
name="custom-setting-panel"
title="Custom Panels"
className="custom-panel"
>
Custom WP Gutenberg Plugin Panel Content
</PluginDocumentSettingPanel>
);
registerPlugin( PANEL_NAME, {
render: Render,
icon: 'palmtree',
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment