Opened 13 years ago
Closed 13 years ago
#21410 closed enhancement (invalid)
Misleading function description for check_upload_mimes
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.4.1 |
| Component: | Multisite | Keywords: | |
| Focuses: | Cc: |
Description
The description for check_upload_mimes is misleading.
Specifically "This function is used to filter that list against..." for that list seems talks about what returned by get_allowed_mime_types() but this is not true, since there is no call to get_allowed_mime_types() in the code.
Instead filter $mimes input array against the filetype whitelist provided by Multisite.
Please fix the description.
/**
* Check an array of MIME types against a whitelist.
*
* WordPress ships with a set of allowed upload filetypes,
* which is defined in wp-includes/functions.php in
* get_allowed_mime_types(). This function is used to filter
* that list against the filetype whitelist provided by Multisite
* Super Admins at wp-admin/network/settings.php.
*
* @since MU
*
* @param array $mimes
* @return array
*/
function check_upload_mimes( $mimes ) {
Change History (3)
Note: See
TracTickets for help on using
tickets.
Related: #20997
The description appears to be correct.
check_upload_mimes()is hooked toupload_mimesfilter, which is used inget_allowed_mime_types():http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/ms-default-filters.php#L46
http://core.trac.wordpress.org/browser/tags/3.4.1/wp-includes/functions.php#L1755