blocks.php
2.36 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array(
'page_title' => 'Theme General Settings',
'menu_title' => 'Theme Settings',
'menu_slug' => 'theme-general-settings',
'capability' => 'edit_posts',
'redirect' => false
));
}
add_action('acf/init', 'my_acf_init_block_types');
function my_acf_init_block_types() {
acf_register_block_type( array(
'title' => __( 'MSF PI Chart', 'client_textdomain' ),
'name' => 'msf-pi',
'render_template' => 'blocks/msf-PI/msf-PI.php',
'mode' => 'edit'
));
acf_register_block_type( array(
'title' => __( 'Promo Area', 'client_textdomain' ),
'name' => 'msf-promo-area',
'render_template' => 'blocks/promo-area/promo-area.php',
'mode' => 'edit'
));
acf_register_block_type( array(
'title' => __( 'Project Lead', 'client_textdomain' ),
'name' => 'msf-project-lead',
'render_template' => 'blocks/project-lead/project-lead.php',
'mode' => 'edit'
));
acf_register_block(array(
'name' => 'call-out-block',
'title' => __('Call Out Block'),
'description' => __('A custom block for Call Out Block items.'),
'render_template' => 'blocks/call-out-block/call-out-block.php',
'category' => 'layout',
'icon' => 'excerpt-view',
'mode' => 'edit',
'supports' => [
'align' => false,
'anchor' => true,
'customClassName' => true
]
));
acf_register_block_type( array(
'title' => __( 'Carousel', 'client_textdomain' ),
'name' => 'carousel',
'render_template' => 'blocks/carousel/carousel.php',
'mode' => 'edit',
'supports' => [
'align' => false,
'anchor' => true,
'customClassName' => true
]
));
acf_register_block_type( array(
'title' => __( 'Relevant Resources', 'client_textdomain' ),
'name' => 'relevant-resources',
'render_template' => 'blocks/relevant-resources/relevant-resources.php',
'mode' => 'edit',
'supports' => [
'align' => false,
'anchor' => true,
'customClassName' => true
]
));
}