Skip to content

Commit

Permalink
Merge pull request #2895 from Soean/patch-5
Browse files Browse the repository at this point in the history
Docs: Block Configuration - Add useOnce
  • Loading branch information
gziolo authored Oct 6, 2017
2 parents a89801b + 2e0a718 commit efaeff3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/block-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ By default, Gutenberg adds a class with the form `.wp-blocks-your-block-name` to
className: false,
```

### useOnce (optional)

* **Type:** `Bool`
* **Default:** `false`

Whether a block can only be used once per post.

```js
// Use the block just once per post
useOnce: true,
```

## Edit and Save

The `edit` and `save` functions define the editor interface with which a user would interact, and the markup to be serialized back when a post is saved. They are the heart of how a block operates, so they are [covered separately](/block-edit-save/).
Expand Down

0 comments on commit efaeff3

Please sign in to comment.