<?php

/**
 * strativo: Block Patterns
 *
 * @since strativo 1.0.0
 */

/**
 * Registers pattern categories for strativo
 *
 * @since strativo 1.0.0
 *
 * @return void
 */
function strativo_register_pattern_category()
{
	$block_pattern_categories = array(
		'strativo' => array('label' => __('Strativo Extra', 'strativo')),
		'strativo-header' => array('label' => __('Header Layout', 'strativo')),
		'strativo-footer' => array('label' => __('Footer Layout', 'strativo')),
		'strativo-templates' => array('label' => __('Templates', 'strativo')),
		'strativo-hero' => array('label' => __('Hero / Banner / Slider', 'strativo')),
		'strativo-about' => array('label' => __('About / Content', 'strativo')),
		'strativo-service' => array('label' => __('Services Section', 'strativo')),
		'strativo-team' => array('label' => __('Teams', 'strativo')),
		'strativo-testimonial' => array('label' => __('Testimonials & Reviews', 'strativo')),
		'strativo-faq' => array('label' => __('FAQS', 'strativo')),
		'strativo-offer' => array('label' => __('Offer/ Promotions', 'strativo')),
		'strativo-portfolio' => array('label' => __('Portfolio & Showcase Gallery', 'strativo')),
		'strativo-pricing' => array('label' => __('Pricing', 'strativo')),
		'strativo-store' => array('label' => __('Store / Shop Sections', 'strativo')),
		'strativo-post' => array('label' => __('Posts / Blog', 'strativo')),
		'strativo-counter' => array('label' => __('Counters / Numbers', 'strativo')),
		'strativo-cta' => array('label' => __('CTA: Call To Action', 'strativo')),
		'strativo-wcu' => array('label' => __('Why Choose Us', 'strativo')),
		'strativo-logocase' => array('label' => __('Logo Showcase', 'strativo')),
		'strativo-contact' => array('label' => __('Contacts / Newsletter', 'strativo')),
	);

	$block_pattern_categories = apply_filters('strativo_block_pattern_categories', $block_pattern_categories);

	foreach ($block_pattern_categories as $name => $properties) {
		if (!WP_Block_Pattern_Categories_Registry::get_instance()->is_registered($name)) {
			register_block_pattern_category($name, $properties); // phpcs:ignore WPThemeReview.PluginTerritory.ForbiddenFunctions.editor_blocks_register_block_pattern_category
		}
	}
}
add_action('init', 'strativo_register_pattern_category', 9);
