diff options
author | friendica <info@friendica.com> | 2012-11-03 20:21:55 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-11-03 20:21:55 -0700 |
commit | a746eb751f0605101cec93e41f0a15b3bc572745 (patch) | |
tree | 46890cbb485dde0f3b17e53988fafb01ba74b54f | |
parent | be0f376d6a9c3995eb454dd4e7806d329d4b4afd (diff) | |
download | volse-hubzilla-a746eb751f0605101cec93e41f0a15b3bc572745.tar.gz volse-hubzilla-a746eb751f0605101cec93e41f0a15b3bc572745.tar.bz2 volse-hubzilla-a746eb751f0605101cec93e41f0a15b3bc572745.zip |
note about extending the hook system for application wrappers
-rw-r--r-- | include/plugin.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/plugin.php b/include/plugin.php index c6d62f36e..baed2ab3b 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -150,6 +150,11 @@ function unregister_hook($hook,$file,$function) { }} +// +// It might not be obvious but themes can manually add hooks to the $a->hooks +// array in their theme_init() and use this to customise the app behaviour. +// + if(! function_exists('load_hooks')) { function load_hooks() { $a = get_app(); @@ -171,8 +176,6 @@ function call_hooks($name, &$data = null) { if((is_array($a->hooks)) && (array_key_exists($name,$a->hooks))) { foreach($a->hooks[$name] as $hook) { - // define THISPLUGIN, make life easy to plugin devs :-) - define("THISPLUGIN", $hook[0]); @include_once($hook[0]); if(function_exists($hook[1])) { $func = $hook[1]; |