From 27c3f554aa635ff2164ec35751678dddac4b88a4 Mon Sep 17 00:00:00 2001 From: DieGOs <9585999@gmail.com> Date: Tue, 8 Aug 2017 23:58:45 +0300 Subject: [PATCH 1/5] Update Debugger.php --- src/Module/Debugger.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Module/Debugger.php b/src/Module/Debugger.php index 09cd6bf..4e4c643 100644 --- a/src/Module/Debugger.php +++ b/src/Module/Debugger.php @@ -81,11 +81,18 @@ public function hierarchy() global $wp_query; $templates = (new \Brain\Hierarchy\Hierarchy())->getTemplates($wp_query); $templates[] = 'app.php'; - $templates = array_reverse($templates); + + $templates = array_map(function ($template) { + return basename($template); + }, $templates); + + $templates = array_reverse(array_unique($templates)); + $path = get_stylesheet_directory() . '/controllers'; $path = (has_filter('sober/controller/path') ? apply_filters('sober/controller/path', rtrim($path)) : get_stylesheet_directory() . '/controllers'); $path = basename($path); echo '
Hierarchy Debugger: