Skip to content

Docs - Clarify behavior of useOnce argument #3695

Closed

Description

@danielbachhuber

The block-api.md document makes the following statement for the useOnce argument:

Whether a block can only be used once per post.

To a Gutenberg extender, it would be helpful to know how this argument affects the behavior of the block within the editor — what does it actually do?

Activity

  1. youknowriad commented on Nov 28, 2017

    @youknowriad
    Contributor

    Maybe we should not document this property. It's only useful for the "more" block where you can only insert this block once in a post.

  2. benhuson commented on Dec 12, 2017

    @benhuson

    Could it not be useful for plugins that may want to add a block that is used just once?

    Consider a block where the data may be saved as post meta where you would only want one instance per post. For example, a subtitle block - this would differ from just a normal heading in that it would be saved as post meta so that it could be pulled an displayed separately on post archives etc.

  3. youknowriad commented on Dec 12, 2017

    @youknowriad
    Contributor

    @benhuson That's a good point 👍

    Anyone wants to PR this?

  4. added
    Good First Issue
    on Dec 12, 2017
  5. jaswrks commented on Jan 18, 2018

    @jaswrks
    Contributor

    I PR'd it, docs enhanced here: #4473

  6. added a commit that references this issue on Jan 19, 2018
  7. added a commit that references this issue on Jan 23, 2018
  8. adamsilverstein commented on Feb 15, 2018

    @adamsilverstein
    Member

    Fixed in #4473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First Issue[Type] Developer Documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions