<?php
/**
 * BPO Services: Block Patterns
 *
 * @since BPO Services 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since BPO Services 1.0
 *
 * @return void
 */
function bpo_services_register_block_patterns() {
	$bpo_services_block_pattern_categories = array(
		'bpo-services'    => array( 'label' => esc_html__( 'BPO Services', 'bpo-services' ) ),
	);

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

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