Skip to content

Instantly share code, notes, and snippets.

@wolfcoder
Last active May 18, 2023 03:45

Revisions

  1. wolfcoder renamed this gist May 18, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. wolfcoder created this gist May 18, 2023.
    17 changes: 17 additions & 0 deletions php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    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>
    );
    },
    } );