From 7d72edebbccc5bbbc311117d8fcc5cfaf8e487f9 Mon Sep 17 00:00:00 2001 From: Steve Novosel Date: Sat, 16 Mar 2024 15:32:40 -0400 Subject: [PATCH] add category for coblocks patterns --- src/blocks/counter/index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/blocks/counter/index.php b/src/blocks/counter/index.php index 3846e7c1578..03786c681df 100644 --- a/src/blocks/counter/index.php +++ b/src/blocks/counter/index.php @@ -17,12 +17,14 @@ function coblocks_counter_register_block_patterns() { 'title' => __( 'Counter and Icon block Group', 'coblocks' ), 'blockTypes' => array( 'core/group', 'coblocks/counter', 'coblocks/icon' ), 'content' => '
1000
Hours Worked
', + 'categories' => array( 'coblocks' ), ); $multi_digits_array = array( 'title' => __( 'Counter with multiple inline digits', 'coblocks' ), 'blockTypes' => array( 'coblocks/counter' ), 'content' => '
10 days, 20 hours
Since Last Incident
', + 'categories' => array( 'coblocks' ), ); if ( $should_include_viewport ) { @@ -35,6 +37,10 @@ function coblocks_counter_register_block_patterns() { register_block_pattern( 'counter/with-icon', $icon_array ); register_block_pattern( 'counter/with-multiple-digits', $multi_digits_array ); + register_block_pattern_category( 'coblocks', array( + 'label' => 'Coblocks', + 'description' => 'Coblocks Patterns' + ) ); } add_action( 'init', 'coblocks_counter_register_block_patterns' );