<?php
/**
 * Block Patterns
 *
 * @package machine_learning
 * @since 1.0
 */

function machine_learning_register_block_patterns() {
	$machine_learning_block_pattern_categories = array(
		'machine-learning' => array( 'label' => esc_html__( 'Machine Learning', 'machine-learning' ) ),
		'pages' => array( 'label' => esc_html__( 'Pages', 'machine-learning' ) ),
	);

	$machine_learning_block_pattern_categories = apply_filters( 'machine_learning_machine_learning_block_pattern_categories', $machine_learning_block_pattern_categories );

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