Last active
May 18, 2023 03:45
-
-
Save wolfcoder/d08705a5c1c718eba71a54c9c491e35b to your computer and use it in GitHub Desktop.
sample guttenberg block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { registerBlockType } = wp.blocks; | |
registerBlockType( 'my-plugin/hello-world', { | |
title: 'Hello World', | |
icon: 'smiley', | |
category: 'common', | |
edit: () => { | |
return ( | |
<p>Hello World!</p> | |
); | |
}, | |
save: () => { | |
return ( | |
<p>Hello World!</p> | |
); | |
}, | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment