-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.php
32 lines (28 loc) · 1.04 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* enqueue TwentyTwenty styles
*/
function enqueue_parent_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
}
add_action( 'wp_enqueue_scripts', 'enqueue_parent_styles' );
/**
* Enqueues Bootstrap on the frontend and in the block editor.
*/
function enqueue_bootstrap() {
wp_enqueue_style('bootstrap-styles', 'https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css');
wp_enqueue_script( 'bootstrap-scripts','https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js', array( 'jquery' ), '', true );
}
add_action( 'enqueue_block_assets', 'enqueue_bootstrap' );
/**
* Registers the accordion block (and any others you want to make).
*/
function register_acf_block_types() {
acf_register_block_type(array(
'name' => 'accordion',
'title' => __('Accordion'),
'category' => 'custom',
'render_template' => 'blocks/accordion.php',
));
}
add_action( 'acf/init', 'register_acf_block_types' );