new hook: HOOK_ADMIN_NEWS_ADD

This commit is contained in:
slawkens
2024-11-10 20:25:17 +01:00
parent 382f897322
commit 011a85d8ae
2 changed files with 12 additions and 0 deletions

View File

@@ -48,6 +48,17 @@ class News
'article_text' => ($type == 3 ? $article_text : ''),
'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();
return true;
}