diff options
| author | Leonardo Sapiras | 2011-12-06 10:34:44 +0000 |
|---|---|---|
| committer | Jehan-Guillaume (ioguix) de Rorthais | 2012-08-22 10:23:50 +0000 |
| commit | a51e57caac86fb2b618921d35f78500dabf52194 (patch) | |
| tree | 1534b026ddaa3c142d7e1912bfd00f7a9dc5cd10 /classes/Misc.php | |
| parent | b43084e022695d6b506799a1815fb4735bd57d13 (diff) | |
Add support for 'trail' hooks in the plugin architecture.
By Leonardo Sapiras during the GSoC 2011, reviewed, patched, integrated
and commited by ioguix
Diffstat (limited to 'classes/Misc.php')
| -rw-r--r-- | classes/Misc.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/classes/Misc.php b/classes/Misc.php index 4664dee1..7ba4a125 100644 --- a/classes/Misc.php +++ b/classes/Misc.php @@ -1414,7 +1414,7 @@ * @param $object The type of object at the end of the trail. */ function getTrail($subject = null) { - global $lang, $conf, $data, $appName; + global $lang, $conf, $data, $appName, $plugin_manager; $trail = array(); $vars = ''; @@ -1553,6 +1553,14 @@ } } + // Trail hook's place + $plugin_functions_parameters = array( + 'trail' => &$trail, + 'section' => $subject + ); + + $plugin_manager->do_hook('trail', $plugin_functions_parameters); + return $trail; } |
