File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 1010 $ blueprints [] = str_replace ('pages/ ' , '' , $ blueprint );
1111 }
1212}
13- $ default = array_search ('module. ' . option ('medienbaecker.modules.default ' , 'text ' ), $ blueprints );
14- if ($ default !== false ) {
15- $ module_text = $ blueprints [$ default ];
16- unset($ blueprints [$ default ]);
17- array_unshift ($ blueprints , $ module_text );
13+
14+ // Move default module to the top
15+ $ defaultModule = array_search ('module. ' . option ('medienbaecker.modules.default ' , 'text ' ), $ blueprints );
16+ if ($ defaultModule !== false ) {
17+ $ defaultBlueprint = $ blueprints [$ defaultModule ];
18+ unset($ blueprints [$ defaultModule ]);
19+ array_unshift ($ blueprints , $ defaultBlueprint );
20+ }
21+
22+ // Exclude modules
23+ $ excludedModules = option ('medienbaecker.modules.exclude ' , []);
24+ if (!empty ($ excludedModules )) {
25+
26+ foreach ($ excludedModules as $ excludedModule ) {
27+ if (in_array ('module. ' . $ excludedModule , $ blueprints )) {
28+ $ key = array_search ('module. ' . $ excludedModule , $ blueprints );
29+ unset($ blueprints [$ key ]);
30+ }
31+ }
1832}
1933
2034$ base = Section::$ types ['pages ' ];
You can’t perform that action at this time.
0 commit comments