[wp-hackers] Where Should Plugins Store Files?
me at piyushmishra.com
Mon Sep 13 12:23:34 UTC 2010
No wonder I didnt know that. My plugin loads the images again everyday
On Mon, Sep 13, 2010 at 10:22 AM, Andrew Nacin <wp at andrewnacin.com> wrote:
> On Sun, Sep 12, 2010 at 11:39 PM, Piyush Mishra <me at piyushmishra.com>
> > If the file isnt of any use out side the plugin, I use the plugin itself
> 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.
> As Otto said, use wp_upload_dir() to get the path to the upload directory.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
Life's Short, Live it to the maximum
More information about the wp-hackers