upload_mimes filter doesn't work occasionally
|Reported by:||dpacmittal||Owned by:||ryan|
get_allowed_mime_types() in wp-includes/functions.php contains static variable $mimes. So if get_allowed_mime_types() is called before a filter is added, apply_filters() for 'upload_mimes' is not called, rendering the filter useless.
It happened on one of my websites where get_allowed_mime_types() was being called even before 'upload_mimes' filters were added from the theme's functions.php.
Best fix is to remove the static variable. Thoughts?