diff --git a/system/src/Plugins.php b/system/src/Plugins.php index e8970d81..a310739d 100644 --- a/system/src/Plugins.php +++ b/system/src/Plugins.php @@ -22,16 +22,15 @@ class Plugins { } $routes = []; - - $pluginPages = glob(PLUGINS . '*/pages/*.php'); - foreach ($pluginPages as $file) { - $file = str_replace(PLUGINS, 'plugins/', $file); - $name = pathinfo($file, PATHINFO_FILENAME); - - $routes[] = [['get', 'post'], $name, $file, 1000]; - } - foreach(self::getAllPluginsJson() as $plugin) { + $pluginPages = glob(PLUGINS . $plugin['filename'] . '/pages/*.php'); + foreach ($pluginPages as $file) { + $file = str_replace(PLUGINS, 'plugins/', $file); + $name = pathinfo($file, PATHINFO_FILENAME); + + $routes[] = [['get', 'post'], $name, $file, 1000]; + } + $warningPreTitle = 'Plugin: ' . $plugin['name'] . ' - '; if (isset($plugin['routes'])) {