-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
73 lines (56 loc) · 2.06 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
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
<?php
// Enqueue CDN for tailwind
function my_enqueued_scripts() {
wp_enqueue_script('tailwind_cdn', 'https://cdn.tailwindcss.com', [], '1.0');
}
add_action('wp_enqueue_scripts', 'my_enqueued_scripts');
// Create a brand new category
// https://gutenberghub.com/how-to-create-custom-block-category
add_filter('block_categories_all', function ($categories) {
// Adding a new category.
$categories[] = array(
'slug' => 'acf-block-json',
'title' => 'ACF Block JSON Examples'
);
return $categories;
});
// Get the Blocks
require_once get_template_directory() . "/blocks/register-blocks.php";
// TODO: create function that loops through all the blocks.
// https://developer.wordpress.org/reference/functions/register_block_type/#comment-6248
// mkdir -p "" && touch "./nested/folder/deep/more.txt"
// mkdir -p "acf-basic/text/"
// mkdir -p "acf-basic/text-area"
// mkdir -p "acf-basic/number"
// mkdir -p "acf-basic/range"
// mkdir -p "acf-basic/email"
// mkdir -p "acf-basic/url"
// mkdir -p "acf-basic/password"
// mkdir -p "acf-content/image"
// mkdir -p "acf-content/file"
// mkdir -p "acf-content/wyisywyg"
// mkdir -p "acf-content/oEmbed"
// mkdir -p "acf-content/pro-gallery"
// mkdir -p "acf-choice/select-with-text"
// mkdir -p "acf-choice/checkbox-with-text"
// mkdir -p "acf-choice/radio-button-with-text"
// mkdir -p "acf-choice/button-group-with-text"
// mkdir -p "acf-choice/true-false-with-text "
// mkdir -p "acf-relational/link"
// mkdir -p "acf-relational/post-object"
// mkdir -p "acf-relational/page-link"
// mkdir -p "acf-relational/relationship"
// mkdir -p "acf-relational/taxonomy"
// mkdir -p "acf-relational/user"
// mkdir -p "acf-advanced/google-map"
// mkdir -p "acf-advanced/date-picker"
// mkdir -p "acf-advanced/date-time-picker"
// mkdir -p "acf-advanced/time-picker"
// mkdir -p "acf-advanced/color-picker"
// mkdir -p "acf-layout/message"
// mkdir -p "acf-layout/accordion"
// mkdir -p "acf-layout/tab"
// mkdir -p "acf-layout/group"
// mkdir -p "acf-layout/pro-repeater"
// mkdir -p "acf-layout/pro-flexible-content"
// mkdir -p "acf-layout/pro-clone"