First version for Omeka Classic, the counterpart of the Theme File Editor 1.0.2 module for Omeka S.
- Edit a public theme's templates (
.php), stylesheets (.css) and scripts (.js) under Appearance > Theme Files, in CodeMirror with highlighting and line numbers; Ctrl+S or Cmd+S saves. Other text files (theme.ini,config.ini, Sass, Markdown, JSON, SVG) open read-only. - Themes of the site's own: installing a new version of a theme replaces its files, so installed themes open read-only and Copy Theme makes a copy to edit, with its title and, optionally, its configuration. Links in the theme (Theme Engine templates and engine) become real files of the copy. Super Users can tick installed themes to edit them in place, and delete copies no one uses.
- Revisions of every change, with the file's original stored before its first change and changes made outside the editor stored before they are overwritten; compare two revisions, a revision with the file, or a theme file with the core or plugin view it overrides; roll back (itself a revision).
- PHP check before saving: PHP's parser in the request, then
php -lwhereexec()is allowed; save anyway when you know better. Optional backup files, which can be deleted from the editor. - Copy to Theme for Omeka's views and plugins' public and shared views, following Classic's lookup: core views to the theme folder, plugin views to the plugin's folder of the theme (its own pages) or the theme folder (where it prints them elsewhere). The tree marks overridden views and theme files that override something.
- Search by file name or content in one theme, all themes, Omeka's views or a plugin's views, opening results at the matching line.
- Security: Super Users only (a
theme_file_editor_rolesfilter can add roles); writes confined to editable kinds of file in a theme's real folder, never through a link out of it; CSRF token and JSON bodies on every change; size and rate limits. - Hooks for other plugins on every change, and
audit_trail_logfor the Audit Trail plugin.