49 lines
886 B
PHP
Executable File
49 lines
886 B
PHP
Executable File
<?php
|
|
|
|
|
|
/* ---------------------------
|
|
BLOCKS CATEGORY
|
|
---------------------------*/
|
|
function lhoist_add_block_categories($categories)
|
|
{
|
|
return array_merge(
|
|
|
|
[
|
|
[
|
|
'slug' => 'lhoist-content-blocks',
|
|
'title' => 'lhoist blocks ',
|
|
'icon' => 'heart',
|
|
],
|
|
|
|
],
|
|
$categories
|
|
);
|
|
}
|
|
add_action('block_categories_all', 'lhoist_add_block_categories', 10, 2);
|
|
|
|
|
|
/* ---------------------------
|
|
REGISTER ACF BLOCKS
|
|
---------------------------*/
|
|
|
|
|
|
|
|
function lhoist_content_blocks_init()
|
|
{
|
|
if (!defined('ABSPATH')) exit; // Exit if accessed directly.
|
|
|
|
|
|
// Statics
|
|
register_block_type(get_template_directory() . '/blocks/search-and-find/build');
|
|
|
|
// ACF
|
|
register_block_type(get_template_directory() . '/blocks/acf/home/home-header');
|
|
}
|
|
add_action('init', 'lhoist_content_blocks_init');
|
|
|
|
|
|
|
|
|
|
|
|
// require_once(get_template_directory() . '/blocks/todo-list/todo-list.php');
|