<?php
/**
 * Block Patterns
 *
 * @package project-manager
 * @since 1.0
 */

function project_manager_register_block_patterns() {
	$project_manager_block_pattern_categories = array(
		'project-manager' => array( 'label' => esc_html__( 'Project Manager', 'project-manager' ) ),
		'pages' => array( 'label' => esc_html__( 'Pages', 'project-manager' ) ),
	);

	$project_manager_block_pattern_categories = apply_filters( 'project_manager_project_manager_block_pattern_categories', $project_manager_block_pattern_categories );

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