1
0
Fork 0

Merge pull request #5794 from annando/ap1

ActivityPub support
This commit is contained in:
Hypolite Petovan 2018-10-02 11:24:04 -04:00 committed by GitHub
commit 505350c9fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
54 changed files with 4014 additions and 1065 deletions

View file

@ -332,15 +332,21 @@ if ($a->module_loaded) {
$a->page['page_title'] = $a->module;
$placeholder = '';
Addon::callHooks($a->module . '_mod_init', $placeholder);
if ($a->module_class) {
Addon::callHooks($a->module . '_mod_init', $placeholder);
call_user_func([$a->module_class, 'init']);
} else if (function_exists($a->module . '_init')) {
Addon::callHooks($a->module . '_mod_init', $placeholder);
$func = $a->module . '_init';
$func($a);
}
// "rawContent" is especially meant for technical endpoints.
// This endpoint doesn't need any theme initialization or other comparable stuff.
if (!$a->error && $a->module_class) {
call_user_func([$a->module_class, 'rawContent']);
}
if (function_exists(str_replace('-', '_', $a->getCurrentTheme()) . '_init')) {
$func = str_replace('-', '_', $a->getCurrentTheme()) . '_init';
$func($a);