-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugin.php
More file actions
64 lines (55 loc) · 1.53 KB
/
plugin.php
File metadata and controls
64 lines (55 loc) · 1.53 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
59
60
61
62
63
64
<?php
/**
* Plugin Name: Power Contract
* Plugin URI: https://github.com/j7-dev/wp-power-contract
* Description: WordPress 線上簽合約 & 審批 外掛
* Version: 0.0.10
* Requires at least: 5.7
* Requires PHP: 8.0
* Author: J7
* Author URI: https://github.com/j7-dev
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: power_contract
* Domain Path: /languages
* Tags: contract, signature, approval
*/
declare ( strict_types=1 );
namespace J7\PowerContract;
if ( \class_exists( 'J7\PowerContract\Plugin' ) ) {
return;
}
require_once __DIR__ . '/vendor/autoload.php';
/**
* Class Plugin
*/
final class Plugin {
use \J7\WpUtils\Traits\PluginTrait;
use \J7\WpUtils\Traits\SingletonTrait;
/**
* Constructor
*/
public function __construct() {
// if your plugin depends on other plugins, you can add them here
$this->required_plugins = [
[
'name' => 'Powerhouse',
'slug' => 'powerhouse',
'source' => 'https://github.com/j7-dev/wp-powerhouse/releases/latest/download/powerhouse.zip',
'version' => '3.0.2',
'required' => true,
],
];
$this->init(
[
'app_name' => 'Power Contract',
'github_repo' => 'https://github.com/j7-dev/wp-power-contract',
'callback' => [ Bootstrap::class, 'instance' ],
'lc' => false,
'hide_submenu' => true,
]
);
self::$template_page_names = [ 'settings' ];
}
}
Plugin::instance();