-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathknowledge-layer.php
More file actions
79 lines (71 loc) · 2.28 KB
/
Copy pathknowledge-layer.php
File metadata and controls
79 lines (71 loc) · 2.28 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
<?php
/**
* Plugin Name: Knowledge Layer
* Plugin URI: https://github.com/wooserv/knowledge-layer
* Description: Transform WordPress content into Open Knowledge Format (OKF) documents and knowledge graphs.
* Author: WooServ Team
* Author URI: https://wooserv.com/
* Version: 1.0.0
* License: GPL-3.0-or-later
* Requires at least: 6.4
* Tested up to: 7.0
* Requires PHP: 8.1
* Text Domain: knowledge-layer
* Domain Path: /languages
*
* Copyright 2026 WooServ, LLC. (contact@wooserv.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* @package KnowledgeLayer
*/
if (! defined('ABSPATH')) {
exit;
}
if (PHP_VERSION_ID < 80100) {
add_action('admin_notices', static function (): void {
echo '<div class="notice notice-error"><p>';
printf(
esc_html__(
'Knowledge Layer requires PHP %1$s or higher. Your site is running PHP %2$s.',
'knowledge-layer'
),
'8.1',
esc_html(PHP_VERSION)
);
echo '</p></div>';
});
return;
}
define('KNOWLEDGE_LAYER_VERSION', '1.0.0');
define('KNOWLEDGE_LAYER_FILE', __FILE__);
define('KNOWLEDGE_LAYER_PATH', plugin_dir_path(__FILE__));
define('KNOWLEDGE_LAYER_URL', plugin_dir_url(__FILE__));
require_once KNOWLEDGE_LAYER_PATH . 'vendor/autoload.php';
register_activation_hook(
__FILE__,
static function (): void {
$rewriteRules = new \WooServ\KnowledgeLayer\Routing\RewriteRules();
$rewriteRules->flush();
}
);
register_deactivation_hook(
__FILE__,
static function (): void {
flush_rewrite_rules();
}
);
add_action('plugins_loaded', static function () {
(new \WooServ\KnowledgeLayer\Plugin())->boot();
});