mirror of
https://github.com/slawkens/myaac.git
synced 2025-06-07 21:34:31 +02:00
Two new hooks for pages loaded from database (custom pages)
HOOK_BEFORE_PAGE_CUSTOM, HOOK_AFTER_PAGE_CUSTOM
This commit is contained in:
parent
770ffcfc52
commit
c961a1ebf8
@ -252,7 +252,7 @@ else {
|
||||
|
||||
$success = false;
|
||||
$tmp_content = getCustomPage($pageName, $success);
|
||||
if ($success) {
|
||||
if ($success && $hooks->trigger(HOOK_BEFORE_PAGE_CUSTOM)) {
|
||||
$content .= $tmp_content;
|
||||
if (hasFlag(FLAG_CONTENT_PAGES) || superAdmin()) {
|
||||
$pageInfo = getCustomPageInfo($pageName);
|
||||
@ -260,6 +260,8 @@ else {
|
||||
) . $content;
|
||||
}
|
||||
|
||||
$hooks->trigger(HOOK_AFTER_PAGE_CUSTOM);
|
||||
|
||||
$page = $pageName;
|
||||
$file = false;
|
||||
}
|
||||
|
@ -8,7 +8,9 @@ $i = 0;
|
||||
define('HOOK_INIT', ++$i);
|
||||
define('HOOK_STARTUP', ++$i);
|
||||
define('HOOK_BEFORE_PAGE', ++$i);
|
||||
define('HOOK_BEFORE_PAGE_CUSTOM', ++$i);
|
||||
define('HOOK_AFTER_PAGE', ++$i);
|
||||
define('HOOK_AFTER_PAGE_CUSTOM', ++$i);
|
||||
define('HOOK_FINISH', ++$i);
|
||||
define('HOOK_TIBIACOM_ARTICLE', ++$i);
|
||||
define('HOOK_TIBIACOM_BORDER_3', ++$i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user