[wp-hackers] Proposal: standardize plugin-data path

Otto otto at ottodestruct.com
Fri Sep 26 13:34:15 GMT 2008

Seems to me that the safest place to do this would be
wp_upload_dir().'/your_plugin_name' . The upload directory doesn't
have to be limited to uploaded files. The tinyMCE stuff already puts
it's cached JS files there too.

On Thu, Sep 25, 2008 at 4:58 PM, Stephen Rider
<wp-hackers at striderweb.com> wrote:
> Hi --
> There are a number of plugins that themselves have user-changeable files.
>  I'm not talking about ones where you edit the file to set options, but
> things like Spam Karma that have plugins of their own, or my own Pull-Quotes
> plugin that allows you to customize the style files, or caching and backup
> plugins that create files of their own.
> We also now have an established auto-update system which, upon update, blows
> away anything in a plugin's folder, including any files that may have been
> added or changed.
> I propose we establish an official location (changeable via CONSTANT of
> course) for plugins to put their custom data that should _not_ be so easily
> wiped out on update.  The default we set could be as simple as
> /wp-content/plugin-data.  Thus myplugin would use
> /wp-content/plugin-data/myplugin
> I know plugin authors can just set that directory to anything they like, but
> I generally think it's a good idea to standardize such things.  Makes things
> a bit easier for plugin authors to establish an alternative location for
> things if there's a set standard.
> What say ye all?
> Stephen
> P.S. -- This came up in the course of wanting to allow users of the
> aforementioned pull-quotes plugin to set a custom directory for the
> pull-quote styles.  It would be great to have something like
> '/plugin-data'
> --
> Stephen Rider
> <http://striderweb.com/>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list