<?php

/**
 * Plugin Name:       Dynamiques Blocks
 * Description:       Un série de Blocks sur mesure pour l'écriture du contenu de Dynamiques
 * Author:            Deligraph
 * Text Domain:       dynamiques-blocks
 */

if (! defined('ABSPATH')) {
	exit; // Exit if accessed directly.
}

function dynamiques_add_block_categories($categories)
{
	return array_merge(

		[
			[
				'slug'  => 'dynamiques-blocks',
				'title' => __('Blocs Dynamiques', 'dynamiques-blocks'),
				'icon'  => 'heart',
			],

		],
		$categories
	);
}
add_action('block_categories_all', 'dynamiques_add_block_categories', 25, 2);


/* ----------------------------------------------------------------
	##### REQUIRE GUTENBERG BLOCKS
 ------------------------------------------------------------------*/
require_once __DIR__ . '/blocks/dernieres-dynamiques/dernieres-dynamiques.php';
require_once __DIR__ . '/blocks/explore-tags/explore-tags.php';
require_once __DIR__ . '/blocks/revues-precedentes/revues-precedentes.php';
require_once __DIR__ . '/blocks/nos-recommandations/nos-recommandations.php';
require_once __DIR__ . '/blocks/sitemap/sitemap.php';




/* ---------------------------
	##### REGISTER ACF BLOCKS
 ---------------------------*/
function dynamiques_register_acf_blocks_init()
{
	register_block_type(__DIR__ . '/acf-blocks/team-authors');
	register_block_type(__DIR__ . '/acf-blocks/statistics-datas');
	// register_block_type(__DIR__ . '/acf-blocks/sitemap');
}
add_action('init', 'dynamiques_register_acf_blocks_init');
