Skip to content

Commit

Permalink
Fixes broken Site Title selector in Gutenberg 19.2.
Browse files Browse the repository at this point in the history
Gutenberg 19.2 broke `theme.json` styles on the Site Title block by changing the selector to specifically target the link rather and not the block itself. This change reverts that selector to its original state.

See: WordPress/gutenberg#64911
  • Loading branch information
justintadlock committed Sep 17, 2024
1 parent 92da9e5 commit aa8ad48
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Block/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,20 @@ private function coreQueryPagination(array $settings): array
return $settings;
}

/**
* Fixes the broken selector introduced in Gutenberg 19.2.
*
* @since 1.0.0
* @link https://github.com/WordPress/gutenberg/pull/64911
*/
private function coreSiteTitle(array $settings): array
{
$settings['selectors'] ??= [];
$settings['selectors']['typography'] = '.wp-block-site-title';

return $settings;
}

/**
* Adds color support to the Tag Cloud block.
*
Expand Down

0 comments on commit aa8ad48

Please sign in to comment.