forked from CardanoPress/cardanopress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcardanopress.php
54 lines (44 loc) · 1.21 KB
/
cardanopress.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
<?php
/**
* Plugin Name: CardanoPress
* Plugin URI: https://github.com/CardanoPress/cardanopress
* Author: CardanoPress
* Author URI: https://cardanopress.io
* Description: Core plugin for the suite of CardanoPress plugins
* Version: 1.23.0
* License: GPL-2.0-only
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*
* Text Domain: cardanopress
*
* Requires at least: 5.9
* Requires PHP: 7.4
*
* @package ThemePlate
* @since 0.1.0
*/
// Accessed directly
if (! defined('ABSPATH')) {
exit;
}
use PBWebDev\CardanoPress\Application;
use PBWebDev\CardanoPress\Installer;
/* ==================================================
Global constants
================================================== */
if (! defined('CARDANOPRESS_FILE')) {
define('CARDANOPRESS_FILE', __FILE__);
}
// Load the main plugin class
require_once plugin_dir_path(CARDANOPRESS_FILE) . 'dependencies/vendor/autoload_packages.php';
function cardanoPress(): Application
{
static $application;
if (null === $application) {
$application = new Application(CARDANOPRESS_FILE);
}
return $application;
}
// Instantiate
cardanoPress()->setupHooks();
(new Installer(cardanoPress()))->setupHooks();