Repository navigation
Expand file tree
/
Copy pathstatus-api.php
More file actions
49 lines (42 loc) · 1.76 KB
/
Copy pathstatus-api.php
File metadata and controls
49 lines (42 loc) · 1.76 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
<?php
/**
* Plugin Name: Status API
* Description: Deze plugin maakt een API end-point aan voor het geven van storings informatie.
* Version: 0.9.12
* Requires at least: 5.3
* Requires PHP: 7.4
* Author: Hanno-Wybren Mook
* License: Proprietary
* Update URI: https://github.com/SURFnet/wp_status_api
*/
// Voorkom direct toegang tot het bestand
if (!defined('ABSPATH')) {
exit;
}
// Hoofdbestand van de plugin; nodig voor activatie-hooks en asset-URL's vanuit includes/.
// Let op: dit bestand (wp_status_api/status-api.php) nooit hernoemen, anders deactiveert
// WordPress de plugin op alle sites.
define('STATUS_API_PLUGIN_FILE', __FILE__);
// Updates via GitHub Releases (Plugin Update Checker)
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
if (class_exists('\\YahnisElsts\\PluginUpdateChecker\\v5\\PucFactory')) {
$update_checker = \YahnisElsts\PluginUpdateChecker\v5\PucFactory::buildUpdateChecker(
'https://github.com/SURFnet/wp_status_api',
__FILE__,
'wp_status_api'
);
// Gebruik de zip asset van een GitHub Release (consistent met onze build).
if (method_exists($update_checker, 'getVcsApi') && $update_checker->getVcsApi()) {
$update_checker->getVcsApi()->enableReleaseAssets();
}
}
}
require_once __DIR__ . '/includes/class-status-api-plugin.php';
require_once __DIR__ . '/includes/class-status-api-manager.php';
require_once __DIR__ . '/includes/class-status-message-manager.php';
require_once __DIR__ . '/includes/class-status-history-manager.php';
require_once __DIR__ . '/includes/class-status-audit-log.php';
// Start de plugin
global $status_api_plugin;
$status_api_plugin = Status_API_Plugin::get_instance();