diff --git a/lib/block-patterns.php b/lib/block-patterns.php index 3c3695d4ac049..ab8c9ffa6e320 100644 --- a/lib/block-patterns.php +++ b/lib/block-patterns.php @@ -5,7 +5,8 @@ * @package gutenberg */ -register_block_pattern_category( 'Query', array( 'label' => __( 'Query', 'gutenberg' ) ) ); +// Register categories used for block patterns. +register_block_pattern_category( 'query', array( 'label' => __( 'Query', 'gutenberg' ) ) ); // Initial Query block patterns. register_block_pattern( @@ -13,7 +14,7 @@ array( 'title' => __( 'Standard', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), - 'categories' => array( 'Query' ), + 'categories' => array( 'query' ), 'content' => ' @@ -31,9 +32,9 @@ register_block_pattern( 'query/medium-posts', array( - 'title' => __( 'Image at Left', 'gutenberg' ), + 'title' => __( 'Image at left', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), - 'categories' => array( 'Query' ), + 'categories' => array( 'query' ), 'content' => ' @@ -53,9 +54,9 @@ register_block_pattern( 'query/small-posts', array( - 'title' => __( 'Small Image and Title', 'gutenberg' ), + 'title' => __( 'Small image and title', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), - 'categories' => array( 'Query' ), + 'categories' => array( 'query' ), 'content' => ' @@ -76,7 +77,7 @@ array( 'title' => __( 'Grid', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), - 'categories' => array( 'Query' ), + 'categories' => array( 'query' ), 'content' => ' @@ -92,9 +93,9 @@ register_block_pattern( 'query/large-title-posts', array( - 'title' => __( 'Large Title', 'gutenberg' ), + 'title' => __( 'Large title', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), - 'categories' => array( 'Query' ), + 'categories' => array( 'query' ), 'content' => '
@@ -122,7 +123,7 @@ array( 'title' => __( 'Offset', 'gutenberg' ), 'blockTypes' => array( 'core/query' ), - 'categories' => array( 'Query' ), + 'categories' => array( 'query' ), 'content' => '
@@ -158,8 +159,8 @@ register_block_pattern( 'paragraph/large-with-background-color', array( - 'title' => __( 'Large Paragraph with background color', 'gutenberg' ), - 'categories' => array( 'Text' ), + 'title' => __( 'Large paragraph with background color', 'gutenberg' ), + 'categories' => array( 'text' ), 'blockTypes' => array( 'core/paragraph' ), 'viewportWidth' => 500, 'content' => ' @@ -171,7 +172,7 @@ 'social-links/shared-background-color', array( 'title' => __( 'Social links with a shared background color', 'gutenberg' ), - 'categories' => array( 'Buttons' ), + 'categories' => array( 'buttons' ), 'blockTypes' => array( 'core/social-links' ), 'viewportWidth' => 500, 'content' => ' @@ -227,12 +228,6 @@ function() { unregister_block_pattern( 'core/' . $core_block_pattern ); } - register_block_pattern_category( 'buttons', array( 'label' => _x( 'Buttons', 'Block pattern category', 'default' ) ) ); - register_block_pattern_category( 'columns', array( 'label' => _x( 'Columns', 'Block pattern category', 'default' ) ) ); - register_block_pattern_category( 'header', array( 'label' => _x( 'Headers', 'Block pattern category', 'default' ) ) ); - register_block_pattern_category( 'gallery', array( 'label' => _x( 'Gallery', 'Block pattern category', 'default' ) ) ); - register_block_pattern_category( 'text', array( 'label' => _x( 'Text', 'Block pattern category', 'default' ) ) ); - foreach ( $new_core_block_patterns as $core_block_pattern ) { register_block_pattern( 'core/' . $core_block_pattern,