From 4897063adc8cd34ded71a8d93f56857638c13044 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Thu, 10 Oct 2019 10:28:10 -0500 Subject: [PATCH] Added trash link --- ext/trash/main.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ext/trash/main.php b/ext/trash/main.php index caef44aa..8d29dd62 100644 --- a/ext/trash/main.php +++ b/ext/trash/main.php @@ -60,6 +60,16 @@ class Trash extends Extension } } + public function onPageSubNavBuilding(PageSubNavBuildingEvent $event) + { + global $user; + if($event->parent=="posts") { + if($user->can(Permissions::VIEW_TRASH)) { + $event->add_nav_link("posts_trash", new Link('/post/list/in%3Atrash/1'), "Trash",null, 60); + } + } + } + const SEARCH_REGEXP = "/^in:trash$/"; public function onSearchTermParse(SearchTermParseEvent $event)