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

Bindings documentation does not mention limitation of protected post meta #68574

Open
andreawetzel opened this issue Jan 9, 2025 · 0 comments · May be fixed by #68583
Open

Bindings documentation does not mention limitation of protected post meta #68574

andreawetzel opened this issue Jan 9, 2025 · 0 comments · May be fixed by #68583

Comments

@andreawetzel
Copy link

The block bindings documentation should note that post meta values that begin with an underscore cannot be used in the Block Bindings API. It also mention that the post meta must be available via the REST API.

PR where this security measure was added: #59326

Suggested edit

## Excluded Post Meta Values

Post meta with keys that begin with an underscore (such as `_example_key`) are considered protected and cannot be used to bind to a core block.

Also, post meta that is unavailable through the REST API cannot be used in the Block Bindings API.

Documentation URL: https://developer.wordpress.org/block-editor/reference-guides/block-api/block-bindings/
Github URL: https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-bindings.md

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

Successfully merging a pull request may close this issue.

3 participants