From c5480ac084114b900f298b123ee1e3f16d1cc56f Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 13 Apr 2021 15:31:03 -0400 Subject: [PATCH 1/4] Add the small image and title pattern back in. --- lib/block-patterns.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/block-patterns.php b/lib/block-patterns.php index d578cade9bf04d..67c3d2c12efdeb 100644 --- a/lib/block-patterns.php +++ b/lib/block-patterns.php @@ -28,6 +28,27 @@ ) ); +register_block_pattern( + 'query/small-posts', + array( + 'title' => __( 'Small Image and Title', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'Query' ), + 'content' => ' + + +
+
+ + +
+
+ + + ', + ) + ); + register_block_pattern( 'query/medium-posts', array( From 1166cca4c7eb45e225bc464c27791718e4accb5e Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 13 Apr 2021 15:32:07 -0400 Subject: [PATCH 2/4] Reorder patterns. --- lib/block-patterns.php | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/lib/block-patterns.php b/lib/block-patterns.php index 67c3d2c12efdeb..6938168d63d5bf 100644 --- a/lib/block-patterns.php +++ b/lib/block-patterns.php @@ -28,27 +28,6 @@ ) ); -register_block_pattern( - 'query/small-posts', - array( - 'title' => __( 'Small Image and Title', 'gutenberg' ), - 'blockTypes' => array( 'core/query' ), - 'categories' => array( 'Query' ), - 'content' => ' - - -
-
- - -
-
- - - ', - ) - ); - register_block_pattern( 'query/medium-posts', array( @@ -71,6 +50,27 @@ ) ); +register_block_pattern( + 'query/small-posts', + array( + 'title' => __( 'Small Image and Title', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'Query' ), + 'content' => ' + + +
+
+ + +
+
+ + + ', + ) + ); + register_block_pattern( 'query/grid-posts', array( From d658aa17c613b5f40e16faf6eb9652024814832b Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 13 Apr 2021 15:39:56 -0400 Subject: [PATCH 3/4] Limit the word count of excerpts in the Grid block. --- lib/block-patterns.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/block-patterns.php b/lib/block-patterns.php index 6938168d63d5bf..fb8ddb8f43898f 100644 --- a/lib/block-patterns.php +++ b/lib/block-patterns.php @@ -81,7 +81,7 @@
- + From b5f970d87baaa336d0c5de0c4c940688a0b9bc62 Mon Sep 17 00:00:00 2001 From: Kjell Reigstad Date: Tue, 13 Apr 2021 16:02:48 -0400 Subject: [PATCH 4/4] Linting fixes. --- lib/block-patterns.php | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/block-patterns.php b/lib/block-patterns.php index fb8ddb8f43898f..789f483aea6c34 100644 --- a/lib/block-patterns.php +++ b/lib/block-patterns.php @@ -51,25 +51,25 @@ ); register_block_pattern( - 'query/small-posts', - array( - 'title' => __( 'Small Image and Title', 'gutenberg' ), - 'blockTypes' => array( 'core/query' ), - 'categories' => array( 'Query' ), - 'content' => ' - - -
-
- - -
-
- - - ', - ) - ); + 'query/small-posts', + array( + 'title' => __( 'Small Image and Title', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'Query' ), + 'content' => ' + + +
+
+ + +
+
+ + + ', + ) +); register_block_pattern( 'query/grid-posts', @@ -162,7 +162,7 @@ 'blockTypes' => array( 'core/paragraph' ), 'viewportWidth' => 500, 'content' => ' - + ', ) );