WP_Image_Editor::get_extension( string $mime_type = null ): string|false

Returns first matched extension from Mime-type, as mapped from wp_get_mime_types()


Parameters

$mime_type string Optional

Default: null


Top ↑

Return

string|false


Top ↑

Source

File: wp-includes/class-wp-image-editor.php. View all references

protected static function get_extension( $mime_type = null ) {
	if ( empty( $mime_type ) ) {
		return false;
	}

	return wp_get_default_extension_for_mime_type( $mime_type );
}


Top ↑

Changelog

Changelog
Version Description
3.5.0 Introduced.

Top ↑

User Contributed Notes

You must log in before being able to contribute a note or feedback.