[wp-trac] [WordPress Trac] #21181: simplify and add filter to is_upload_space_available
WordPress Trac
wp-trac at lists.automattic.com
Fri Jul 6 21:13:57 UTC 2012
#21181: simplify and add filter to is_upload_space_available
-------------------------+------------------------------
Reporter: jkudish | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.4.1
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------------
Comment (by jkudish):
Replying to [comment:1 nacin]:
> I'm confused. Can you provide a use case for that?
We want to improve the experience of uploading media when you’re over
quota. Part of the task is omitting the upload form for users who are over
quota. In core, when the quota is exceeded
[https://wpcom.trac.automattic.com/browser/trunk/wp-
admin/includes/media.php#L1332 the form isn’t displayed]
However, on WordPress.com, `is_upload_space_available()` always returns
true, because the `upload_space_check_disabled` option is set to true. All
of these functions that try to calculate filesystem disk usage don't work
on dot com as we check/store that information differently.
tl;dr: the purpose of the filter is to be able to hide the upload form
while keeping `upload_space_check_disabled` set to true.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21181#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list