I’ve been working on a fork to Chris Pirillo’s old, extremely outdated WicketPixie, bringing it up to standard and adding new stuff while keeping all old functionality.
One of my favourite functions is a custom code inserter. In specific parts of the templates, a function is called which includes a custom php file added by the user through an admin page. To this purpose, the admin page creates and writes the file. After running Theme-Check, I found some warnings about file operations, so I was looking for an alternative. I noticed eval is not allowed, so apparently storing the code in the database is not an option.
Do you know of any accepted workaround to this? I understand file operations can be quite a safety hazard, but this feature is a must-have.
The theme’s code is available in a GitHub repo.
- The topic ‘Allow user to add custom code without editing template’ is closed to new replies.