diff --git a/CHANGELOG.md b/CHANGELOG.md index e7dc908..1904abf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ todo * use anonymous functions (WIP) * use abstract plugin id * use short settings id +* add item to plugin simple menu * add install process comListe 0.4.2 - 11-11-2017 - Pierre Van Glabeke diff --git a/_admin.php b/_admin.php index e6283c0..f10d9ae 100644 --- a/_admin.php +++ b/_admin.php @@ -36,4 +36,14 @@ dcCore::app()->addBehaviors([ 'permissions' => dcCore::app()->auth->makePermissions([dcAuth::PERMISSION_ADMIN]), ]); }, + 'adminSimpleMenuAddType' => function (ArrayObject $items) { + $items['comListe'] = new ArrayObject([__('Comments list'), false]); + }, + 'adminSimpleMenuBeforeEdit' => function ($type, $select, &$item) { + if (basename(__DIR__) == $type) { + $item[0] = __('Comments list'); + $item[1] = __('Comments list'); + $item[2] = dcCore::app()->admin->blog_url . dcCore::app()->url->getURLFor(basename(__DIR__)); + } + } ]);