[wp-hackers] Where Should Plugins Store Files?

Ryan McCue lists at rotorised.com
Mon Sep 13 11:12:25 UTC 2010


 Andrew Nacin wrote:
> That's a bad idea. Then you lose that file on an upgrade.
>
> You can use wp_mkdir_p($path) to create a folder. (The _p means it attempts
> to set permissions.) If fails, it will return a WP_Error object. 

What's the opinion on creating new subdirectories of wp-content, as
opposed to being in existing directories (i.e.
wp-content/plugin/file.html vs. wp-content/uploads/plugin/file.html)?
I'm currently using the former for a couple of configuration options
(overriding a template that the plugin uses, but optional), but the user
creates the directory and file themselves.

Are there any forseen problems to this sort of setup?

-- 
Ryan McCue
<http://ryanmccue.info/>



More information about the wp-hackers mailing list