From d460ea3633b3307097c6c892b060987fa9dae99f Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 11 Apr 2019 20:24:53 -0700 Subject: [PATCH 1/2] Add clarification around functions used Adds addition information specifying the registerBlockType, and createBlock functions come from wp-blocks package and links to the full documentation. --- .../developers/block-api/block-registration.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/designers-developers/developers/block-api/block-registration.md b/docs/designers-developers/developers/block-api/block-registration.md index f4a214b741fbe..c25d66a84d0b7 100644 --- a/docs/designers-developers/developers/block-api/block-registration.md +++ b/docs/designers-developers/developers/block-api/block-registration.md @@ -1,10 +1,10 @@ -# Block Registration +# Block Registration ## `register_block_type` * **Type:** `Function` -Every block starts by registering a new block type definition. The function `registerBlockType` takes two arguments, a block `name` and a block configuration object. +Every block starts by registering a new block type definition. To register, you use the `registerBlockType` function from the [`wp-blocks` package](/packages/blocks/README.md#registerBlockType). The function takes two arguments, a block `name` and a block configuration object. ### Block Name @@ -174,7 +174,7 @@ attributes: { Transforms provide rules for what a block can be transformed from and what it can be transformed to. A block can be transformed from another block, a shortcode, a regular expression, a file or a raw DOM node. -For example, a paragraph block can be transformed into a heading block. +For example, a paragraph block can be transformed into a heading block. This uses the `createBlock` function from the [`wp-blocks` package](/packages/blocks/README.md#createBlock) {% codetabs %} {% ES5 %} From bc5422ca747dce262fa62ff790cea934393fb192 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 11 Apr 2019 21:02:59 -0700 Subject: [PATCH 2/2] Whitespace in title --- docs/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manifest.json b/docs/manifest.json index fbaa1039cf678..4a7815af08489 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -30,7 +30,7 @@ "parent": "developers" }, { - "title": "Block Registration ", + "title": "Block Registration", "slug": "block-registration", "markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/block-api/block-registration.md", "parent": "block-api"