Opened 12 years ago
Closed 9 years ago
#24051 closed feature request (wontfix)
Set an upload quota on single-site WordPress
Reported by: | ideag | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5.1 |
Component: | Media | Keywords: | needs-patch |
Focuses: | Cc: |
Description
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)
Change History (11)
#3
@
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.
#4
@
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
.
#6
@
10 years ago
- Keywords needs-patch added; has-patch removed
This would require get_space_used()
to move over as well.
I am in need of something like this as well.