1. import { registerPlugin } from '@wordpress/plugins';
  2. import { PluginMoreMenuItem } from '@wordpress/editor';
  3. import { image } from '@wordpress/icons';
  4. const MyButtonMoreMenuItemTest = () => (
  5. <PluginMoreMenuItem
  6. icon={ image }
  7. onClick={ () => {
  8. alert( 'Button Clicked' );
  9. } }
  10. >
  11. More Menu Item
  12. </PluginMoreMenuItem>
  13. );
  14. registerPlugin( 'more-menu-item-test', { render: MyButtonMoreMenuItemTest } );

@

位置

位置