<?php
/**
 * Block patterns
 *
 * @package nexter-fse
 * @since 1.0.0
 */

/**
 * Registers block patterns and block pattern categories.
 *
 * @return void
 * @since 1.0.0
 *
 */
function nexter_fse_register_block_patterns() {

    /**
     * Register an card block pattern category.
     *
     * @since 1.0.0
     */
    register_block_pattern_category(
        'nexter-fse-cards',
        array('label' => esc_html__('Nexter Cards', 'nexter-fse'))
    );
    /**
     * Register a hero block pattern category.
     *
     * @since 1.0.0
     */
    register_block_pattern_category(
        'nexter-fse-hero',
        array('label' => esc_html__('Nexter Hero', 'nexter-fse'))
    );
    /**
     * Register a Feature block pattern category.
     *
     * @since 1.0.0
     */
    register_block_pattern_category(
        'nexter-fse-feature',
        array('label' => esc_html__('Nexter Feature', 'nexter-fse'))
    );
    /**
     * Register a CTA block pattern category.
     *
     * @since 1.0.0
     */
    register_block_pattern_category(
        'nexter-fse-cta',
        array('label' => esc_html__('Nexter CTA', 'nexter-fse'))
    );

}

add_action('init', 'nexter_fse_register_block_patterns', 9);

/**
 * This is an example of how to unregister a core block pattern and a block pattern category.
 * Must be called after the patterns and pattern categories that you want to unregister have been added.
 *
 * @see https://developer.wordpress.org/reference/functions/unregister_block_pattern/
 * @see https://developer.wordpress.org/reference/functions/unregister_block_pattern_category/
 *
 * @since 1.0.0
 *
 * @return void
 */
function nexter_fse_unregister_patterns() {
    unregister_block_pattern_category('header');
}

add_action('init', 'nexter_fse_unregister_patterns', 10);
