<?php
/**
 * Horse Saddle: Block Patterns
 *
 * @since Horse Saddle 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Horse Saddle 1.0
 *
 * @return void
 */
function horse_saddle_register_block_patterns() {
	$horse_saddle_block_pattern_categories = array(
		'horse-saddle'    => array( 'label' => __( 'Horse Saddle', 'horse-saddle' ) ),
	);

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

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