-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcardanopress-governance.php
More file actions
58 lines (48 loc) · 1.52 KB
/
cardanopress-governance.php
File metadata and controls
58 lines (48 loc) · 1.52 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
<?php // phpcs:ignore PSR1.Files.SideEffects.FoundWithSymbols
/**
* Plugin Name: CardanoPress - Governance
* Plugin URI: https://github.com/CardanoPress/plugin-governance
* Author: CardanoPress
* Author URI: https://cardanopress.io
* Description: A CardanoPress extension for governance
* Version: 1.10.0
* License: GPL-2.0-only
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*
* Text Domain: cardanopress-governance
*
* Requires at least: 5.9
* Requires PHP: 7.4
*
* Requires Plugins: cardanopress
*
* @package ThemePlate
* @since 0.1.0
*/
// Accessed directly
if (! defined('ABSPATH')) {
exit;
}
use PBWebDev\CardanoPress\Governance\Application;
use PBWebDev\CardanoPress\Governance\Installer;
/* ==================================================
Global constants
================================================== */
if (! defined('CP_GOVERNANCE_FILE')) {
define('CP_GOVERNANCE_FILE', __FILE__);
}
// Load the main plugin class
require_once plugin_dir_path(CP_GOVERNANCE_FILE) . 'dependencies/vendor/autoload_packages.php';
// phpcs:ignore Generic.Files.LineLength.TooLong
require_once plugin_dir_path(CP_GOVERNANCE_FILE) . 'dependencies/vendor/woocommerce/action-scheduler/action-scheduler.php';
// Instantiate
function cpGovernance(): Application
{
static $application;
if (null === $application) {
$application = new Application(CP_GOVERNANCE_FILE);
}
return $application;
}
cpGovernance()->setupHooks();
(new Installer(cpGovernance()))->setupHooks();