aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-23 15:16:54 -0700
committerredmatrix <git@macgirvin.com>2016-04-23 15:16:54 -0700
commitdf2990b27ee1e55cfe68f8f532b6be76d176ba62 (patch)
tree0d461960855f66881cbb19e2891e913793b1e632 /include/plugin.php
parenta8823ae7d8e3e87f4cee8d603f74996f1fe202c9 (diff)
downloadvolse-hubzilla-df2990b27ee1e55cfe68f8f532b6be76d176ba62.tar.gz
volse-hubzilla-df2990b27ee1e55cfe68f8f532b6be76d176ba62.tar.bz2
volse-hubzilla-df2990b27ee1e55cfe68f8f532b6be76d176ba62.zip
Class method support for hooks
Diffstat (limited to 'include/plugin.php')
-rwxr-xr-xinclude/plugin.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 80e3ae20e..92040f297 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -284,8 +284,9 @@ function call_hooks($name, &$data = null) {
foreach(App::$hooks[$name] as $hook) {
if($hook[0])
@include_once($hook[0]);
-
- if(function_exists($hook[1])) {
+ if(preg_match('|^a:[0-9]+:{.*}$|s', $hook[1]))
+ $hook[1] = unserialize($hook[1]);
+ if(is_callable($hook[1])) {
$func = $hook[1];
if($hook[3])
$func($data);