Make WordPress Core

Opened 11 years ago

Closed 8 years ago

#24051 closed feature request (wontfix)

Set an upload quota on single-site WordPress

Reported by: ideag's profile ideag Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.5.1
Component: Media Keywords: needs-patch
Focuses: Cc:


I was searching for a way to turn on upload space quota for single-site WordPress (not multisite) install. There does not seem to be one. I can't even emulate one with hooks, because in media.php 'upload_ui_over_quota' hook is multisite-specific and 'pre-upload-ui' does not allow me to emulate the same behavior.

I understand that need for upload space quota for single-site is not a very common scenario, but the relevant code is already there, only an alternative method of enabling it (e.g. a constant in wp-config.php) is needed.

Attachments (1)

24051.diff (3.6 KB) - added by ericlewis 10 years ago.

Download all attachments as: .zip

Change History (11)

#1 @aniketpant
11 years ago

  • Cc me@… added

#2 @roger6106
10 years ago

I am in need of something like this as well.

#3 @ericlewis
10 years ago

Sure. I don't think we'll add this to the UI by default since it's an edge case, but you should be able to easily do this with a filter.

10 years ago

#4 @ericlewis
10 years ago

attachment:24051.diff moves get_upload_space_available() and is_upload_space_available() out of ms-functions.php and into media.php. Wrap all existing checks in get_upload_space_available() in an is_multisite() conditional, and create a new filter for the return of get_upload_space_available(): upload_space_available.

#5 @ericlewis
10 years ago

  • Keywords has-patch added

#6 @ericlewis
10 years ago

  • Keywords needs-patch added; has-patch removed

This would require get_space_used() to move over as well.

#7 @ericlewis
10 years ago

  • Summary changed from a way of turning on upload space quota on single-site WordPress install to Set an upload quota on single-site WordPress

#8 @chriscct7
8 years ago

@ericlewis interested in continuing on this?

#10 @chriscct7
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.