forked from nikrou/eventHandler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_admin.php
More file actions
48 lines (42 loc) · 1.93 KB
/
Copy path_admin.php
File metadata and controls
48 lines (42 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
# -- BEGIN LICENSE BLOCK ----------------------------------
#
# This file is part of eventHandler, a plugin for Dotclear 2.
#
# Copyright(c) 2014-2015 Nicolas Roudaire <nikrou77@gmail.com> http://www.nikrou.net
#
# Copyright (c) 2009-2013 Jean-Christian Denis and contributors
# contact@jcdenis.fr http://jcd.lv
#
# Licensed under the GPL version 2.0 license.
# A copy of this license is available in LICENSE file or at
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
#
# -- END LICENSE BLOCK ------------------------------------
if (!defined('DC_CONTEXT_ADMIN')){return;}
# set ns
$core->blog->settings->addNamespace('eventHandler');
# Load _wigdets.php
if ($core->blog->settings->eventHandler->active) {
include_once(__DIR__.'/_widgets.php');
}
# Admin menu
$_menu['Blog']->addItem(
__('Event handler'),
'plugin.php?p=eventHandler','index.php?pf=eventHandler/icon.png',
preg_match('/plugin.php\?p=eventHandler(&.*)?$/',$_SERVER['REQUEST_URI']),
$core->auth->check('usage,contentadmin',$core->blog->id)
);
# Admin Dashboard
$core->addBehavior('adminDashboardIcons', array('adminEventHandler', 'adminDashboardIcons'));
$core->addBehavior('adminDashboardFavs', array('adminEventHandler', 'adminDashboardFavs'));
# Admin behaviors
if ($core->blog->settings->eventHandler->active) {
$core->addBehavior('adminPostHeaders', array('adminEventHandler', 'adminPostHeaders'));
$core->addBehavior('adminPostsActionsCombo', array('adminEventHandler', 'adminPostsActionsCombo'));
$core->addBehavior('adminPostsActionsPage', array('adminEventHandler', 'adminPostsActionsPage'));
$core->addBehavior('adminPostFormItems', array('adminEventHandler', 'adminPostFormItems'));
$core->addBehavior('adminAfterPostCreate', array('adminEventHandler', 'adminAfterPostSave'));
$core->addBehavior('adminAfterPostUpdate', array('adminEventHandler', 'adminAfterPostSave'));
$core->addBehavior('adminBeforePostDelete', array('adminEventHandler', 'adminBeforePostDelete'));
}