plugins: only execute hook if selected

This commit is contained in:
Franco Fichtner 2016-11-20 14:36:55 +01:00
parent 9dd734b355
commit 9991dc6c21

View File

@ -170,7 +170,7 @@ function plugins_configure($hook, $verbose = false)
if (function_exists($func)) {
$workers = $func();
foreach ($workers as $when => $worker) {
if (is_array($worker)) {
if ($hook == $when && is_array($worker)) {
foreach ($worker as $task) {
$task($verbose);
}