mirror of
https://github.com/slawkens/myaac.git
synced 2025-06-10 14:54:30 +02:00
Feature: auto-load pages in plugins/*/pages/*.php
This commit is contained in:
parent
514c4a037a
commit
c594dfd14b
@ -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'] . ' - ';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user