-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpdc-samenwerkende-catalogi.php
60 lines (51 loc) · 1.86 KB
/
pdc-samenwerkende-catalogi.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
<?php declare(strict_types=1);
/**
* Plugin Name: PDC Samenwerkende Catalogi
* Plugin URI: https://www.openwebconcept.nl/
* Description: Plugin to create a XML feed according to the Samenwerkende Catalogi requirements.
* Version: 2.1.3
* Author: Yard | Digital Agency
* Author URI: https://www.yard.nl/
* License: GPL-3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.txt
* Text Domain: pdc-samenwerkende-catalogi
* Domain Path: /languages
*/
use OWC\PDC\SamenwerkendeCatalogi\Autoloader;
use OWC\PDC\SamenwerkendeCatalogi\Foundation\Plugin;
/**
* If this file is called directly, abort.
*/
if (! defined('WPINC')) {
die;
}
/**
* Manual loaded file: the autoloader.
*/
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
} else {
require_once __DIR__ . '/autoloader.php';
$autoloader = new Autoloader();
}
/**
* Begin execution of the plugin
*
* This hook is called once any activated plugins have been loaded. Is generally used for immediate filter setup, or
* plugin overrides. The plugins_loaded action hook fires early, and precedes the setup_theme, after_setup_theme, init
* and wp_loaded action hooks.
*/
add_action('plugins_loaded', function () {
if (! class_exists('OWC\PDC\Base\Foundation\Plugin')) {
add_action('admin_notices', function () {
$list = '<p>' . __(
'The following plugins are required to use the PDC Samenwerkende Catalogi:',
'pdc-samenwerkende-catalogi'
) . '</p><ol><li>OpenPDC Base (version >= 3.0.0)</li></ol>';
printf('<div class="notice notice-error"><p>%s</p></div>', $list);
});
\deactivate_plugins(\plugin_basename(__FILE__));
return;
}
$plugin = (new Plugin(__DIR__))->boot();
}, 10);