[532] | 1 | <?php |
---|
| 2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
| 3 | # |
---|
| 4 | # This file is part of Dotclear 2. |
---|
| 5 | # |
---|
[1179] | 6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear |
---|
[532] | 7 | # Licensed under the GPL version 2.0 license. |
---|
| 8 | # See LICENSE file or |
---|
| 9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
| 10 | # |
---|
| 11 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
| 12 | if (!defined('DC_CONTEXT_ADMIN')) { return; } |
---|
| 13 | |
---|
| 14 | $core->addBehavior('adminDashboardIcons','simpleMenu_dashboard'); |
---|
[2276] | 15 | $core->addBehavior('adminDashboardFavorites','simpleMenu_dashboard_favs'); |
---|
[532] | 16 | function simpleMenu_dashboard($core,$icons) |
---|
| 17 | { |
---|
[2815] | 18 | $icons['simpleMenu'] = new ArrayObject(array(__('Simple menu'), |
---|
[2820] | 19 | $core->adminurl->get('admin.plugin.simpleMenu'), |
---|
[2849] | 20 | dcPage::getPF('simpleMenu/icon.png'))); |
---|
[532] | 21 | } |
---|
| 22 | function simpleMenu_dashboard_favs($core,$favs) |
---|
| 23 | { |
---|
[2276] | 24 | $favs->register('simpleMenu', array( |
---|
| 25 | 'title' => __('Simple menu'), |
---|
[2820] | 26 | 'url' => $core->adminurl->get('admin.plugin.simpleMenu'), |
---|
[2849] | 27 | 'small-icon' => dcPage::getPF('simpleMenu/icon-small.png'), |
---|
| 28 | 'large-icon' => dcPage::getPF('simpleMenu/icon.png'), |
---|
[2276] | 29 | 'permissions' => 'usage,contentadmin' |
---|
| 30 | )); |
---|
[532] | 31 | } |
---|
| 32 | |
---|
[2815] | 33 | $_menu['Blog']->addItem(__('Simple menu'), |
---|
[2820] | 34 | $core->adminurl->get('admin.plugin.simpleMenu'), |
---|
[2849] | 35 | dcPage::getPF('simpleMenu/icon-small.png'), |
---|
[2820] | 36 | preg_match('/'.preg_quote($core->adminurl->get('admin.plugin.simpleMenu')).'(&.*)?$/',$_SERVER['REQUEST_URI']), |
---|
[2815] | 37 | $core->auth->check('usage,contentadmin',$core->blog->id)); |
---|
[587] | 38 | |
---|
| 39 | require dirname(__FILE__).'/_widgets.php'; |
---|