Directory

Fixes block variable name in template.php by bacoords · Pull Request #252 · WordPress/gutenberg-examples · GitHub
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

Fixes block variable name in template.php #252

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

bacoords
Copy link
Contributor

The Block Instance variable available in the render template of a dynamic block is just $block not $block_instance. This PR closes #247

Reference: https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#render

Copy link
Contributor

@ryanwelcher ryanwelcher left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for putting this together.

@ryanwelcher ryanwelcher merged commit 3cbd1d0 into WordPress:trunk Aug 29, 2023
4 checks passed
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.

Dynamic block PHP template should use $block instead $block_instance
2 participants