[wp-trac] [WordPress Trac] #6762: Would be useful for wp_upload_dir to be able to return without date sub directories

WordPress Trac wp-trac at lists.automattic.com
Thu Apr 17 15:17:21 GMT 2008


#6762: Would be useful for wp_upload_dir to be able to return without date sub
directories
---------------------------+------------------------------------------------
 Reporter:  simonwheatley  |       Owner:  anonymous
     Type:  enhancement    |      Status:  new      
 Priority:  normal         |   Milestone:  2.6      
Component:  General        |     Version:           
 Severity:  normal         |    Keywords:  has-patch
---------------------------+------------------------------------------------
 I'm writing a plugin which needs to cache certain web readable files (CSS
 & JS, etc). The obvious writable directory is wp-content/uploads/, however
 to work out the filesystem path and web path for this dir is not easy,
 because wp_upload_dir always returns with the date based subdirs. I could
 remove the subdirs from the paths afterwards, but this seems needlessly
 hard.

 The attached patch adds an additional argument to wp_upload_dir which
 requires the function to return the dirs without the date subdirs. The
 argument defaults to false to maintain backwards compatibility.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/6762>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list