diff --git a/CHANGELOG.md b/CHANGELOG.md index cf96881..d2df297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ dev - [ ] add global config for file size limit - [ ] add module to check deprecated PHP function - [ ] add module to check directory structure +- [ ] add module to create full README file - [ ] write documentation of php class +- add header for modules configuration 0.5 - 2021.11.05 - add settings to disable (hide) modules diff --git a/inc/class.improve.action.php b/inc/class.improve.action.php index e3c3262..497ab89 100644 --- a/inc/class.improve.action.php +++ b/inc/class.improve.action.php @@ -200,6 +200,16 @@ abstract class ImproveAction */ abstract public function isConfigured(): bool; + /** + * Get action configuration page header + * + * @return string Headers + */ + public function header(): ?string + { + return null; + } + /** * Get configuraton gui * diff --git a/index.php b/index.php index eae0213..23bbb36 100644 --- a/index.php +++ b/index.php @@ -101,16 +101,22 @@ if (!empty($_POST['fix'])) { } } +$action = null; +$header = ''; $breadcrumb = []; if (!empty($_REQUEST['config'])) { $breadcrumb = [ __('Configure module') => '' ]; + if (null !== ($action = $improve->module($_REQUEST['config']))) { + $header = $action->header(); + } } # display header echo '