WordPress / gutenberg-examples

Examples for extending WordPress/Gutenberg with blocks.
1.2k stars 316 forks source link

Dynamic block PHP template should use $block instead $block_instance #247

Closed bacoords closed 1 year ago

bacoords commented 1 year ago

Re: blocks-jsx/10-dynamic-block/template.php

I had an issue when accessing the variable $block_instance as shown in this example. After reviewing the docs, I believe that the variable should just be called $block.

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