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

Block Bindings API/UI: Don't show post meta fields that start with an underscore _ #64575

Closed
bacoords opened this issue Aug 16, 2024 · 3 comments · Fixed by #64618
Closed

Block Bindings API/UI: Don't show post meta fields that start with an underscore _ #64575

bacoords opened this issue Aug 16, 2024 · 3 comments · Fixed by #64618
Assignees
Labels
[Feature] Block bindings [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@bacoords
Copy link
Contributor

What problem does this address?

It's a precedent that post meta fields starting with an underscore are "hidden" and don't show up in the regular Custom Fields UI. Feels like they shouldn't show up in the new Block Bindings UI either:

https://developer.wordpress.org/reference/functions/add_post_meta/#comment-467
Screenshot 2024-08-16 at 8 08 58 AM

What is your proposed solution?

Only show post meta fields that don't start with an underscore.

Related Conversation: #64570 (comment)

@justintadlock
Copy link
Contributor

It would be correct to hide post meta with keys that begin with an underscore. These are considered "private" meta keys and should never appear in admin UIs: https://developer.wordpress.org/plugins/metadata/managing-post-metadata/#hidden-custom-fields

@justintadlock justintadlock added [Type] Bug An existing feature does not function as intended and removed [Type] Enhancement A suggestion for improvement. labels Aug 16, 2024
@cbravobernal cbravobernal self-assigned this Aug 19, 2024
@cbravobernal
Copy link
Contributor

I'll take this one.

@cbravobernal
Copy link
Contributor

It is solved with a temporary fix, but we should move that logic to the server as mentioned here: #64618 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block bindings [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants