Use onAdminMenu instead of the deprecated onAdminTemplateNavPluginHook

This commit is contained in:
Flavio Copes 2015-10-29 19:21:31 +01:00
parent d813b9280e
commit 27158eaea0
1 changed files with 3 additions and 2 deletions

View File

@ -114,7 +114,8 @@ class CommentsPlugin extends Plugin
//Admin
$this->enable([
'onTwigTemplatePaths' => ['onTwigAdminTemplatePaths', 0],
'onAdminTemplateNavPluginHook' => ['onAdminTemplateNavPluginHook', 0],
'onAdminMenu' => ['onAdminMenu', 0],
'onAdminTemplateNavPluginHook' => ['onAdminMenu', 0], //DEPRECATED
'onDataTypeExcludeFromDataManagerPluginHook' => ['onDataTypeExcludeFromDataManagerPluginHook', 0],
]);
@ -354,7 +355,7 @@ class CommentsPlugin extends Plugin
/**
* Add navigation item to the admin plugin
*/
public function onAdminTemplateNavPluginHook()
public function onAdminMenu()
{
$this->grav['twig']->plugins_hooked_nav['PLUGIN_COMMENTS.COMMENTS'] = ['route' => $this->route, 'icon' => 'fa-file-text'];
}