-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloki-blocks.php
45 lines (41 loc) · 1.07 KB
/
loki-blocks.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
<?php
/**
* Plugin Name: Loki Blocks
* Description: Blocks for use with the Loki theme, developed by Logic Design
* Author: Logic Design & Consultancy Ltd
* Author URI: https://www.logicdesign.co.uk/
* Version: 1.0.5
* License: GPL-3.0+
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
*
* @package Loki
*/
if (!defined('ABSPATH')){
exit;
}
/**
* Initialise blocks
*/
include plugin_dir_path(__FILE__) . 'blocks/expand/index.php';
include plugin_dir_path(__FILE__) . 'blocks/lead/index.php';
include plugin_dir_path(__FILE__) . 'blocks/accordion/index.php';
include plugin_dir_path(__FILE__) . 'blocks/button/index.php';
include plugin_dir_path(__FILE__) . 'includes/LogicPluginUpdater.php';
if ( is_admin() ) {
new LogicPluginUpdater(__FILE__, 'logic-design', 'loki-blocks');
}
/**
* Categorise blocks
*/
function loki_block_category($categories, $post) {
return array_merge(
$categories,
array(
array(
'slug' => 'loki-blocks',
'title' => __('Loki Blocks', 'loki-blocks'),
),
)
);
}
add_filter('block_categories', 'loki_block_category', 10, 2);