25 $hooks = $this->getOrderedHandlers($hook,
$type);
27 foreach ($hooks as $callback) {
28 if (!is_callable($callback)) {
31 $this->logger->warn(
"handler for plugin hook [$hook, $type] is not callable: " 32 . $inspector->describeCallable($callback));
37 $exit_warning =
function()
use ($hook,
$type, $callback) {
40 "'$hook', '$type' plugin hook should not be used to serve a response. Instead return an " 41 .
"appropriate ResponseBuilder instance from an action or page handler. Do not terminate " 42 .
"code execution with exit() or die() in {$inspector->describeCallable($callback)}",
47 if (in_array($hook, [
'forward',
'action',
'route'])) {
48 _elgg_services()->events->registerHandler(
'shutdown',
'system', $exit_warning);
52 $temp_return_value = call_user_func_array($callback,
$args);
53 if (!is_null($temp_return_value)) {
54 $returnvalue = $temp_return_value;
57 if (in_array($hook, [
'forward',
'action',
'route'])) {
58 _elgg_services()->events->unregisterHandler(
'shutdown',
'system', $exit_warning);
registerHandler($name, $type, $callback, $priority=500)
{}
if($guid==elgg_get_logged_in_user_guid()) $name
$args
Some servers don't allow PHP to check the rewrite, so try via AJAX.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
trigger($hook, $type, $params=null, $returnvalue=null)
Triggers a plugin hook.
http free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use