Skip to content

Docs: Add post meta limitations to Block Bindings API docs #68583

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

Conversation

himanshupathak95
Copy link
Contributor

@himanshupathak95 himanshupathak95 commented Jan 10, 2025

Closes: #68574

What?

Add documentation about post-meta limitations in the Block Bindings API documentation, specifically covering protected meta and REST API requirements.

Why?

The current Block Bindings documentation doesn't mention important limitations regarding post-meta usage. Developers need to know upfront that:

  • Protected post meta (prefixed with underscore) cannot be used
  • Post meta must be available via REST API

How?

Add a callout alert section in docs/reference-guides/block-api/block-bindings.md before the "Compatible blocks and their attributes" section. The callout follows the existing documentation style and alerts about both limitations clearly.

Testing Instructions

  • Navigate to /docs/reference-guides/block-api/block-bindings.md
  • Find the new callout alert added before "Compatible blocks and their attributes" section
  • Verify the content clearly explains both limitations

@himanshupathak95 himanshupathak95 force-pushed the docs/add-block-bindings-post-meta-limitations branch from 694f450 to eb44ac7 Compare January 16, 2025 07:21
@himanshupathak95 himanshupathak95 marked this pull request as ready for review January 16, 2025 07:21
Copy link

github-actions bot commented Jan 16, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: andreawetzel <awetz583@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@Mamaduka Mamaduka left a comment

Choose a reason for hiding this comment

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

Thank you, @himanshupathak95!

Maybe we should move the callout below the meta registration example in this section: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-bindings/#server-registration.

What do you think?

@himanshupathak95
Copy link
Contributor Author

Maybe we should move the callout below the meta registration example in this section:
What do you think?

I think that would make much more sense and look better. Thanks for the suggestion :)

@himanshupathak95 himanshupathak95 force-pushed the docs/add-block-bindings-post-meta-limitations branch from d13d681 to 2f88a13 Compare April 16, 2025 07:50
@himanshupathak95
Copy link
Contributor Author

Failing tests are unrelated; I will look into it.

@Mamaduka Mamaduka merged commit 3aed304 into WordPress:trunk Apr 16, 2025
41 of 59 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.8 milestone Apr 16, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…#68583)

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: andreawetzel <awetz583@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bindings documentation does not mention limitation of protected post meta
3 participants