WordPress / twentytwentytwo

Twenty Twenty-Two, the default WordPress theme that will launch with WordPress 5.9.
406 stars 91 forks source link

Update "Footer with navigation and copyright" and "Footer with social links and copyright" patterns to use the site title block #255

Closed carolinan closed 2 years ago

carolinan commented 2 years ago

Describe the bug

Could this be updated to include the site title block instead of a hard coded text? I think it would be possible now with the row block available?

<!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":"16px"}}} -->
<p class="has-text-align-center" style="font-size:16px">' . esc_html__( '© Site Title', 'twentytwentytwo' ) . '</p>
<!-- /wp:paragraph --></div>
kjellr commented 2 years ago

Technically yes it can be done this way. Here's example markup:

<!-- wp:group {"layout":{"type":"flex","justifyContent":"center","flexWrap":"wrap"}} -->
<div class="wp-block-group"><!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":"16px"}}} -->
<p class="has-text-align-center" style="font-size:16px">©</p>
<!-- /wp:paragraph -->

<!-- wp:site-title {"isLink":false,"fontSize":"small"} /--></div>
<!-- /wp:group -->

But it ends up looking wrong because the blockGap is far larger than a normal space:

Screen Shot 2021-11-19 at 10 52 08 AM

I don't think we can get that fixed without a solution to https://github.com/WordPress/gutenberg/issues/35778.

carolinan commented 2 years ago

What about using the real site title instead of the hardcoded words, since these are PHP patterns? 🤔

kjellr commented 2 years ago

Hmm that's a good thought. My concern is that it won't stay in sync if you changed your site title though. Since the user would've already seen this intelligently populate, they'd probably think of that as a bug. 🤔

kjellr commented 2 years ago

Now that we're nearing release, I'm going to close this issue. If anyone has further thoughts to share on this topic, feel free to open up a new issue on Trac.