Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#25935 closed feature request (invalid)

multisite installs have non-configurable path settings

Reported by: tfogal's profile tfogal Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Multisite Keywords:
Focuses: Cc:

Description

We've got a multisite install, where each site is && will be a different year for a similar topic. We are doing path-based multisite and naming each year as literally just the year, so that we have sites such as:

http://domain/year/

By default, wp-includes/functions.php gives really nasty paths to our uploads. They have an additional "/sites/#" in there, which we do not require. Secondly, 'uploads_use_yearmonth_folders' is checked, despite that configuration variable not being accessible in the wordpress 'Settings' page (there is some code that checks for multisite and specifically disables it). Given that our site name *is* the year, this means adds it again and thus we have paths that are something like '/year/wp-content/uploads/year/month/' etc.

The existing scheme is moderately undesirable due to (in our case) the year appearing twice, and the additional complexity of upload directory names: I don't want to remember what month I uploaded something to be able to type out its URL.

It strikes me that being strict about these settings makes sense for subdomain-based multisite, but not so much for path-based multisite.

We are currently using the attached patch to hack around this, which is not at all appropriate for upstream. I attach it only to give detail as to where the functionality we're having issues with lies. We'd appreciate some way to configure our URL strategy without having to hack wordpress.

Attachments (1)

hack-functions.diff (1.3 KB) - added by tfogal 10 years ago.
Tiny diff to hack uploaded URLs to be shorter and more appropriate for our website.

Download all attachments as: .zip

Change History (3)

@tfogal
10 years ago

Tiny diff to hack uploaded URLs to be shorter and more appropriate for our website.

#1 @jeremyfelt
10 years ago

  • Keywords close added; dev-feedback removed

You should be able to take advantage of the upload_dir filter located a bit further down in wp_upload_dir() from your patch to set a custom upload directory scheme on a per site basis. It sounds perfect for your use case here.

#2 @jeremyfelt
10 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed
  • Version 3.7.1 deleted
Note: See TracTickets for help on using tickets.