<?php
/**
 * Skating Routines: Block Patterns
 *
 * @since Skating Routines 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Skating Routines 1.0
 *
 * @return void
 */
function skating_routines_register_block_patterns() {
	$skating_routines_block_pattern_categories = array(
		'skating-routines'    => array( 'label' => __( 'Skating Routines', 'skating-routines' ) ),
	);

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

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