Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Add a WordPress credit block pattern and load it in the template.
Browse files Browse the repository at this point in the history
  • Loading branch information
jffng committed Oct 12, 2021
1 parent 82114d0 commit e12439e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions block-template-parts/footer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- wp:group {"align":"wide","style":{"spacing":{"padding":{"bottom":"max(1.25rem, 5vw)","top":"8rem","right":"max(1.25rem, 5vw)","left":"max(1.25rem, 5vw)"}}},"layout":{"type":"flex","justifyContent":"space-between"}} -->
<div class="wp-block-group alignwide" style="padding-top:8rem;padding-right:max(1.25rem, 5vw);padding-bottom:max(1.25rem, 5vw);padding-left:max(1.25rem, 5vw)"><!-- wp:site-title {"level":0} /-->

<!-- wp:paragraph {"align":"right"} -->
<p class="has-text-align-right">Proudly Powered by <a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
<!-- /wp:paragraph --></div>
<!-- wp:pattern {"slug":"twentytwentytwo/wordpress-credit"} /-->

</div>
<!-- /wp:group -->
1 change: 1 addition & 0 deletions inc/block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function twentytwentytwo_register_block_patterns() {
'header-centered-logo-in-navigation',
'header-centered-title-navigation-social',
'header-title-and-button',
'wordpress-credit',
);

foreach ( $block_patterns as $block_pattern ) {
Expand Down
12 changes: 12 additions & 0 deletions inc/patterns/wordpress-credit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
/**
* WordPress Credit block pattern
*
*/
return array(
'title' => __( 'WordPress Credit', 'twentytwentytwo' ),
'categories' => array( 'twentytwentytwo' ),
'content' => '<!-- wp:paragraph {"align":"right"} -->
<p class="has-text-align-right">' . __( 'Proudly powered by ', 'twentytwentytwo' ) . '<a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
<!-- /wp:paragraph -->'
);

0 comments on commit e12439e

Please sign in to comment.