From 2e0a718ae5328190f1c4f4f424849d6aadfd68a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Wrede?= Date: Fri, 6 Oct 2017 00:15:53 +0200 Subject: [PATCH] Docs: Block Configuration - Add useOnce --- docs/block-api.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/block-api.md b/docs/block-api.md index d920a43d306bc9..2795214206f560 100644 --- a/docs/block-api.md +++ b/docs/block-api.md @@ -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/).