1

I have a folder inside my plugin that's used to store cached data for the application.

There's no need for the user to edit these files so I'd like to remove this folder's files from appearing in the "Plugin files" listing that appears in the right sidebar when editing the plugin files via "Plugins > Editor".

Is this possible?

1
  • As far as i'm aware there's no way to exclude files from the plugin editor, there's only support for disabling it, but no way to selectively exclude files/folders or specific plugins.
    – t31os
    Commented Aug 17, 2011 at 21:01

1 Answer 1

3

Use the upload directory to store files.

You should never store files in the plugin directory. There is no guarantee that you have write access there.

2
  • 1
    Good call. Just to add a detail for the OP: you can easily determine which is the uploads dir using wp_upload_dir().
    – MathSmath
    Commented Aug 17, 2011 at 22:58
  • As an additional point of interest on this topic, some server configurations are vulnerable to code injection if the attacker figures out how to put custom code into your cache file.
    – user66
    Commented Aug 18, 2011 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.