<?php
/**
 * Tailor Suits: Block Patterns
 *
 * @since Tailor Suits 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Tailor Suits 1.0
 *
 * @return void
 */
function tailor_suits_register_block_patterns() {
	$tailor_suits_block_pattern_categories = array(
		'tailor-suits'    => array( 'label' => __( 'Tailor Suits', 'tailor-suits' ) ),
	);

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

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