Skip to content

Commit

Permalink
Compat: Block Patterns: Add new Footers category (#44200)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcsf authored Sep 16, 2022
1 parent f62f2a8 commit bc41987
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/compat/wordpress-6.1/block-patterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ function gutenberg_register_theme_block_patterns() {
function gutenberg_register_core_block_patterns() {
$should_register_core_patterns = get_theme_support( 'core-block-patterns' );

// Register categories used for block patterns.
$pattern_category_registry = WP_Block_Pattern_Categories_Registry::get_instance();
if ( ! $pattern_category_registry->is_registered( 'footer' ) ) {
register_block_pattern_category( 'footer', array( 'label' => __( 'Footers', 'gutenberg' ) ) );
}

if ( $should_register_core_patterns ) {
$core_block_patterns = array(
'centered-footer',
Expand Down

0 comments on commit bc41987

Please sign in to comment.