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
1936  * @since 3.5.0
1937  *
1938  * @uses apply_filters() Calls 'mime_types' on returned array. This filter should
1939  * be used to add types, not remove them. To remove types use the upload_mimes filter.
1940  *
1941  * @return array Array of mime types keyed by the file extension regex corresponding to those types.
1942  */
1943 function wp_get_mime_types() {
1944      // Accepted MIME types are set here as PCRE unless provided.
1945      return apply_filters( 'mime_types', array(
1946      // Image formats
1947      'jpg|jpeg|jpe' => 'image/jpeg',
1948      'gif' => 'image/gif',
1949      'png' => 'image/png',
1950      'bmp' => 'image/bmp',
1951      'tif|tiff' => 'image/tiff',
1952      'ico' => 'image/x-icon',
1953      // Video formats
1954      'asf|asx' => 'video/x-ms-asf',