-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathe_event.php
68 lines (54 loc) · 1.04 KB
/
e_event.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
<?php
/**
* @file
*
*/
if(!defined('e107_INIT'))
{
exit;
}
/**
* Class alexa_event.
*/
class alexa_event
{
/**
* Configure functions/methods to run when specific e107 events are triggered.
*
* @return array
*/
function config()
{
$event = array();
// After a plugin is installed.
$event[] = array(
'name' => "admin_plugin_install",
'function' => "updateAddonList",
);
// After a plugin is uninstalled.
$event[] = array(
'name' => "admin_plugin_uninstall",
'function' => "updateAddonList",
);
// After a plugin is upgraded.
$event[] = array(
'name' => "admin_plugin_upgrade",
'function' => "updateAddonList",
);
// Plugin information is updated.
$event[] = array(
'name' => "admin_plugin_refresh",
'function' => "updateAddonList",
);
return $event;
}
/**
* Callback function to update metatag addon list.
*/
function updateAddonList()
{
e107_require_once(e_PLUGIN . 'alexa/includes/alexa.class.php');
$alexa = new Alexa();
$alexa->updateAddonList();
}
}