-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtweak.gutenberg.php
58 lines (53 loc) · 1.4 KB
/
tweak.gutenberg.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
<?php
function my_plugin_allowed_block_types($allowed_block_types, $post)
{
return [
'core/heading',
'core/paragraph',
'core/image',
'core/html',
'core/block',
'core/separator',
'core/preformatted',
'core/gallery',
'core/quote',
'core/embed',
'core/list'
#'core/text-columns',
#'core/video', Tas bort, da vi bruker embed i stedet for
/* 'core/table',*/
#'core/spacer',
#'core/more',
#'core/missing',
#'core/button',
#'core/columns',
#'core/column',
];
}
/*
function my_plugin_block_categories($categories, $post)
{
var_dump($categories);
return $categories;
return array_merge(
$categories,
array(
array(
'slug' => 'my-category',
'title' => __('My category', 'my-plugin'),
'icon' => 'wordpress',
),
)
);
}
add_filter('block_categories', 'my_plugin_block_categories', 10, 2);
*/
add_filter('allowed_block_types', 'my_plugin_allowed_block_types', 10, 2);
function UKMwpat_gutenberg_mod() {
wp_enqueue_script(
'ukmnorge-blacklist-blocks',
plugins_url( 'js/gutenberg-lite.js', __FILE__ ),
array( 'wp-blocks', 'wp-dom-ready', 'wp-edit-post' )
);
}
add_action( 'enqueue_block_editor_assets', 'UKMwpat_gutenberg_mod' );