Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change wording, add a second block to the template and mention block.… #16237

Closed
wants to merge 1 commit into from

Conversation

retrorism
Copy link
Contributor

…json as a resource for attributes
#6190

Description

How has this been tested?

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@gziolo gziolo added [Type] Developer Documentation Documentation for developers [Feature] Templates API Related to API powering block template functionality in the Site Editor labels Jun 22, 2019
The optional attributes that can be set vary per block type. For a quick overview of the attributes of core block type, you can often check the block type's accompanying block.json file. For example, [these lines](https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/audio/block.json#L4-L37) describe the attributes of the `core/audio` block.

**JS example:**
The following example in JavaScript creates a new custom block using [InnerBlocks](/packages/block-editor/src/components/inner-blocks/README.md) and templates. When this block is inserted, this block creates a set of blocks based off the template.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this block is inserted, it creates a set of blocks based off the template.

@@ -59,7 +67,8 @@ registerBlockType( 'myplugin/template', {
});
```

See the [Meta Block Tutorial](/docs/designers-developers/developers/tutorials/metabox/meta-block-5-finishing.md) for a full example of a template in use.
Templates are especially useful in combination with blocks that store custom post_meta to a post type. See the [Meta Block Tutorial](/docs/designers-developers/developers/tutorials/metabox/meta-block-5-finishing.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 1st sentence is a bit unclear.

@mkaz mkaz added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Apr 13, 2020
@gziolo
Copy link
Member

gziolo commented Nov 14, 2020

It looks like this PR was abandoned. I’m closing it for now. It can be reopened at any time with the refreshed code according to the feedback shared. Thank you for contribution.

@gziolo gziolo closed this Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Templates API Related to API powering block template functionality in the Site Editor [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants