From 9b323cd393648c7c50bd37cf645c11018dff6009 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 19 Jul 2022 08:54:57 +0000 Subject: [PATCH] Twenty Twenty-One: Add block type suggestions to block patterns. When using a given block, patterns which use that block can be suggested. This changeset adds `blockType` suggestion for several Twenty Twenty-One bundled patterns. Props ryelle, poena, audrasjb. Fixes #53647. git-svn-id: https://develop.svn.wordpress.org/trunk@53716 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-content/themes/twentytwentyone/inc/block-patterns.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wp-content/themes/twentytwentyone/inc/block-patterns.php b/src/wp-content/themes/twentytwentyone/inc/block-patterns.php index cd66ff9c66..b66dddf594 100644 --- a/src/wp-content/themes/twentytwentyone/inc/block-patterns.php +++ b/src/wp-content/themes/twentytwentyone/inc/block-patterns.php @@ -47,6 +47,7 @@ if ( function_exists( 'register_block_pattern' ) ) { 'title' => esc_html__( 'Large text', 'twentytwentyone' ), 'categories' => array( 'twentytwentyone' ), 'viewportWidth' => 1440, + 'blockTypes' => array( 'core/heading' ), 'content' => '

' . esc_html__( 'A new portfolio default theme for WordPress', 'twentytwentyone' ) . '

', ) ); @@ -58,6 +59,7 @@ if ( function_exists( 'register_block_pattern' ) ) { 'title' => esc_html__( 'Links area', 'twentytwentyone' ), 'categories' => array( 'twentytwentyone' ), 'viewportWidth' => 1440, + 'blockTypes' => array( 'core/cover' ), 'description' => esc_html_x( 'A huge text followed by social networks and email address links.', 'Block pattern description', 'twentytwentyone' ), 'content' => '

', ) @@ -82,6 +84,7 @@ if ( function_exists( 'register_block_pattern' ) ) { 'title' => esc_html__( 'Overlapping images', 'twentytwentyone' ), 'categories' => array( 'twentytwentyone' ), 'viewportWidth' => 1024, + 'blockTypes' => array( 'core/columns' ), 'description' => esc_html_x( 'Three images inside an overlapping columns block.', 'Block pattern description', 'twentytwentyone' ), 'content' => '
' . esc_attr__( '“Roses Trémières” by Berthe Morisot', 'twentytwentyone' ) . '
' . esc_attr__( '“In the Bois de Boulogne” by Berthe Morisot', 'twentytwentyone' ) . '
' . esc_attr__( '“Young Woman in Mauve” by Berthe Morisot', 'twentytwentyone' ) . '
', ) @@ -106,6 +109,7 @@ if ( function_exists( 'register_block_pattern' ) ) { 'title' => esc_html__( 'Overlapping images and text', 'twentytwentyone' ), 'categories' => array( 'twentytwentyone' ), 'viewportWidth' => 1440, + 'blockTypes' => array( 'core/columns' ), 'description' => esc_html_x( 'An overlapping columns block with two images and a text description.', 'Block pattern description', 'twentytwentyone' ), 'content' => '
' . esc_attr__( '“The Garden at Bougival” by Berthe Morisot', 'twentytwentyone' ) . '

' . esc_html__( 'Beautiful gardens painted by Berthe Morisot in the late 1800s', 'twentytwentyone' ) . '

' . esc_attr__( '“Villa with Orange Trees, Nice” by Berthe Morisot', 'twentytwentyone' ) . '
', ) @@ -127,6 +131,7 @@ if ( function_exists( 'register_block_pattern' ) ) { array( 'title' => esc_html__( 'Contact information', 'twentytwentyone' ), 'categories' => array( 'twentytwentyone' ), + 'blockTypes' => array( 'core/columns' ), 'description' => esc_html_x( 'A block with 3 columns that display contact information and social media links.', 'Block pattern description', 'twentytwentyone' ), 'content' => '

' . esc_html_x( 'example@example.com', 'Block pattern sample content', 'twentytwentyone' ) . '
' . esc_html_x( '123-456-7890', 'Block pattern sample content', 'twentytwentyone' ) . '

' . esc_html_x( '123 Main Street', 'Block pattern sample content', 'twentytwentyone' ) . '
' . esc_html_x( 'Cambridge, MA, 02139', 'Block pattern sample content', 'twentytwentyone' ) . '

', )