bernhard-reiter 5a76260c3c block.json: Allow passing PHP filename as variations field.
Previously, the `variations` field in a block.json file could be used to provide a static list of the block's variations (i.e., an array). Alternatively, the block's `variation_callback` could be set during server-side block registration to point to a PHP function to generate those variations.

This changeset makes it so that the block.json `variations` field can be alternatively set to a string, which will be interpreted as the filename of a PHP file that generates the variations.

It is loosely modeled after [54132], which introduced the `render` field for `block.json`, as a way to point to a PHP file instead of providing a `render_callback`.

Props bernhard-reiter, gziolo.
Fixes #61280.

git-svn-id: https://develop.svn.wordpress.org/trunk@58801 602fd350-edb4-49c9-b593-d223f7449a82
2024-07-24 14:09:58 +00:00
..