1 | <?php |
---|
2 | # ***** BEGIN LICENSE BLOCK ***** |
---|
3 | # |
---|
4 | # This file is part of clean:config, a plugin for Dotclear 2 |
---|
5 | # Copyright (C) 2007-2016 Moe (http://gniark.net/) |
---|
6 | # |
---|
7 | # clean:config is free software; you can redistribute it and/or |
---|
8 | # modify it under the terms of the GNU General Public License v2.0 |
---|
9 | # as published by the Free Software Foundation. |
---|
10 | # |
---|
11 | # clean:config is distributed in the hope that it will be useful, |
---|
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | # GNU General Public License for more details. |
---|
15 | # |
---|
16 | # You should have received a copy of the GNU General Public |
---|
17 | # License along with this program. If not, see |
---|
18 | # <http://www.gnu.org/licenses/>. |
---|
19 | # |
---|
20 | # Icon (icon.png) and images are from Silk Icons : |
---|
21 | # <http://www.famfamfam.com/lab/icons/silk/> |
---|
22 | # |
---|
23 | # ***** END LICENSE BLOCK ***** |
---|
24 | |
---|
25 | if (!defined('DC_CONTEXT_ADMIN')) {exit;} |
---|
26 | |
---|
27 | $_menu['Plugins']->addItem(__('clean:config'),'plugin.php?p=cleanConfig', |
---|
28 | 'index.php?pf=cleanConfig/icon.png',preg_match('/plugin.php\?p=cleanConfig(&.*)?$/', |
---|
29 | $_SERVER['REQUEST_URI']),$core->auth->check('admin',$core->blog->id)); |
---|
30 | |
---|
31 | $core->addBehavior('adminDashboardFavorites','cleanConfigDashboardFavorites'); |
---|
32 | |
---|
33 | function cleanConfigDashboardFavorites($core,$favs) |
---|
34 | { |
---|
35 | $favs->register('cleanConfig', array( |
---|
36 | 'title' => __('clean:config'), |
---|
37 | 'url' => 'plugin.php?p=cleanConfig', |
---|
38 | 'small-icon' => 'index.php?pf=cleanConfig/icon.png', |
---|
39 | 'large-icon' => 'index.php?pf=cleanConfig/icon-big.png', |
---|
40 | 'permissions' => 'usage,contentadmin' |
---|
41 | )); |
---|
42 | } |
---|