-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmaintain.class.php
71 lines (62 loc) · 1.21 KB
/
maintain.class.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
61
62
63
64
65
66
67
68
69
70
71
<?php
defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
class editorplus_maintain extends PluginMaintain
{
private $default_conf = array(
'editor' => 'ckeditor',
'config_quill' => [
'button/ql-bold',
'button/ql-italic',
'button/ql-underline',
'button/ql-strike',
'button/ql-header',
'span/ql-color',
'span/ql-background',
'span/ql-align',
'button/ql-clean',
],
);
function __construct($plugin_id)
{
parent::__construct($plugin_id);
}
/**
* Plugin install
*/
function install($plugin_version, &$errors = array())
{
global $conf;
if (empty($conf['editorplus']))
{
// add config quill in $conf
conf_update_param('editorplus', $this->default_conf, true);
}
}
/**
* Plugin activate
*/
function activate($plugin_version, &$errors = array())
{
}
/**
* Plugin deactivate
*/
function deactivate()
{
}
/**
* Plugin update
*/
function update($old_version, $new_version, &$errors = array())
{
$this->install($new_version, $errors);
}
/**
* Plugin uninstallation
*/
function uninstall()
{
// delete configuration
conf_delete_param('editorplus');
}
}