FEATURE Enqueing acf-blocks with new file organisation
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
aa0c4b23a8
commit
d1bea47630
|
|
@ -22,6 +22,15 @@ if (! defined('ABSPATH')) {
|
|||
##### REGISTER BLOCKS #####
|
||||
function create_block_carhop_blocks_block_init()
|
||||
{
|
||||
|
||||
|
||||
##### REGISTER ACF BLOCKS #####
|
||||
register_block_type(__DIR__ . '/acf-blocks/gallery');
|
||||
register_block_type(__DIR__ . '/acf-blocks/social-networks');
|
||||
register_block_type(__DIR__ . '/acf-blocks/custom-video');
|
||||
register_block_type(__DIR__ . '/acf-blocks/team-carhop');
|
||||
|
||||
|
||||
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;
|
||||
|
|
@ -35,12 +44,6 @@ function create_block_carhop_blocks_block_init()
|
|||
foreach (array_keys($manifest_data) as $block_type) {
|
||||
register_block_type(__DIR__ . "/build/{$block_type}");
|
||||
}
|
||||
|
||||
##### REGISTER ACF BLOCKS #####
|
||||
register_block_type(__DIR__ . '/acf-blocks/gallery');
|
||||
register_block_type(__DIR__ . '/acf-blocks/social-networks');
|
||||
register_block_type(__DIR__ . '/acf-blocks/custom-video');
|
||||
register_block_type(__DIR__ . '/acf-blocks/team-carhop');
|
||||
}
|
||||
add_action('init', 'create_block_carhop_blocks_block_init');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user