<?php
/**
 * Block Patterns
 *
 * @package coffee_shop_bistro
 * @since 1.0
 */

function coffee_shop_bistro_register_block_patterns() {
	$coffee_shop_bistro_block_pattern_categories = array(
		'coffee-shop-bistro' => array( 'label' => esc_html__( 'Coffee Shop Bistro', 'coffee-shop-bistro' ) ),
		'pages' => array( 'label' => esc_html__( 'Pages', 'coffee-shop-bistro' ) ),
	);

	$coffee_shop_bistro_block_pattern_categories = apply_filters( 'coffee_shop_bistro_coffee_shop_bistro_block_pattern_categories', $coffee_shop_bistro_block_pattern_categories );

	foreach ( $coffee_shop_bistro_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', 'coffee_shop_bistro_register_block_patterns', 9 );