Gets the available file mime types.
Description
See also
Return
(array) Array of <code>$file_extension => $mime_type</code> pairs.
Source
File: src/db-objects/elements/element-types/base/media.php
protected function get_file_mime_types() { $mime_types = wp_get_mime_types(); $file_types = array(); foreach ( $mime_types as $extensions => $mime_type ) { $extensions = explode( '|', $extensions ); foreach ( $extensions as $extension ) { $file_types[ $extension ] = $mime_type; } } return $file_types; }
Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |