moderated comment templates
This commit is contained in:
parent
8a5dcf64d8
commit
496782e468
5 changed files with 112 additions and 0 deletions
|
@ -70,8 +70,10 @@ function reload_plugins() {
|
|||
$installed = array();
|
||||
|
||||
$parr = explode(',',$plugins);
|
||||
|
||||
if(count($parr)) {
|
||||
foreach($parr as $pl) {
|
||||
|
||||
$pl = trim($pl);
|
||||
|
||||
$fname = 'addon/' . $pl . '/' . $pl . '.php';
|
||||
|
@ -101,6 +103,7 @@ function reload_plugins() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}}
|
||||
|
||||
|
||||
|
@ -163,6 +166,14 @@ function call_hooks($name, &$data = null) {
|
|||
$func = $hook[HOOK_FUNCTION];
|
||||
$func($a,$data);
|
||||
}
|
||||
else {
|
||||
// remove orphan hooks
|
||||
q("delete from hook where hook = '%s' and file = '$s' and function = '%s' limit 1",
|
||||
dbesc($hook[HOOK_HOOK]),
|
||||
dbesc($hook[HOOK_FILE]),
|
||||
dbesc($hook[HOOK_FUNCTION])
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue