wordpress-develop/tests/phpunit/data/themedir1/block-theme-with-hooked-blocks/patterns/footer-default.php
Greg Ziółkowski d7c3092054 Tests: Cover Block Hooks integration with a custom block theme
Adds a simplified version of Twenty Twenty-Three theme that helps testing Block Hooks integration. The theme contains:

- The required index.html template.
- The optional single.html template used with tests.
- 3 template parts where two of them reference patterns.
- 3 patterns referenced in the templates and the template parts.

New tests automatically register 4 custom blocks with the test theme where each of them hooks into another block using all four target relative positions: `before`, `after`, `firstChild`, `lastChild`.

The tests verify that the block gets hooked into the correct positions when targeting:

- template
- template part
- pattern

Props ockham, costdev.
See #59313, #59383.
Follow-up [56610].


git-svn-id: https://develop.svn.wordpress.org/trunk@56759 602fd350-edb4-49c9-b593-d223f7449a82
2023-10-03 08:27:51 +00:00

29 lines
845 B
PHP

<?php
/**
* Title: Default Footer
* Slug: block-theme-with-hooked-blocks/footer-default
* Categories: footer
* Block Types: core/template-part/footer
*/
?>
<!-- wp:group {"layout":{"type":"constrained"}} -->
<div class="wp-block-group">
<!-- wp:group {"align":"wide","layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide">
<!-- wp:site-title {"level":0} /-->
<!-- wp:paragraph {"align":"right"} -->
<p class="has-text-align-right">
<?php
printf(
/* Translators: WordPress link. */
esc_html__( 'Proudly powered by %s', 'block-theme-with-hooked-blocks' ),
'<a href="' . esc_url( __( 'https://wordpress.org', 'block-theme-with-hooked-blocks' ) ) . '" rel="nofollow">WordPress</a>'
)
?>
</p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
</div>
<!-- /wp:group -->