<?php
/**
 * Author Book Writer: Block Patterns
 *
 * @since Author Book Writer 1.0
 */

/**
 * Registers block patterns and categories.
 *
 * @since Author Book Writer 1.0
 *
 * @return void
 */
function author_book_writer_register_block_patterns() {
	$author_book_writer_block_pattern_categories = array(
		'author-book-writer'    => array( 'label' => __( 'Author Book Writer', 'author-book-writer' ) ),
	);

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

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