<?php
/**
 * Professional Painting: Block Patterns
 *
 * @since Professional Painting 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Professional Painting 1.0
 *
 * @return void
 */
function professional_painting_register_block_patterns() {
	$professional_painting_block_pattern_categories = array(
		'professional-painting'    => array( 'label' => esc_html__( 'Professional Painting', 'professional-painting' ) ),
	);

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

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