-
Notifications
You must be signed in to change notification settings - Fork 0
/
cardanopress-stake-pools.php
59 lines (48 loc) · 1.45 KB
/
cardanopress-stake-pools.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
<?php
/**
* Plugin Name: CardanoPress - Stake Pools
* Plugin URI: https://github.com/CardanoPress/plugin-stake-pools
* Author: CardanoPress
* Author URI: https://cardanopress.io
* Description: A CardanoPress extension for stake pools
* Version: 0.7.0
* License: GPL-2.0-only
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*
* Text Domain: cardanopress-stake-pools
*
* 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\StakePools\Application;
use PBWebDev\CardanoPress\StakePools\Installer;
/* ==================================================
Global constants
================================================== */
if (! defined('CP_STAKE_POOLS_FILE')) {
define('CP_STAKE_POOLS_FILE', __FILE__);
}
// Load the main plugin class
require_once plugin_dir_path(CP_STAKE_POOLS_FILE) . 'dependencies/vendor/autoload_packages.php';
// Instantiate the updater
EUM_Handler::run(CP_STAKE_POOLS_FILE, 'https://raw.githubusercontent.com/CardanoPress/plugin-stake-pools/main/update-data.json');
// Instantiate
function cpStakePools(): Application
{
static $application;
if (null === $application) {
$application = new Application(CP_STAKE_POOLS_FILE);
}
return $application;
}
cpStakePools()->setupHooks();
(new Installer(cpStakePools()))->setupHooks();