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
2348       *
2349       * This filter should be used to add, not remove, mime types. To remove
2350       * mime types, use the {@see 'upload_mimes'} filter.
2351       *
2352       * @since 3.5.0
2353       *
2354       * @param array $wp_get_mime_types Mime types keyed by the file extension regex
2355       *                                 corresponding to those types.
2356       */
2357      return apply_filters( 'mime_types', array(
2358      // Image formats.
2359      'jpg|jpeg|jpe' => 'image/jpeg',
2360      'gif' => 'image/gif',
2361      'png' => 'image/png',
2362      'bmp' => 'image/bmp',
2363      'tiff|tif' => 'image/tiff',
2364      'ico' => 'image/x-icon',
2365      // Video formats.
2366      'asf|asx' => 'video/x-ms-asf',