diff --git a/Menuitem.php b/Menuitem.php index 1608e1b..5f05dd2 100644 --- a/Menuitem.php +++ b/Menuitem.php @@ -11,7 +11,7 @@ * Implements the stale button * https://www.dokuwiki.org/devel:menus:example */ -class MenuItem extends AbstractItem +class StaleMenuItem extends AbstractItem { @@ -59,7 +59,8 @@ public function getTitle() public function getLabel() { - return ucfirst(helper_plugin_stale::PLUGIN_NAME); + $stale = plugin_load('helper', helper_plugin_stale::PLUGIN_NAME); + return $stale->getLang("menuItemLabel"); } diff --git a/README.md b/README.md index 4809c89..17c5e1c 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,10 @@ Based on the [dead plugin toucher](https://github.com/anandr/dokuwiki-plugin-tou By adding `?do=check` to a page, you can also do a configuration check. +## Release + + * 2021-08-30: + * The stale menu item is now a website item + * The action label is more clear and was added as language reference + * 2021-08-04: + * First release diff --git a/_test/baseTest.php b/_test/baseTest.php index 3227136..d47fca1 100644 --- a/_test/baseTest.php +++ b/_test/baseTest.php @@ -146,7 +146,7 @@ public function test_plugin_default() public function testMenuItem() { - $menuItem = new \dokuwiki\plugin\stale\MenuItem(); + $menuItem = new \dokuwiki\plugin\stale\StaleMenuItem(); $linkAttributes = $menuItem->getLinkAttributes(); } diff --git a/action.php b/action.php index 0d73560..fbeb7a0 100644 --- a/action.php +++ b/action.php @@ -1,7 +1,7 @@ canTouch()===true){ - array_splice($event->data['items'], -1, 0, array(new MenuItem())); + array_splice($event->data['items'], -1, 0, array(new StaleMenuItem())); } diff --git a/lang/en/lang.php b/lang/en/lang.php index 92b8a49..e92e594 100644 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -1,5 +1,6 @@