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
1898  * @since 3.5.0
1899  *
1900  * @uses apply_filters() Calls 'mime_types' on returned array. This filter should
1901  * be used to add types, not remove them. To remove types use the upload_mimes filter.
1902  *
1903  * @return array Array of mime types keyed by the file extension regex corresponding to those types.
1904  */
1905 function wp_get_mime_types() {
1906      // Accepted MIME types are set here as PCRE unless provided.
1907      return apply_filters( 'mime_types', array(
1908      // Image formats
1909      'jpg|jpeg|jpe' => 'image/jpeg',
1910      'gif' => 'image/gif',
1911      'png' => 'image/png',
1912      'bmp' => 'image/bmp',
1913      'tif|tiff' => 'image/tiff',
1914      'ico' => 'image/x-icon',
1915      // Video formats
1916      'asf|asx' => 'video/x-ms-asf',