/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/create-block/lib/templates/block/render.php.mustache
17 строк
614 B
Benoît Chantre
Create block: update DocBlock with exposed variables for render.php templates (#72086)
16 окт 2025, 20:08
Не верифицирован
16 окт 2025, 20:08
a466c51
Код
Авторство
О чём код?
{{#isDynamicVariant}} <?php /** * PHP file to use when rendering the block type on the server to show on the front end. * * The following variables are exposed to the file: * $attributes (array): The block attributes. * $content (string): The block default content. * $block (WP_Block): The block instance. * * @see https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md#render */ ?> <p <?php echo get_block_wrapper_attributes(); ?>> <?php esc_html_e( '{{title}} – hello from a dynamic block!', '{{textdomain}}' ); ?> </p> {{/isDynamicVariant}}