<?php
/**
 * Web Designer Portfolio: Block Patterns
 *
 * @since Web Designer Portfolio 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Web Designer Portfolio 1.0
 *
 * @return void
 */
function web_designer_portfolio_register_block_patterns() {
	$web_designer_portfolio_block_pattern_categories = array(
		'web-designer-portfolio'    => array( 'label' => __( 'Web Designer Portfolio', 'web-designer-portfolio' ) ),
	);

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

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