Skip to content

Commit

Permalink
Docs: Remove superfluous sentence in create block tutorial (#30062)
Browse files Browse the repository at this point in the history
* Remove superfluous sentence in docs

* Rewrite "I" usage
  • Loading branch information
ribaricplusplus authored Mar 22, 2021
1 parent 22c1103 commit a5395f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/getting-started/tutorials/create-block/block-anatomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

At its simplest, a block in the WordPress block editor is a JavaScript object with a specific set of properties.

**Note:** Block development uses ESNext syntax, this refers to the latest JavaScript standard. If this is unfamiliar, I recommend reviewing the [ESNext syntax documentation](/docs/how-to-guides/javascript/esnext-js.md) to familiarize yourself with the newer syntax used in modern JavaScript development.
**Note:** Block development uses ESNext syntax, this refers to the latest JavaScript standard. If this is unfamiliar, review the [ESNext syntax documentation](/docs/how-to-guides/javascript/esnext-js.md) to familiarize yourself with the newer syntax used in modern JavaScript development.

Here is the complete code for registering a block:

Expand Down Expand Up @@ -41,7 +41,7 @@ The **title** is the title of the block shown in the Inserter.

The **icon** is the icon shown in the Inserter. The icon property expects any Dashicon name as a string, see [list of available icons](https://developer.wordpress.org/resource/dashicons/). You can also provide an SVG object, but for now it's easiest to just pick a Dashicon name.

The **category** specified is a string and must be one of: "common, formatting, layout, widgets, or embed". You can create your own custom category name, [see documentation for details](/docs/reference-guides/filters/block-filters.md#managing-block-categories). For this tutorial, I specified "widgets" as the category.
The **category** specified is a string and must be one of: "common, formatting, layout, widgets, or embed". You can create your own custom category name, [see documentation for details](/docs/reference-guides/filters/block-filters.md#managing-block-categories).

The last two block object properties are **edit** and **save**, these are the key parts of a block. Both properties should be defined as functions.

Expand Down

0 comments on commit a5395f8

Please sign in to comment.