aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorM.Dent (DM42.Net) <dentm42@gmail.com>2018-09-19 21:54:46 -0400
committerM.Dent (DM42.Net) <dentm42@gmail.com>2018-09-19 21:54:46 -0400
commit456fe71ca9b768980f578494ee39c46cba946bc8 (patch)
tree6359c154061c10c950483cebec4ff5a31a5d35f9 /include
parent34fec995f711b03bc19580ee9e57c22712cf51df (diff)
downloadvolse-hubzilla-456fe71ca9b768980f578494ee39c46cba946bc8.tar.gz
volse-hubzilla-456fe71ca9b768980f578494ee39c46cba946bc8.tar.bz2
volse-hubzilla-456fe71ca9b768980f578494ee39c46cba946bc8.zip
add hook: permit_hook
Diffstat (limited to 'include')
-rwxr-xr-xinclude/plugin.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/plugin.php b/include/plugin.php
index 9757be356..2239f017d 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -458,6 +458,18 @@ function call_hooks($name, &$data = null) {
if (isset(App::$hooks[$name])) {
foreach(App::$hooks[$name] as $hook) {
+
+ if ($name != 'permit_hook') { // avoid looping
+ $checkhook = [
+ 'name'=>$name,
+ 'hook'=>$hook,
+ 'permit'=>true
+ ];
+ call_hooks('permit_hook',$checkhook);
+ if (!$checkhook['permit']) {
+ continue;
+ }
+ }
$origfn = $hook[1];
if($hook[0])
@include_once($hook[0]);