Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Fragment = wp.element.Fragment;
- var el = wp.element.createElement;
- var __ = wp.i18n.__;
- var registerPlugin = wp.plugins.registerPlugin;
- var PluginPostPublishPanel = wp.editPost.PluginPostPublishPanel;
- var PluginPrePublishPanel = wp.editPost.PluginPrePublishPanel;
- function PanelContent() {
- return (
- el(
- 'p', {}, __( 'Here is the panel content!' ),
- )
- );
- };
- function MyPublishPlugin() {
- return (
- el( Fragment, {},
- el(
- PluginPrePublishPanel,
- {
- title: __( 'My pre publish panel' )
- },
- el( PanelContent, {} )
- ),
- el(
- PluginPostPublishPanel,
- {
- title: __( 'My post publish panel' )
- },
- el( PanelContent, {} )
- )
- )
- );
- };
- registerPlugin( 'my-publish-plugin', {
- icon: 'welcome-write-blog',
- render: MyPublishPlugin
- } );
Add Comment
Please, Sign In to add comment