<?php
/**
 * Honey Store: Block Patterns
 *
 * @since Honey Store 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Honey Store 1.0
 *
 * @return void
 */
function honey_store_register_block_patterns() {
	$honey_store_block_pattern_categories = array(
		'honey-store'    => array( 'label' => __( 'Honey Store', 'honey-store' ) ),
	);

	$honey_store_block_pattern_categories = apply_filters( 'honey_store_block_pattern_categories', $honey_store_block_pattern_categories );

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