<?php
/**
 * Product Manufacturing: Block Patterns
 *
 * @since Product Manufacturing 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Product Manufacturing 1.0
 *
 * @return void
 */
function product_manufacturing_register_block_patterns() {
	$product_manufacturing_block_pattern_categories = array(
		'product-manufacturing'    => array( 'label' => esc_html__( 'Product Manufacturing', 'product-manufacturing' ) ),
	);

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

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