<?php
/**
 * Dental Blocks: Block Patterns
 *
 * @since Dental Blocks 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Dental Blocks 1.0
 *
 * @return void
 */
function dental_blocks_register_block_patterns() {
	$dental_blocks_block_pattern_categories = array(
		'dental-blocks'    => array( 'label' => __( 'Dental Blocks', 'dental-blocks' ) ),
	);

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

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