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

Test for the targeted attribute, not the __default alias #83

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

chriszarate
Copy link
Member

Description

This commit introduced a change to parsed block bindings. It no longer provides the binding under the __default alias and instead only provides the actual targeted attribute (e.g., content for a core/paragraph block).

To be honest, this is a better result for Block Data API consumers, because they are not exposed to an alias that they would need to resolve themselves. Although, to be clear, this is all very theoretical. It is highly unlikely that any API consumers would inspect the bindings at all, which live in the metadata attribute. Almost certainly, they are only interested in the actual attribute value (e.g., content), which is unchanged.

@chriszarate chriszarate requested a review from a team as a code owner October 18, 2024 19:00
@chriszarate
Copy link
Member Author

Just a note that this test will fail for WordPress versions >= 6.6 that do not include this commit, which is currently all releases >=6.6. But those releases are not in the test matrix.

@alecgeatches
Copy link
Contributor

Thank you @chriszarate! Merging.

@alecgeatches alecgeatches merged commit 3ede143 into trunk Oct 21, 2024
4 checks passed
@alecgeatches alecgeatches deleted the fix/default-binding-content branch October 21, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants