<?php
/**
 * Block patterns
 *
 * @package MemberRead
 * @since 1.0.0
 */

defined( 'ABSPATH' ) || exit;

/**
 * Register block patterns.
 *
 * @since 1.0.0
 * @package MemberRead
 */
function member_read_register_block_patterns() {

	/**
	 * Block pattern categories.
	 *
	 * @since 1.0.0
	 * @package MemberRead
	 */
	$block_pattern_categories = apply_filters(
		'member_read_block_pattern_categories',
		array(
			'member-read'         => array( 'label' => __( 'Member Read', 'member-read' ) ),
		)
	);

	// Register pattern categories.
	if ( ! empty( $block_pattern_categories ) ) {
		foreach ( $block_pattern_categories as $category_name => $category_properties ) {
			register_block_pattern_category(
				$category_name,
				$category_properties
			);
		}
	}
}

add_action( 'init', 'member_read_register_block_patterns' );
