Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: upload_mimes

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
1651      $upload_error_strings = array(false,
1652           __("The uploaded file exceeds the <code>upload_max_filesize</code> directive in <code>php.ini</code>."),
1653           __("The uploaded file exceeds the <em>MAX_FILE_SIZE</em> directive that was specified in the HTML form."),
1654           __("The uploaded file was only partially uploaded."),
1655           __("No file was uploaded."),
1656           __("Missing a temporary folder."),
1657           __("Failed to write file to disk."));
1659      // Accepted MIME types are set here as PCRE. Override with $override['mimes'].
1660      $mimes = apply_filters('upload_mimes', array (
1661           'jpg|jpeg|jpe' => 'image/jpeg',
1662           'gif' => 'image/gif',
1663           'png' => 'image/png',
1664           'bmp' => 'image/bmp',
1665           'tif|tiff' => 'image/tiff',
1666           'ico' => 'image/x-icon',
1667           'asf|asx|wax|wmv|wmx' => 'video/asf',
1668           'avi' => 'video/avi',
1669           'mov|qt' => 'video/quicktime',