Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13930 closed feature request (invalid)

Do not force dated file url on media upload

Reported by: jowo Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Media Keywords:
Focuses: Cc:


When you upload a file in the media library you are forced to put the file in a dated directory.

It would be better not to force the user to have to put it here.

Example scenario where I would not want a dated directory:

With WP 3.0 MU I have a template with a logo, the user should be able to upload logo.jpg into "/files/logo.jpg" instead of "/files/2010/06/logo.jpg" and it will automatically be replaced in the template.

This could be done with header function but afaik you can't use header function for headers and logo at the same time?

Change History (9)

#1 @jowo
5 years ago

I found this screenshot:


Where you can disable dates on directories... but I can't find this in my 3.0 installation.

#2 @nacin
5 years ago

MU handles those internally. Pretty sure there's a filter for it.

#3 @jowo
5 years ago

P.S. This is on a MU setup. I am told it is in "Media" now, but can't find the option there either.

#4 @jowo
5 years ago

update_option('uploads_use_yearmonth_folders', 0);

Solves it, but it would help if it was in the "Media" settings as well.

#5 @nacin
5 years ago

It is deliberately not in the media settings panel because regular administrators cannot have control over this, only super admins.

#6 @jowo
5 years ago

Well it's not there as super admin either.

Maybe just show this option to super admins then?

#7 @nacin
5 years ago

No, because super admins would not be handling this option on a blog-by-blog basis, or at least not through Settings > General, but rather through Super Admin > Sites.

If you want all uploads to ignore a date, it's a really simple plugin.

If you want only some uploads to have a date, then would not be an easy plugin but probably still doable.

#8 @uglyrobot
5 years ago

  • Cc aaron@… added
  • Resolution set to invalid
  • Status changed from new to closed

Don't think this should be in core either. You can already edit on a blog-by-blog basis through Super Admin > Sites > Edit.

If you want it network wide then a simple plugin is possible.

#9 @nacin
5 years ago

  • Milestone Unassigned deleted
Note: See TracTickets for help on using tickets.