Feature: auto-load pages in plugins/*/pages/*.php

This commit is contained in:
slawkens 2024-01-25 22:29:19 +01:00
parent 514c4a037a
commit c594dfd14b

View File

@ -57,6 +57,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) {
$warningPreTitle = 'Plugin: ' . $plugin['name'] . ' - ';