mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
new hook: HOOK_ADMIN_NEWS_ADD
This commit is contained in:
parent
382f897322
commit
011a85d8ae
@ -48,6 +48,17 @@ class News
|
|||||||
'article_text' => ($type == 3 ? $article_text : ''),
|
'article_text' => ($type == 3 ? $article_text : ''),
|
||||||
'article_image' => ($type == 3 ? $article_image : '')
|
'article_image' => ($type == 3 ? $article_image : '')
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
global $hooks;
|
||||||
|
$hooks->trigger(HOOK_ADMIN_NEWS_ADD,
|
||||||
|
[
|
||||||
|
'title' => $title, 'body' => $body,
|
||||||
|
'type' => $type, 'category' => $category,
|
||||||
|
'player_id' => $player_id, 'comments' => $comments,
|
||||||
|
'article_text' => $article_text, 'article_image' => $article_image,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
self::clearCache();
|
self::clearCache();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -71,6 +71,7 @@ define('HOOK_ADMIN_BODY_START', ++$i);
|
|||||||
define('HOOK_ADMIN_BODY_END', ++$i);
|
define('HOOK_ADMIN_BODY_END', ++$i);
|
||||||
define('HOOK_ADMIN_BEFORE_PAGE', ++$i);
|
define('HOOK_ADMIN_BEFORE_PAGE', ++$i);
|
||||||
define('HOOK_ADMIN_MENU', ++$i);
|
define('HOOK_ADMIN_MENU', ++$i);
|
||||||
|
define('HOOK_ADMIN_NEWS_ADD', ++$i);
|
||||||
define('HOOK_ADMIN_LOGIN_AFTER_ACCOUNT', ++$i);
|
define('HOOK_ADMIN_LOGIN_AFTER_ACCOUNT', ++$i);
|
||||||
define('HOOK_ADMIN_LOGIN_AFTER_PASSWORD', ++$i);
|
define('HOOK_ADMIN_LOGIN_AFTER_PASSWORD', ++$i);
|
||||||
define('HOOK_ADMIN_LOGIN_AFTER_SIGN_IN', ++$i);
|
define('HOOK_ADMIN_LOGIN_AFTER_SIGN_IN', ++$i);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user