carhop__plugins__PROD-DEV/plugins/carhop-blocks/blocks/decouvrez-prochainement/decouvrez-prochainement.php
Antoine M a3a57e92da
All checks were successful
continuous-integration/drone/push Build is passing
FEATURE Introducing pre-filled decouvrez-prochainement block
2025-10-20 16:28:50 +02:00

37 lines
1.2 KiB
PHP

<?php
/**
* Plugin Name: Localisation Map
* Description: Example block scaffolded with Create Block tool.
* Version: 0.1.0
* Requires at least: 6.7
* Requires PHP: 7.4
* Author: The WordPress Contributors
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: localisation-map
*
* @package CreateBlock
*/
if (! defined('ABSPATH')) {
exit; // Exit if accessed directly.
}
function create_block_decouvrez_prochainement_block_init()
{
if (function_exists('wp_register_block_types_from_metadata_collection')) {
wp_register_block_types_from_metadata_collection(__DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php');
return;
}
if (function_exists('wp_register_block_metadata_collection')) {
wp_register_block_metadata_collection(__DIR__ . '/build', __DIR__ . '/build/blocks-manifest.php');
}
$manifest_data = require __DIR__ . '/build/blocks-manifest.php';
foreach (array_keys($manifest_data) as $block_type) {
register_block_type(__DIR__ . "/build/{$block_type}");
}
}
add_action('init', 'create_block_decouvrez_prochainement_block_init');