Add Code settings group: custom admin CSS/JS + header/footer scripts
New Settings > Code group (Custom CSS & JS + Header & footer scripts) driven by admin/src/Code/CodeInjection.php: - Admin CSS → <style> in the admin <head> (</style> stripped to prevent breakout) - Admin JS → <script> in the admin footer (</script> neutralized) - Header scripts → printed verbatim in the front-end <head> - Footer scripts → printed verbatim before the front-end </body> Header/footer scripts are raw admin-authored markup by design (analytics, meta, etc.), settable only by manage_options users on the settings page. SettingsField gains a `mono` flag for monospace textareas (no CodeMirror dependency). All four injection points verified on PHP 8.5. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f0bc04a110
commit
f5c48bced9
@@ -47,6 +47,7 @@ use AuroraAdmin\Media\SvgUploads;
|
||||
use AuroraAdmin\Media\MediaFolders;
|
||||
use AuroraAdmin\ImageFormats\ImageFormats;
|
||||
use AuroraAdmin\Security\Security;
|
||||
use AuroraAdmin\Code\CodeInjection;
|
||||
use AuroraAdmin\Rest\MediaFolderData;
|
||||
use AuroraAdmin\Rest\BugReportData;
|
||||
use AuroraAdmin\Rest\CompanionPluginData;
|
||||
@@ -99,6 +100,7 @@ class AuroraAdmin
|
||||
new MediaFolders();
|
||||
new ImageFormats();
|
||||
new Security();
|
||||
new CodeInjection();
|
||||
new MediaFolderData();
|
||||
new BugReportData();
|
||||
new CompanionPluginData();
|
||||
|
||||
Reference in New Issue
Block a user