[wp-trac] [WordPress Trac] #23650: make get_space_allowed() filterable
WordPress Trac
noreply at wordpress.org
Fri Mar 1 00:38:34 UTC 2013
#23650: make get_space_allowed() filterable
-----------------------------+-------------------------
Reporter: jkudish | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Upload
Version: 3.4 | Severity: normal
Keywords: has-patch |
-----------------------------+-------------------------
When the `blog_upload_space` option is set to `0`, instead of returning
`0`, `get_space_allowed()` returns the default value which is currently
hardcoded to `50` in core.
As discussed in #18119 and committed in [19314], the function should
return `0` if the option is set to `0`. However this was reverted in
[19654] (see #19538). So I am not sure which is the desired behaviour.
The attached patch adds filters for the default value and for the returned
value. This is useful for scenarios where you don't want it to fallback to
`50` if the option is accidentally set to `0`, and you want to set your
own default.
I can adjust the patch if the consensus is that an option of `0` should in
fact return `0`.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23650>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list