Uses
Uses | Description |
---|---|
wp-includes/functions.php: wp_get_mime_types() | Retrieve list of mime types and file extensions. |
Returns first matched extension from Mime-type, as mapped from wp_get_mime_types()
(string) (Optional)
Default value: null
(string|false)
File: wp-includes/class-wp-image-editor.php
protected static function get_extension( $mime_type = null ) { $extensions = explode( '|', array_search( $mime_type, wp_get_mime_types(), true ) ); if ( empty( $extensions[0] ) ) { return false; } return $extensions[0]; }
Version | Description |
---|---|
3.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_image_editor/get_extension