From 83421f420c6b97aaa9aab012a5e6b57962fae273 Mon Sep 17 00:00:00 2001 From: Jeff Ong Date: Tue, 14 Dec 2021 17:09:04 +0000 Subject: [PATCH] Twenty Twenty-Two: Sync updates from GitHub for Beta 3. This commit syncs minor changes for the default theme from its active development repository to core. This is a follow up to [52081], [52107], [52164], [52222], [52283], and [52335]. The two main changes introduce global padding to site content while still allowing content to be full-width, and re-organize block patterns into Core's existing categories. To view the full set of changes, visit https://github.com/WordPress/twentytwentytwo/compare/da994d1fe50c016cd11ecf33da7de33f652184e4...88a8f2e3b4c6653e2deb5c29ae0b7e42b1f99433. Props onemaggie, joen, youknowriad, scruffian, sabernhardt, kjellr. See #54318. git-svn-id: https://develop.svn.wordpress.org/trunk@52375 602fd350-edb4-49c9-b593-d223f7449a82 --- .../twentytwentytwo/inc/block-patterns.php | 18 ++++--- .../inc/patterns/footer-about-title-logo.php | 4 +- .../inc/patterns/footer-blog.php | 8 ++-- .../inc/patterns/footer-dark.php | 4 +- .../inc/patterns/footer-default.php | 6 +-- .../inc/patterns/footer-logo.php | 2 +- .../patterns/footer-navigation-copyright.php | 2 +- .../inc/patterns/footer-navigation.php | 2 +- .../footer-query-images-title-citation.php | 4 +- .../patterns/footer-query-title-citation.php | 4 +- .../inc/patterns/footer-social-copyright.php | 2 +- .../patterns/footer-title-tagline-social.php | 2 +- .../inc/patterns/general-divider-dark.php | 2 +- .../inc/patterns/general-divider-light.php | 2 +- .../inc/patterns/general-featured-posts.php | 2 +- .../patterns/general-image-with-caption.php | 2 +- .../inc/patterns/general-large-list-names.php | 2 +- .../general-layered-images-with-duotone.php | 2 +- .../inc/patterns/general-list-events.php | 2 +- .../inc/patterns/general-pricing-table.php | 2 +- .../inc/patterns/general-subscribe.php | 2 +- .../inc/patterns/general-two-images-text.php | 2 +- .../patterns/general-video-header-details.php | 2 +- .../inc/patterns/general-video-trailer.php | 2 +- .../general-wide-image-intro-buttons.php | 2 +- .../header-centered-logo-black-background.php | 2 +- .../inc/patterns/header-centered-logo.php | 2 +- ...eader-centered-title-navigation-social.php | 2 +- .../inc/patterns/header-default.php | 2 +- .../header-image-background-overlay.php | 6 +-- .../inc/patterns/header-image-background.php | 6 +-- .../inc/patterns/header-large-dark.php | 4 +- ...header-logo-navigation-gray-background.php | 2 +- .../header-logo-navigation-offset-tagline.php | 2 +- ...ogo-navigation-social-black-background.php | 2 +- .../inc/patterns/header-small-dark.php | 4 +- .../inc/patterns/header-stacked.php | 2 +- .../header-text-only-green-background.php | 2 +- .../header-text-only-salmon-background.php | 2 +- ...ext-only-with-tagline-black-background.php | 2 +- .../inc/patterns/header-title-and-button.php | 2 +- .../header-title-navigation-social.php | 2 +- .../inc/patterns/header-with-tagline.php | 2 +- .../inc/patterns/hidden-bird.php | 2 +- .../inc/patterns/hidden-heading-and-bird.php | 2 +- .../page-about-large-image-and-buttons.php | 4 +- .../inc/patterns/page-about-links-dark.php | 4 +- .../inc/patterns/page-about-links.php | 4 +- .../inc/patterns/page-about-media-left.php | 4 +- .../inc/patterns/page-about-media-right.php | 6 +-- .../inc/patterns/page-about-simple-dark.php | 2 +- .../inc/patterns/page-about-solid-color.php | 2 +- .../patterns/page-layout-image-and-text.php | 2 +- .../page-layout-image-text-and-video.php | 6 +-- .../inc/patterns/page-layout-two-columns.php | 2 +- .../page-sidebar-blog-posts-right.php | 2 +- .../inc/patterns/page-sidebar-blog-posts.php | 2 +- .../inc/patterns/page-sidebar-grid-posts.php | 2 +- .../inc/patterns/page-sidebar-poster.php | 4 +- .../inc/patterns/query-default.php | 4 +- .../inc/patterns/query-grid.php | 2 +- .../inc/patterns/query-image-grid.php | 2 +- .../inc/patterns/query-irregular-grid.php | 2 +- .../inc/patterns/query-large-titles.php | 2 +- .../inc/patterns/query-simple-blog.php | 2 +- .../inc/patterns/query-text-grid.php | 2 +- .../themes/twentytwentytwo/parts/footer.html | 4 +- .../parts/header-large-dark.html | 6 ++- .../parts/header-small-dark.html | 6 ++- .../themes/twentytwentytwo/parts/header.html | 24 +++++----- .../themes/twentytwentytwo/style.css | 47 ++++++++++++++++++- .../themes/twentytwentytwo/templates/404.html | 4 +- .../twentytwentytwo/templates/archive.html | 18 +++---- .../twentytwentytwo/templates/home.html | 8 +--- .../twentytwentytwo/templates/index.html | 8 +--- .../templates/page-large-header.html | 4 +- .../templates/page-no-separators.html | 6 +-- .../twentytwentytwo/templates/page.html | 6 +-- .../templates/single-no-separators.html | 6 +-- .../twentytwentytwo/templates/single.html | 6 +-- .../themes/twentytwentytwo/theme.json | 3 +- 81 files changed, 195 insertions(+), 159 deletions(-) diff --git a/src/wp-content/themes/twentytwentytwo/inc/block-patterns.php b/src/wp-content/themes/twentytwentytwo/inc/block-patterns.php index 055bb3ba7e..fbaa086395 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/block-patterns.php +++ b/src/wp-content/themes/twentytwentytwo/inc/block-patterns.php @@ -12,11 +12,11 @@ */ function twentytwentytwo_register_block_patterns() { $block_pattern_categories = array( - 'twentytwentytwo-general' => array( 'label' => __( 'Twenty Twenty-Two General', 'twentytwentytwo' ) ), - 'twentytwentytwo-footers' => array( 'label' => __( 'Twenty Twenty-Two Footers', 'twentytwentytwo' ) ), - 'twentytwentytwo-headers' => array( 'label' => __( 'Twenty Twenty-Two Headers', 'twentytwentytwo' ) ), - 'twentytwentytwo-query' => array( 'label' => __( 'Twenty Twenty-Two Posts', 'twentytwentytwo' ) ), - 'twentytwentytwo-pages' => array( 'label' => __( 'Twenty Twenty-Two Pages', 'twentytwentytwo' ) ), + 'featured' => array( 'label' => __( 'Featured', 'twentytwentytwo' ) ), + 'footer' => array( 'label' => __( 'Footers', 'twentytwentytwo' ) ), + 'header' => array( 'label' => __( 'Headers', 'twentytwentytwo' ) ), + 'query' => array( 'label' => __( 'Query', 'twentytwentytwo' ) ), + 'pages' => array( 'label' => __( 'Pages', 'twentytwentytwo' ) ), ); /** @@ -37,7 +37,9 @@ function twentytwentytwo_register_block_patterns() { $block_pattern_categories = apply_filters( 'twentytwentytwo_block_pattern_categories', $block_pattern_categories ); foreach ( $block_pattern_categories as $name => $properties ) { - register_block_pattern_category( $name, $properties ); + if ( ! WP_Block_Pattern_Categories_Registry::get_instance()->is_registered( $name ) ) { + register_block_pattern_category( $name, $properties ); + } } $block_patterns = array( @@ -120,9 +122,11 @@ function twentytwentytwo_register_block_patterns() { $block_patterns = apply_filters( 'twentytwentytwo_block_patterns', $block_patterns ); foreach ( $block_patterns as $block_pattern ) { + $pattern_file = get_theme_file_path( '/inc/patterns/' . $block_pattern . '.php' ); + register_block_pattern( 'twentytwentytwo/' . $block_pattern, - require __DIR__ . '/patterns/' . $block_pattern . '.php' + require $pattern_file ); } } diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-about-title-logo.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-about-title-logo.php index 11d50be4af..d687970917 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-about-title-logo.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-about-title-logo.php @@ -4,7 +4,7 @@ */ return array( 'title' => __( 'Footer with text, title, and logo', 'twentytwentytwo' ), - 'categories' => array( 'twentytwentytwo-footers' ), + 'categories' => array( 'footer' ), 'blockTypes' => array( 'core/template-part/footer' ), 'content' => '
@@ -21,7 +21,7 @@ return array( -
+ diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-blog.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-blog.php index 7462d53f39..4be192a3de 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-blog.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-blog.php @@ -4,11 +4,11 @@ */ return array( 'title' => __( 'Blog footer', 'twentytwentytwo' ), - 'categories' => array( 'twentytwentytwo-footers' ), + 'categories' => array( 'footer' ), 'blockTypes' => array( 'core/template-part/footer' ), 'content' => ' -
-
+
+

' . esc_html__( 'About us', 'twentytwentytwo' ) . '

@@ -40,7 +40,7 @@ return array( -
+

' . diff --git a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-dark.php b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-dark.php index fb17ac3891..15c21c6b85 100644 --- a/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-dark.php +++ b/src/wp-content/themes/twentytwentytwo/inc/patterns/footer-dark.php @@ -4,11 +4,11 @@ */ return array( 'title' => __( 'Dark footer with title and citation', 'twentytwentytwo' ), - 'categories' => array( 'twentytwentytwo-footers' ), + 'categories' => array( 'footer' ), 'blockTypes' => array( 'core/template-part/footer' ), 'content' => '