From b7c75ec92066c7e6ebaf4ab070698a686775cf14 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 21 May 2021 11:12:39 +0000 Subject: [PATCH] Block Patterns: Include the Query and Social Icons block patterns from Gutenberg 10.7.0. These block patterns are considered "core" block patterns and removed when a them opts out of the core-block-patterns theme support flag. Props ntsekouras. Fixes #53248. git-svn-id: https://develop.svn.wordpress.org/trunk@50948 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/block-patterns.php | 8 ++++ .../block-patterns/query-grid-posts.php | 23 +++++++++++ .../query-large-title-posts.php | 31 ++++++++++++++ .../block-patterns/query-medium-posts.php | 27 +++++++++++++ .../block-patterns/query-offset-posts.php | 40 +++++++++++++++++++ .../block-patterns/query-small-posts.php | 26 ++++++++++++ .../block-patterns/query-standard-posts.php | 25 ++++++++++++ .../social-links-shared-background-color.php | 18 +++++++++ 8 files changed, 198 insertions(+) create mode 100644 src/wp-includes/block-patterns/query-grid-posts.php create mode 100644 src/wp-includes/block-patterns/query-large-title-posts.php create mode 100644 src/wp-includes/block-patterns/query-medium-posts.php create mode 100644 src/wp-includes/block-patterns/query-offset-posts.php create mode 100644 src/wp-includes/block-patterns/query-small-posts.php create mode 100644 src/wp-includes/block-patterns/query-standard-posts.php create mode 100644 src/wp-includes/block-patterns/social-links-shared-background-color.php diff --git a/src/wp-includes/block-patterns.php b/src/wp-includes/block-patterns.php index 128775e937..0dc01df73f 100644 --- a/src/wp-includes/block-patterns.php +++ b/src/wp-includes/block-patterns.php @@ -34,6 +34,13 @@ function _register_core_block_patterns_and_categories() { 'text-two-columns', 'media-text-arquitecture', 'two-buttons', + 'query-standard-posts', + 'query-medium-posts', + 'query-small-posts', + 'query-grid-posts', + 'query-large-title-posts', + 'query-offset-posts', + 'social-links-shared-background-color', ); foreach ( $core_block_patterns as $core_block_pattern ) { @@ -49,4 +56,5 @@ function _register_core_block_patterns_and_categories() { register_block_pattern_category( 'gallery', array( 'label' => _x( 'Gallery', 'Block pattern category' ) ) ); register_block_pattern_category( 'header', array( 'label' => _x( 'Headers', 'Block pattern category' ) ) ); register_block_pattern_category( 'text', array( 'label' => _x( 'Text', 'Block pattern category' ) ) ); + register_block_pattern_category( 'query', array( 'label' => __( 'Query', 'Block pattern category' ) ) ); } diff --git a/src/wp-includes/block-patterns/query-grid-posts.php b/src/wp-includes/block-patterns/query-grid-posts.php new file mode 100644 index 0000000000..d82bb8d208 --- /dev/null +++ b/src/wp-includes/block-patterns/query-grid-posts.php @@ -0,0 +1,23 @@ + __( 'Grid', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'query' ), + 'content' => ' +
+ + +
+ +
+ + + + ', +); diff --git a/src/wp-includes/block-patterns/query-large-title-posts.php b/src/wp-includes/block-patterns/query-large-title-posts.php new file mode 100644 index 0000000000..000620ef38 --- /dev/null +++ b/src/wp-includes/block-patterns/query-large-title-posts.php @@ -0,0 +1,31 @@ + __( 'Large title', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'query' ), + 'content' => ' +
+
+ +
+ + + +
+
+ + + +
+
+ +
+
+ ', +); diff --git a/src/wp-includes/block-patterns/query-medium-posts.php b/src/wp-includes/block-patterns/query-medium-posts.php new file mode 100644 index 0000000000..2395e4a7b2 --- /dev/null +++ b/src/wp-includes/block-patterns/query-medium-posts.php @@ -0,0 +1,27 @@ + __( 'Image at left', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'query' ), + 'content' => ' +
+ + +
+
+ + +
+
+
+ + +
+ ', +); diff --git a/src/wp-includes/block-patterns/query-offset-posts.php b/src/wp-includes/block-patterns/query-offset-posts.php new file mode 100644 index 0000000000..f223cb1163 --- /dev/null +++ b/src/wp-includes/block-patterns/query-offset-posts.php @@ -0,0 +1,40 @@ + __( 'Offset', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'query' ), + 'content' => ' +
+
+
+
+ + + + + + +
+
+ + +
+
+ + + + + + +
+
+
+
+ ', +); diff --git a/src/wp-includes/block-patterns/query-small-posts.php b/src/wp-includes/block-patterns/query-small-posts.php new file mode 100644 index 0000000000..c66e6dedcf --- /dev/null +++ b/src/wp-includes/block-patterns/query-small-posts.php @@ -0,0 +1,26 @@ + __( 'Small image and title', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'query' ), + 'content' => ' +
+ + +
+
+ + +
+
+ + +
+ ', +); diff --git a/src/wp-includes/block-patterns/query-standard-posts.php b/src/wp-includes/block-patterns/query-standard-posts.php new file mode 100644 index 0000000000..d6fcc2f270 --- /dev/null +++ b/src/wp-includes/block-patterns/query-standard-posts.php @@ -0,0 +1,25 @@ + __( 'Standard', 'gutenberg' ), + 'blockTypes' => array( 'core/query' ), + 'categories' => array( 'query' ), + 'content' => ' +
+ + + + + +
+ + + +
+ ', +); diff --git a/src/wp-includes/block-patterns/social-links-shared-background-color.php b/src/wp-includes/block-patterns/social-links-shared-background-color.php new file mode 100644 index 0000000000..96287e156d --- /dev/null +++ b/src/wp-includes/block-patterns/social-links-shared-background-color.php @@ -0,0 +1,18 @@ + __( 'Social links with a shared background color', 'gutenberg' ), + 'categories' => array( 'buttons' ), + 'blockTypes' => array( 'core/social-links' ), + 'viewportWidth' => 500, + 'content' => ' + + ', +);