X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=index.php;h=61f3562b588613c6a2b7fba28a6932c401841072;hb=b97c406c825004f87a74d310533c8bfbd0fc5218;hp=6967d0f3155a4d980f6cb088d4e998d5af33d9ed;hpb=f9a40ccbdea69fc7ffcbdc87356d535c67371210;p=friendica.git diff --git a/index.php b/index.php index 6967d0f315..61f3562b58 100644 --- a/index.php +++ b/index.php @@ -246,7 +246,10 @@ if(! $install) if($a->module_loaded) { $a->page['page_title'] = $a->module; + $placeholder = ''; + if(function_exists($a->module . '_init')) { + call_hooks($a->module . '_mod_init', $placeholder); $func = $a->module . '_init'; $func($a); } @@ -266,18 +269,25 @@ if($a->module_loaded) { if(($_SERVER['REQUEST_METHOD'] === 'POST') && (! $a->error) && (function_exists($a->module . '_post')) && (! x($_POST,'auth-params'))) { + call_hooks($a->module . '_mod_post', $_POST); $func = $a->module . '_post'; $func($a); } if((! $a->error) && (function_exists($a->module . '_afterpost'))) { + call_hooks($a->module . '_mod_afterpost',$placeholder); $func = $a->module . '_afterpost'; $func($a); } if((! $a->error) && (function_exists($a->module . '_content'))) { + $arr = array('content' => $a->page['content']); + call_hooks($a->module . '_mod_content', $arr); + $a->page['content'] = $arr['content']; $func = $a->module . '_content'; - $a->page['content'] .= $func($a); + $arr = array('content' => $func($a)); + call_hooks($a->module . '_mod_aftercontent', $arr); + $a->page['content'] .= $arr['content']; } }