From 43f72dfc1ef43971a2b1ea5941c7a74c46cf50e3 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Mon, 21 Mar 2022 13:15:54 +0000 Subject: [PATCH 1/7] Archeo: Load patterns automatically --- archeo/inc/block-patterns.php | 38 ++-------------- archeo/inc/patterns/footer.php | 24 ---------- .../inc/patterns/headline-over-dark-image.php | 13 ------ archeo/inc/patterns/hidden-404.php | 24 ---------- ...description-and-right-aligned-headline.php | 33 -------------- .../inc/patterns/image-with-description.php | 31 ------------- .../image-with-headline-description.php | 35 --------------- ...image-with-headline-on-dark-background.php | 17 ------- ...age-with-headline-separate-description.php | 23 ---------- .../patterns/layered-images-with-headline.php | 35 --------------- .../layout-with-two-images-and-text.php | 43 ------------------ .../simple-list-of-posts-with-background.php | 35 --------------- archeo/patterns/footer.php | 26 +++++++++++ archeo/patterns/headline-over-dark-image.php | 14 ++++++ archeo/patterns/hidden-404.php | 25 +++++++++++ ...description-and-right-aligned-headline.php | 33 ++++++++++++++ archeo/patterns/image-with-description.php | 33 ++++++++++++++ .../image-with-headline-description.php | 41 +++++++++++++++++ ...image-with-headline-on-dark-background.php | 17 +++++++ ...age-with-headline-separate-description.php | 25 +++++++++++ .../patterns/layered-images-with-headline.php | 38 ++++++++++++++++ .../layout-with-two-images-and-text.php | 45 +++++++++++++++++++ .../simple-list-of-posts-with-background.php | 35 +++++++++++++++ .../patterns/simple-list-of-posts.php | 19 ++++---- 24 files changed, 345 insertions(+), 357 deletions(-) delete mode 100644 archeo/inc/patterns/footer.php delete mode 100644 archeo/inc/patterns/headline-over-dark-image.php delete mode 100644 archeo/inc/patterns/hidden-404.php delete mode 100644 archeo/inc/patterns/image-with-description-and-right-aligned-headline.php delete mode 100644 archeo/inc/patterns/image-with-description.php delete mode 100644 archeo/inc/patterns/image-with-headline-description.php delete mode 100644 archeo/inc/patterns/image-with-headline-on-dark-background.php delete mode 100644 archeo/inc/patterns/image-with-headline-separate-description.php delete mode 100644 archeo/inc/patterns/layered-images-with-headline.php delete mode 100644 archeo/inc/patterns/layout-with-two-images-and-text.php delete mode 100644 archeo/inc/patterns/simple-list-of-posts-with-background.php create mode 100644 archeo/patterns/footer.php create mode 100644 archeo/patterns/headline-over-dark-image.php create mode 100644 archeo/patterns/hidden-404.php create mode 100644 archeo/patterns/image-with-description-and-right-aligned-headline.php create mode 100644 archeo/patterns/image-with-description.php create mode 100644 archeo/patterns/image-with-headline-description.php create mode 100644 archeo/patterns/image-with-headline-on-dark-background.php create mode 100644 archeo/patterns/image-with-headline-separate-description.php create mode 100644 archeo/patterns/layered-images-with-headline.php create mode 100644 archeo/patterns/layout-with-two-images-and-text.php create mode 100644 archeo/patterns/simple-list-of-posts-with-background.php rename archeo/{inc => }/patterns/simple-list-of-posts.php (59%) diff --git a/archeo/inc/block-patterns.php b/archeo/inc/block-patterns.php index 0c15584c79..1d4bec566e 100644 --- a/archeo/inc/block-patterns.php +++ b/archeo/inc/block-patterns.php @@ -14,10 +14,10 @@ */ function archeo_register_block_patterns() { $block_pattern_categories = array( - 'images' => array( 'label' => __( 'Images', 'archeo' ) ), + 'images' => array( 'label' => __( 'Images', 'archeo' ) ), 'featured' => array( 'label' => __( 'Featured', 'archeo' ) ), - 'footer' => array( 'label' => __( 'Footers', 'archeo' ) ), - 'query' => array( 'label' => __( 'Query', 'archeo' ) ), + 'footer' => array( 'label' => __( 'Footers', 'archeo' ) ), + 'query' => array( 'label' => __( 'Query', 'archeo' ) ), ); /** @@ -43,37 +43,5 @@ function archeo_register_block_patterns() { } } - $block_patterns = array( - 'footer', - 'headline-over-dark-image', - 'hidden-404', - 'image-with-headline-on-dark-background', - 'image-with-headline-description', - 'image-with-headline-separate-description', - 'image-with-description', - 'layered-images-with-headline', - 'image-with-description-and-right-aligned-headline', - 'simple-list-of-posts', - 'simple-list-of-posts-with-background', - 'layout-with-two-images-and-text', - ); - - /** - * Filters the theme block patterns. - * - * @since archeo 1.0 - * - * @param array $block_patterns List of block patterns by name. - */ - $block_patterns = apply_filters( 'archeo_block_patterns', $block_patterns ); - - foreach ( $block_patterns as $block_pattern ) { - $pattern_file = get_theme_file_path( '/inc/patterns/' . $block_pattern . '.php' ); - - register_block_pattern( - 'archeo/' . $block_pattern, - require $pattern_file - ); - } } add_action( 'init', 'archeo_register_block_patterns', 9 ); diff --git a/archeo/inc/patterns/footer.php b/archeo/inc/patterns/footer.php deleted file mode 100644 index 8021a28ee6..0000000000 --- a/archeo/inc/patterns/footer.php +++ /dev/null @@ -1,24 +0,0 @@ - __( 'Default footer', 'archeo' ), - 'categories' => array( 'footer' ), - 'blockTypes' => array( 'core/template-part/footer' ), - 'content' => ' -
-
- - - -

' . - sprintf( - /* Translators: WordPress link. */ - esc_html__( 'Proudly powered by %s', 'archeo' ), - 'WordPress' - ) . '

-
-
- ', -); diff --git a/archeo/inc/patterns/headline-over-dark-image.php b/archeo/inc/patterns/headline-over-dark-image.php deleted file mode 100644 index 0e77d9ddac..0000000000 --- a/archeo/inc/patterns/headline-over-dark-image.php +++ /dev/null @@ -1,13 +0,0 @@ - __( 'Headline over dark image', 'archeo' ), - 'categories' => array( 'images' ), - 'content' => ' -
' . esc_attr__( 'Photo of the Governor\'s Palace at Uxmal', 'archeo' ) . '
-

' . wp_kses_post( __( 'Governor\'s
palace at Uxmal,
detail of the
main gate', 'archeo' ) ) . '

-
- ', -); diff --git a/archeo/inc/patterns/hidden-404.php b/archeo/inc/patterns/hidden-404.php deleted file mode 100644 index a751e0cfa5..0000000000 --- a/archeo/inc/patterns/hidden-404.php +++ /dev/null @@ -1,24 +0,0 @@ - __( '404 content', 'archeo' ), - 'inserter' => false, - 'content' => ' -

' . esc_html( _x( '404', 'Error code for a webpage that is not found.', 'archeo' ) ) . '

- - -

' . esc_html__( 'This page could not be found. Maybe try a search?', 'archeo' ) . '

- - - - - - - - - - - ', -); diff --git a/archeo/inc/patterns/image-with-description-and-right-aligned-headline.php b/archeo/inc/patterns/image-with-description-and-right-aligned-headline.php deleted file mode 100644 index 6af514f37c..0000000000 --- a/archeo/inc/patterns/image-with-description-and-right-aligned-headline.php +++ /dev/null @@ -1,33 +0,0 @@ - __( 'Image with description and right-aligned headline', 'archeo' ), - 'categories' => array( 'images' ), - 'content' => ' -
-
-
-

' . esc_html__( 'The Nunnery Quadrangle at Uxmal', 'archeo' ). '

-
-
- - - -
-
' . esc_attr__( 'Photo of the Nunnery Quadrangle, at Uxmal', 'archeo' ). '
-

-
- - - -

' . esc_html__( 'Photograph by Désiré Charnay, 1862 – 1863', 'archeo' ) . '

- - - -

' . esc_html__( 'Uxmal is an ancient Maya city located in present-day Mexico. It is considered one of the most important sites of Mayan culture.', 'archeo' ) . '

-
-
- ', -); \ No newline at end of file diff --git a/archeo/inc/patterns/image-with-description.php b/archeo/inc/patterns/image-with-description.php deleted file mode 100644 index bd55845800..0000000000 --- a/archeo/inc/patterns/image-with-description.php +++ /dev/null @@ -1,31 +0,0 @@ - __( 'Image with description', 'archeo' ), - 'categories' => array( 'images' ), - 'content' => ' -
-
- - - -
-
- - - -

' . __( 'Ancient Temple, at Chichen-Itza, called the Castle', 'archeo' ) . '

- - - -

' . __( 'From "American Cities and Ruins: Mitla, Palenqué, Izamal, Chichen-Itza, Uxmal, Atlas" housed at the New York Public Library.', 'archeo' ) . '

- - - -
' . __( 'Photo of ancient temple, at Chichen-Itza', 'archeo' ) . '
-
-
- ', -); diff --git a/archeo/inc/patterns/image-with-headline-description.php b/archeo/inc/patterns/image-with-headline-description.php deleted file mode 100644 index 62ebc601c4..0000000000 --- a/archeo/inc/patterns/image-with-headline-description.php +++ /dev/null @@ -1,35 +0,0 @@ - __( 'Image with headline and description', 'archeo' ), - 'categories' => array( 'featured', 'images' ), - 'content' => ' -
-
-
-
' . esc_attr__( 'Chahk: rain deity', 'archeo' ) . '
-
-
- - - -
-

' . wp_kses_post( __( 'Chahk:
Rain
deity', 'archeo' ) ) . '

- - - -
-
- - - -
-

' . esc_html__( 'Chaahk is shown here clutching his axe, ready to strike rain and thunder from the clouds. This sculpture was likely created in the Puuc hills of Yucatan and Campeche.', 'archeo' ) . '

-
-
-
-
- ', -); diff --git a/archeo/inc/patterns/image-with-headline-on-dark-background.php b/archeo/inc/patterns/image-with-headline-on-dark-background.php deleted file mode 100644 index dbeb4c6820..0000000000 --- a/archeo/inc/patterns/image-with-headline-on-dark-background.php +++ /dev/null @@ -1,17 +0,0 @@ - __( 'Image with headline on dark background', 'archeo' ), - 'categories' => array( 'images' ), - 'content' => ' -
' . esc_attr__( 'Photo of gigantic figure at Izamal', 'archeo' ) . '
- -
- -

' . wp_kses_post( __( 'Gigantic figure at
Izamal; at the
bottom of the
second pyramid.', 'archeo' ) ) . '

-
-
- ', -); diff --git a/archeo/inc/patterns/image-with-headline-separate-description.php b/archeo/inc/patterns/image-with-headline-separate-description.php deleted file mode 100644 index 90cc1f944d..0000000000 --- a/archeo/inc/patterns/image-with-headline-separate-description.php +++ /dev/null @@ -1,23 +0,0 @@ - __( 'Image with headline and separate description', 'archeo' ), - 'categories' => array( 'images' ), - 'content' => ' -
' . esc_attr__( 'Photo of House of the dwarf, in Uxmal', 'archeo' ) . '
-

' . wp_kses_post( __( 'House of
the dwarf
in Uxmal', 'archeo' ) ) . '

- - - -
-

' . wp_kses_post( __( 'Also referred to as
The Pyramid of the Magician', 'archeo' ) ) . '

- - - -

' . __( 'The pyramid is the tallest structure in Uxmal. Construction on the pyramid began around the 6th century AD. It was added and iterated on for the next 400 years.', 'archeo' ) . '

-
-
- ', -); \ No newline at end of file diff --git a/archeo/inc/patterns/layered-images-with-headline.php b/archeo/inc/patterns/layered-images-with-headline.php deleted file mode 100644 index 40d1643cf0..0000000000 --- a/archeo/inc/patterns/layered-images-with-headline.php +++ /dev/null @@ -1,35 +0,0 @@ - __( 'Layered images with headline', 'archeo' ), - 'categories' => array( 'featured', 'images' ), - 'content' => ' -
' . esc_attr__( 'Photo of Palace of the Circus', 'archeo' ) . '
- -
- -
-
- - - - -

' . wp_kses_post( __( 'Palace of
the Circus at
Chichen-Itza,
bas-relief of
tigers', 'archeo' ) ) . '

-
- - - -
- - - - -
' . esc_attr__( 'Photo of Palace of the Circus', 'archeo' ) . '
-
-
-
-
- ', -); diff --git a/archeo/inc/patterns/layout-with-two-images-and-text.php b/archeo/inc/patterns/layout-with-two-images-and-text.php deleted file mode 100644 index 7f7bd02a3f..0000000000 --- a/archeo/inc/patterns/layout-with-two-images-and-text.php +++ /dev/null @@ -1,43 +0,0 @@ - __( 'Layout with two images and text', 'archeo' ), - 'categories' => array( 'featured', 'images' ), - 'content' => ' -
' . __( 'Photo of the Pyramid of the Magician, at Uxmal', 'archeo' ) . '
-
-
- - < - - -

' . wp_kses_post( __( 'The Pyramid of the
Magician at Uxmal', 'archeo' ) ) . '

- - - -
' . __( 'Photograph by Désiré Charnay, 1862 to 1863', 'archeo' ) . '
' . __( 'Photograph by Désiré Charnay, 1862 – 1863', 'archeo' ) . '
-
- - - -
- - - - -

' . __( 'Uxmal is an ancient Maya city located in present-day Mexico. It is considered one of the most important archaeological sites of Mayan culture.', 'archeo' ) . '

- - - -

' . __( 'On the right: Governor\'s Palace, detail of the main gate', 'archeo' ) . '

- - - - -
-
-
- ', -); diff --git a/archeo/inc/patterns/simple-list-of-posts-with-background.php b/archeo/inc/patterns/simple-list-of-posts-with-background.php deleted file mode 100644 index f8b42f80de..0000000000 --- a/archeo/inc/patterns/simple-list-of-posts-with-background.php +++ /dev/null @@ -1,35 +0,0 @@ - __( 'Simple list of posts with title and background', 'archeo' ), - 'categories' => array( 'featured', 'query' ), - 'content' => ' - - ', -); diff --git a/archeo/patterns/footer.php b/archeo/patterns/footer.php new file mode 100644 index 0000000000..4b77cdf980 --- /dev/null +++ b/archeo/patterns/footer.php @@ -0,0 +1,26 @@ + + + +
+ +
+ + +

+ WordPress' + ); + ?> +

+
+
diff --git a/archeo/patterns/headline-over-dark-image.php b/archeo/patterns/headline-over-dark-image.php new file mode 100644 index 0000000000..67851afd66 --- /dev/null +++ b/archeo/patterns/headline-over-dark-image.php @@ -0,0 +1,14 @@ + + + +
<?php esc_attr_e( 'Photo of the Governor\'s Palace at Uxmal', 'archeo' ); ?>
+

palace at Uxmal,
detail of the
main gate', 'archeo' ) ); ?>

+ +
+
diff --git a/archeo/patterns/hidden-404.php b/archeo/patterns/hidden-404.php new file mode 100644 index 0000000000..9aee3009f8 --- /dev/null +++ b/archeo/patterns/hidden-404.php @@ -0,0 +1,25 @@ + + + +

+ + +

+ + + + + + + + + + + diff --git a/archeo/patterns/image-with-description-and-right-aligned-headline.php b/archeo/patterns/image-with-description-and-right-aligned-headline.php new file mode 100644 index 0000000000..9c53169b11 --- /dev/null +++ b/archeo/patterns/image-with-description-and-right-aligned-headline.php @@ -0,0 +1,33 @@ + + + +
+
+
+

+
+
+ + + +
+
<?php esc_attr_e( 'Photo of the Nunnery Quadrangle, at Uxmal', 'archeo' ); ?>
+

+
+ + + +

+ + + +

+
+
+ diff --git a/archeo/patterns/image-with-description.php b/archeo/patterns/image-with-description.php new file mode 100644 index 0000000000..a79a29705b --- /dev/null +++ b/archeo/patterns/image-with-description.php @@ -0,0 +1,33 @@ + + + +
+ +
+ + + +
+ +
+ + + +

+ + + +

+ + + +
<?php _e( 'Photo of ancient temple, at Chichen-Itza', 'archeo' ); ?>
+ +
+
diff --git a/archeo/patterns/image-with-headline-description.php b/archeo/patterns/image-with-headline-description.php new file mode 100644 index 0000000000..7e5a34b961 --- /dev/null +++ b/archeo/patterns/image-with-headline-description.php @@ -0,0 +1,41 @@ + + + +
+ +
+ +
+ +
<?php esc_attr_e( 'Chahk: rain deity', 'archeo' ); ?>
+ +
+ +
+ + +
+ +

Rain
deity', 'archeo' ) ); ?>

+ + + +
+ +
+ + +
+ +

+ +
+
+
+
diff --git a/archeo/patterns/image-with-headline-on-dark-background.php b/archeo/patterns/image-with-headline-on-dark-background.php new file mode 100644 index 0000000000..7e369564ba --- /dev/null +++ b/archeo/patterns/image-with-headline-on-dark-background.php @@ -0,0 +1,17 @@ + + + +
<?php esc_attr_e( 'Photo of gigantic figure at Izamal', 'archeo' ); ?>
+ +
+ +

Izamal; at the
bottom of the
second pyramid.', 'archeo' ) ); ?>

+
+
+
diff --git a/archeo/patterns/image-with-headline-separate-description.php b/archeo/patterns/image-with-headline-separate-description.php new file mode 100644 index 0000000000..5a3399371b --- /dev/null +++ b/archeo/patterns/image-with-headline-separate-description.php @@ -0,0 +1,25 @@ + + + +
<?php esc_attr_e( 'Photo of House of the dwarf, in Uxmal', 'archeo' ); ?>
+ +

the dwarf
in Uxmal', 'archeo' ) ); ?>

+ + + +
+ +

The Pyramid of the Magician', 'archeo' ) ); ?>

+ + + +

+ +
+
diff --git a/archeo/patterns/layered-images-with-headline.php b/archeo/patterns/layered-images-with-headline.php new file mode 100644 index 0000000000..2c47bfc1ca --- /dev/null +++ b/archeo/patterns/layered-images-with-headline.php @@ -0,0 +1,38 @@ + + + +
<?php esc_attr_e( 'Photo of Palace of the Circus', 'archeo' ); ?>
+ +
+ +
+ +
+ + + + + +

the Circus at
Chichen-Itza,
bas-relief of
tigers', 'archeo' ) ); ?>

+
+ + + +
+ + + + + +
<?php esc_attr_e( 'Photo of Palace of the Circus', 'archeo' ); ?>
+ +
+
+
+
diff --git a/archeo/patterns/layout-with-two-images-and-text.php b/archeo/patterns/layout-with-two-images-and-text.php new file mode 100644 index 0000000000..c532a9a421 --- /dev/null +++ b/archeo/patterns/layout-with-two-images-and-text.php @@ -0,0 +1,45 @@ + + + +
<?php _e( 'Photo of the Pyramid of the Magician, at Uxmal', 'archeo' ); ?>
+
+
+ + + + + +

Magician at Uxmal', 'archeo' ) ); ?>

+ + + +
<?php _e( 'Photograph by Désiré Charnay, 1862 to 1863', 'archeo' ); ?>
+ +
+ + +
+ + + + + +

+ + + +

+ + + + + +
+
+
diff --git a/archeo/patterns/simple-list-of-posts-with-background.php b/archeo/patterns/simple-list-of-posts-with-background.php new file mode 100644 index 0000000000..0c438b2897 --- /dev/null +++ b/archeo/patterns/simple-list-of-posts-with-background.php @@ -0,0 +1,35 @@ + + + + + diff --git a/archeo/inc/patterns/simple-list-of-posts.php b/archeo/patterns/simple-list-of-posts.php similarity index 59% rename from archeo/inc/patterns/simple-list-of-posts.php rename to archeo/patterns/simple-list-of-posts.php index 981d3daa5e..b3d284c837 100644 --- a/archeo/inc/patterns/simple-list-of-posts.php +++ b/archeo/patterns/simple-list-of-posts.php @@ -1,16 +1,18 @@ __( 'Simple list of posts', 'archeo' ), - 'categories' => array( 'images' ), - 'content' => ' -
+?> + + +
+
- +
@@ -22,5 +24,4 @@
- ', -); + From 3bae452d313bd8ba4b76c6745f85101440b21827 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Mon, 21 Mar 2022 13:59:35 +0000 Subject: [PATCH 2/7] Add block types --- archeo/patterns/simple-list-of-posts-with-background.php | 1 + archeo/patterns/simple-list-of-posts.php | 1 + 2 files changed, 2 insertions(+) diff --git a/archeo/patterns/simple-list-of-posts-with-background.php b/archeo/patterns/simple-list-of-posts-with-background.php index 0c438b2897..a113a90d89 100644 --- a/archeo/patterns/simple-list-of-posts-with-background.php +++ b/archeo/patterns/simple-list-of-posts-with-background.php @@ -3,6 +3,7 @@ * Title: Simple list of posts with title and background * Slug: archeo/simple-list-of-posts-with-background * Categories: featured, query + * Block Types: query */ ?> diff --git a/archeo/patterns/simple-list-of-posts.php b/archeo/patterns/simple-list-of-posts.php index b3d284c837..17b81c44df 100644 --- a/archeo/patterns/simple-list-of-posts.php +++ b/archeo/patterns/simple-list-of-posts.php @@ -3,6 +3,7 @@ * Title: Simple list of posts * Slug: archeo/simple-list-of-posts * Categories: featured, query + * Block Types: query */ ?> From 670adb62ef6119a5d3458f4710c90cdf16db3dd2 Mon Sep 17 00:00:00 2001 From: Sarah Norris Date: Tue, 22 Mar 2022 14:52:10 +0000 Subject: [PATCH 3/7] Move archeo_register_block_patterns to functions.php --- archeo/functions.php | 42 +++++++++++++++++++++++++++++-- archeo/inc/block-patterns.php | 47 ----------------------------------- 2 files changed, 40 insertions(+), 49 deletions(-) delete mode 100644 archeo/inc/block-patterns.php diff --git a/archeo/functions.php b/archeo/functions.php index 8e7fa149c1..e97d31cb5a 100644 --- a/archeo/functions.php +++ b/archeo/functions.php @@ -60,5 +60,43 @@ function archeo_styles() { add_action( 'wp_enqueue_scripts', 'archeo_styles' ); -// Add block patterns -require get_template_directory() . '/inc/block-patterns.php'; +/** + * Registers block patterns and categories. + * + * @since Archeo 1.0 + * + * @return void + */ +function archeo_register_block_patterns() { + $block_pattern_categories = array( + 'images' => array( 'label' => __( 'Images', 'archeo' ) ), + 'featured' => array( 'label' => __( 'Featured', 'archeo' ) ), + 'footer' => array( 'label' => __( 'Footers', 'archeo' ) ), + 'query' => array( 'label' => __( 'Query', 'archeo' ) ), + ); + + /** + * Filters the theme block pattern categories. + * + * @since archeo 1.0 + * + * @param array[] $block_pattern_categories { + * An associative array of block pattern categories, keyed by category name. + * + * @type array[] $properties { + * An array of block category properties. + * + * @type string $label A human-readable label for the pattern category. + * } + * } + */ + $block_pattern_categories = apply_filters( 'archeo_block_pattern_categories', $block_pattern_categories ); + + foreach ( $block_pattern_categories as $name => $properties ) { + if ( ! WP_Block_Pattern_Categories_Registry::get_instance()->is_registered( $name ) ) { + register_block_pattern_category( $name, $properties ); + } + } + +} +add_action( 'init', 'archeo_register_block_patterns', 9 ); diff --git a/archeo/inc/block-patterns.php b/archeo/inc/block-patterns.php deleted file mode 100644 index 1d4bec566e..0000000000 --- a/archeo/inc/block-patterns.php +++ /dev/null @@ -1,47 +0,0 @@ - array( 'label' => __( 'Images', 'archeo' ) ), - 'featured' => array( 'label' => __( 'Featured', 'archeo' ) ), - 'footer' => array( 'label' => __( 'Footers', 'archeo' ) ), - 'query' => array( 'label' => __( 'Query', 'archeo' ) ), - ); - - /** - * Filters the theme block pattern categories. - * - * @since archeo 1.0 - * - * @param array[] $block_pattern_categories { - * An associative array of block pattern categories, keyed by category name. - * - * @type array[] $properties { - * An array of block category properties. - * - * @type string $label A human-readable label for the pattern category. - * } - * } - */ - $block_pattern_categories = apply_filters( 'archeo_block_pattern_categories', $block_pattern_categories ); - - foreach ( $block_pattern_categories as $name => $properties ) { - if ( ! WP_Block_Pattern_Categories_Registry::get_instance()->is_registered( $name ) ) { - register_block_pattern_category( $name, $properties ); - } - } - -} -add_action( 'init', 'archeo_register_block_patterns', 9 ); From 46bb29370157e8717ebd4b85a4b95e6ab92be4d4 Mon Sep 17 00:00:00 2001 From: Sarah Norris Date: Tue, 22 Mar 2022 14:57:11 +0000 Subject: [PATCH 4/7] Update footer pattern inline with trunk --- archeo/patterns/footer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archeo/patterns/footer.php b/archeo/patterns/footer.php index 4b77cdf980..bff99f8123 100644 --- a/archeo/patterns/footer.php +++ b/archeo/patterns/footer.php @@ -11,7 +11,7 @@
- +

Date: Tue, 22 Mar 2022 15:06:14 +0000 Subject: [PATCH 5/7] Update Image with headline and description pattern inline with trunk --- .../image-with-headline-description.php | 36 ++++++++----------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/archeo/patterns/image-with-headline-description.php b/archeo/patterns/image-with-headline-description.php index 7e5a34b961..66c5b48603 100644 --- a/archeo/patterns/image-with-headline-description.php +++ b/archeo/patterns/image-with-headline-description.php @@ -8,34 +8,26 @@

- -
- -
- -
<?php esc_attr_e( 'Chahk: rain deity', 'archeo' ); ?>
- -
- -
-
- -

Rain
deity', 'archeo' ) ); ?>

+ +

Rain
deity', 'archeo' ) ); ?>

-
- -
- - -
- -

- + +
+ +

+ +
+ +
+ +
<?php esc_attr_e( 'Chahk: rain deity', 'archeo' ); ?>
+
+
From a2e2826612d67e161f935749845cecd5dc4ac6a1 Mon Sep 17 00:00:00 2001 From: Ben Dwyer Date: Wed, 23 Mar 2022 09:30:25 +0000 Subject: [PATCH 6/7] Update archeo/functions.php Co-authored-by: Jeff Ong --- archeo/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archeo/functions.php b/archeo/functions.php index e97d31cb5a..693f565442 100644 --- a/archeo/functions.php +++ b/archeo/functions.php @@ -67,7 +67,7 @@ function archeo_styles() { * * @return void */ -function archeo_register_block_patterns() { +function archeo_register_block_pattern_categories() { $block_pattern_categories = array( 'images' => array( 'label' => __( 'Images', 'archeo' ) ), 'featured' => array( 'label' => __( 'Featured', 'archeo' ) ), From 9e90de141c1c26c77663aba03205067fc8a62474 Mon Sep 17 00:00:00 2001 From: Sarah Norris Date: Wed, 23 Mar 2022 14:21:37 +0000 Subject: [PATCH 7/7] Fix spacing in simple list of posts pattern --- archeo/patterns/simple-list-of-posts-with-background.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/archeo/patterns/simple-list-of-posts-with-background.php b/archeo/patterns/simple-list-of-posts-with-background.php index a113a90d89..fa1e9f34aa 100644 --- a/archeo/patterns/simple-list-of-posts-with-background.php +++ b/archeo/patterns/simple-list-of-posts-with-background.php @@ -12,14 +12,14 @@
- -

+ +

-
+