Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: mime_types

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
3314       *
3315       * This filter should be used to add, not remove, mime types. To remove
3316       * mime types, use the {@see 'upload_mimes'} filter.
3317       *
3318       * @since 3.5.0
3319       *
3320       * @param string[] $wp_get_mime_types Mime types keyed by the file extension regex
3321       *                                 corresponding to those types.
3322       */
3323      return apply_filters(
3324           'mime_types',
3325           array(
3326                // Image formats.
3327                'jpg|jpeg|jpe'                 => 'image/jpeg',
3328                'gif'                          => 'image/gif',
3329                'png'                          => 'image/png',
3330                'bmp'                          => 'image/bmp',
3331                'tiff|tif'                     => 'image/tiff',
3332                'webp'                         => 'image/webp',