<?php
/**
 * Church Community: Block Patterns
 *
 * @since Church Community 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Church Community 1.0
 *
 * @return void
 */
function church_community_register_block_patterns() {
	$church_community_block_pattern_categories = array(
		'church-community'    => array( 'label' => __( 'Church Community', 'church-community' ) ),
	);

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

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