- If you create a snippet as a “Library scoped to footer” initially, and then go back and edit the code and switch the scope to “External library scoped to footer,” the original file created still remains. This is probably okay as the user might change it back and the file will be there for them to modify later, but might be a concern if the user ends up creating a bunch of snippets by mistake, creating lots of random files.
- Is it possible to remove the JS file when switching the scope option, or should this remain as-is?
- When you delete a snippet, the snippet is removed from the list, but the file remains in the file system as well.
- Is it possible to remove the JS file upon snippet deletion?
Comments
Comment #2
Song commentedComment #3
Song commentedComment #6
jerdavisChanged method for selecting external to being a test against the content of the snippet. The snippet is passed through PHP's filter_var and validated as a URL. If a URL is detected it's determined to be an external library, otherwise a file is generated and saved. If a snippet has a saved file but then gets switched to an external resource the saved file is deleted. If a snippet is deleted, the saved file is also deleted.
Comment #7
Song commentedWhen I delete the snippets, they are now removed from the file system, but under Files, they still appear in the list. Can they also be cleaned up from that list? Thanks!
Comment #8
jerdavis